at 22.05-pre 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, poetry 5, brotli 6, ijson 7, nose 8, httpretty 9, requests_oauthlib 10, python_magic 11, pytz 12}: 13 14buildPythonPackage rec { 15 pname = "pysnow"; 16 version = "0.7.16"; 17 18 # tests not included in pypi tarball 19 src = fetchFromGitHub { 20 owner = "rbw"; 21 repo = pname; 22 rev = version; 23 sha256 = "0dj90w742klfcjnx7yhp0nzki2mzafqzzr0rk2dp6vxn8h58z8ww"; 24 }; 25 format = "pyproject"; 26 27 postPatch = '' 28 substituteInPlace pyproject.toml \ 29 --replace 'ijson = "^2.5.1"' 'ijson = "*"' \ 30 --replace 'pytz = "^2019.3"' 'pytz = "*"' \ 31 --replace 'oauthlib = "^3.1.0"' 'oauthlib = "*"' 32 ''; 33 34 nativeBuildInputs = [ poetry ]; 35 propagatedBuildInputs = [ 36 brotli 37 ijson 38 python_magic 39 pytz 40 requests_oauthlib 41 ]; 42 43 checkInputs = [ nose httpretty ]; 44 checkPhase = '' 45 nosetests --cover-package=pysnow --with-coverage --cover-erase 46 ''; 47 pythonImportsCheck = [ "pysnow" ]; 48 49 meta = with lib; { 50 description = "ServiceNow HTTP client library written in Python"; 51 homepage = "https://github.com/rbw/pysnow"; 52 license = licenses.mit; 53 maintainers = [ maintainers.almac ]; 54 }; 55 56}