diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2018-11-29 08:12:56 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2018-11-29 08:12:56 +0100 |
commit | 9db2421d1f65beb38911e8133349193db0042a1d (patch) | |
tree | 90a2f4a56cf871c74aad86138d85e9631c2c2f86 /pkgs/development/python-modules/snug/default.nix | |
parent | 9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90 (diff) | |
parent | 8d88e4f6c7b09fe811d92b346e5eafefe07a47c9 (diff) | |
download | nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.gz nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.bz2 nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.lz nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.xz nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.zst nixlib-9db2421d1f65beb38911e8133349193db0042a1d.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/development/python-modules/snug/default.nix')
-rw-r--r-- | pkgs/development/python-modules/snug/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/snug/default.nix b/pkgs/development/python-modules/snug/default.nix new file mode 100644 index 000000000000..0b3adbe15d90 --- /dev/null +++ b/pkgs/development/python-modules/snug/default.nix @@ -0,0 +1,37 @@ +{ buildPythonPackage, lib, fetchFromGitHub, glibcLocales +, pytest, pytest-mock, gentools +, typing, singledispatch, pythonOlder +}: + +buildPythonPackage rec { + pname = "snug"; + version = "1.3.4"; + + # Pypi doesn't ship the tests, so we fetch directly from GitHub + src = fetchFromGitHub { + owner = "ariebovenberg"; + repo = "snug"; + rev = "v${version}"; + sha256 = "0jmg0sivz9ljazlnsrrqaizrb3r7asy5pa0dj3idx49gbig4589i"; + }; + + # Prevent unicode decoding error in setup.py + # while reading README.rst and HISTORY.rst + buildInputs = [ glibcLocales ]; + LC_ALL = "en_US.UTF-8"; + + propagatedBuildInputs = + lib.optionals (pythonOlder "3.4") [ singledispatch ] ++ + lib.optionals (pythonOlder "3.5") [ typing ]; + + checkInputs = [ pytest pytest-mock gentools ]; + checkPhase = "pytest"; + + meta = with lib; { + description = "Tiny toolkit for writing reusable interactions with web APIs"; + license = licenses.mit; + homepage = https://snug.readthedocs.io/en/latest/; + maintainers = with maintainers; [ mredaelli ]; + }; + +} |