diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-10 07:13:44 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-12 14:07:16 +0000 |
commit | e2698550456abba83c6dcd5d5e5a9990a0b96f8a (patch) | |
tree | 79a56f0df3fa55e470d84b4dff6059fbf487ec18 /nixpkgs/pkgs/development/python-modules/pysnow | |
parent | 1cdc42df888dc98c347e03bd942ed9825a55bcb3 (diff) | |
parent | 84d74ae9c9cbed73274b8e4e00be14688ffc93fe (diff) | |
download | nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.gz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.bz2 nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.lz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.xz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.zst nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.zip |
Merge commit '84d74ae9c9cbed73274b8e4e00be14688ffc93fe'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pysnow')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pysnow/default.nix | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pysnow/default.nix b/nixpkgs/pkgs/development/python-modules/pysnow/default.nix index ef7fcd20e78e..d8d6b4f4401b 100644 --- a/nixpkgs/pkgs/development/python-modules/pysnow/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pysnow/default.nix @@ -1,12 +1,13 @@ { lib , buildPythonPackage , fetchPypi -, isPy27 -, pythonAtLeast +, fetchFromGitHub +, poetry , brotli , ijson , nose -, requests_oauthlib +, httpretty +, requests_oauthlib , python_magic , pytz }: @@ -14,32 +15,43 @@ buildPythonPackage rec { pname = "pysnow"; version = "0.7.16"; - - src = fetchPypi { - inherit pname version; - sha256 = "5df61091470e48b5b3a6ea75637f69d3aacae20041487ea457a9a0e3093fba8c"; + + # tests not included in pypi tarball + src = fetchFromGitHub { + owner = "rbw"; + repo = pname; + rev = version; + sha256 = "0dj90w742klfcjnx7yhp0nzki2mzafqzzr0rk2dp6vxn8h58z8ww"; }; + format = "pyproject"; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'ijson = "^2.5.1"' 'ijson = "*"' \ + --replace 'pytz = "^2019.3"' 'pytz = "*"' \ + --replace 'oauthlib = "^3.1.0"' 'oauthlib = "*"' + ''; + nativeBuildInputs = [ poetry ]; propagatedBuildInputs = [ brotli - ijson - python_magic - pytz + ijson + python_magic + pytz requests_oauthlib ]; - checkInputs = [ nose ]; - + checkInputs = [ nose httpretty ]; checkPhase = '' nosetests --cover-package=pysnow --with-coverage --cover-erase ''; + pythonImportsCheck = [ "pysnow" ]; meta = with lib; { description = "ServiceNow HTTP client library written in Python"; homepage = "https://github.com/rbw/pysnow"; license = licenses.mit; - maintainers = [ maintainers.almac ]; + maintainers = [ maintainers.almac ]; }; } - |