diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/python-modules/pysnow | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pysnow')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pysnow/default.nix | 62 |
1 files changed, 39 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pysnow/default.nix b/nixpkgs/pkgs/development/python-modules/pysnow/default.nix index 1c9fccb70687..36e45d9d8695 100644 --- a/nixpkgs/pkgs/development/python-modules/pysnow/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pysnow/default.nix @@ -1,56 +1,72 @@ { lib +, brotli , buildPythonPackage , fetchFromGitHub -, poetry -, brotli -, ijson -, nose +, fetchpatch , httpretty -, requests_oauthlib -, python_magic +, ijson +, poetry-core +, python-magic , pytz +, pytestCheckHook +, requests-oauthlib }: buildPythonPackage rec { pname = "pysnow"; version = "0.7.16"; + format = "pyproject"; + - # tests not included in pypi tarball src = fetchFromGitHub { owner = "rbw"; repo = pname; rev = version; - sha256 = "0dj90w742klfcjnx7yhp0nzki2mzafqzzr0rk2dp6vxn8h58z8ww"; + hash = "sha256-nKOPCkS2b3ObmBnk/7FTv4o4vwUX+tOtZI5OQQ4HSTY="; }; - 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-core + ]; - nativeBuildInputs = [ poetry ]; propagatedBuildInputs = [ brotli ijson - python_magic + python-magic pytz - requests_oauthlib + requests-oauthlib + ]; + + checkInputs = [ + httpretty + pytestCheckHook ]; - checkInputs = [ nose httpretty ]; - checkPhase = '' - nosetests --cover-package=pysnow --with-coverage --cover-erase + patches = [ + # Switch to peotry-core, https://github.com/rbw/pysnow/pull/183 + (fetchpatch { + name = "switch-to-poetry-core.patch"; + url = "https://github.com/rbw/pysnow/commit/f214a203432b329df5317f3a25b2c0d9b55a9029.patch"; + sha256 = "sha256-ViRR+9WStlaQwyrLGk/tMOUAcEMY+kB61ZEKGMQJ30o="; + }) + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'ijson = "^2.5.1"' 'ijson = "*"' \ + --replace 'pytz = "^2019.3"' 'pytz = "*"' \ + --replace 'oauthlib = "^3.1.0"' 'oauthlib = "*"' ''; - pythonImportsCheck = [ "pysnow" ]; + + 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 = with maintainers; [ almac ]; }; } |