diff options
Diffstat (limited to 'pkgs/development/python-modules')
12 files changed, 205 insertions, 64 deletions
diff --git a/pkgs/development/python-modules/django-allauth/default.nix b/pkgs/development/python-modules/django-allauth/default.nix index 143e76cf0d8..a68cfd6d9cd 100644 --- a/pkgs/development/python-modules/django-allauth/default.nix +++ b/pkgs/development/python-modules/django-allauth/default.nix @@ -3,14 +3,14 @@ buildPythonPackage rec { pname = "django-allauth"; - version = "0.40.0"; + version = "0.47.0"; # no tests on PyPI src = fetchFromGitHub { owner = "pennersr"; repo = pname; rev = version; - sha256 = "10id4k01p1hg5agb8cmllg8mv4kc7ryl75br10idwxabqqp4vla1"; + sha256 = "sha256-wKrsute6TCl331UrxNEBf/zTtGnyGHsOZQwdiicbg2o="; }; propagatedBuildInputs = [ requests requests_oauthlib django python3-openid ]; diff --git a/pkgs/development/python-modules/django-oauth-toolkit/default.nix b/pkgs/development/python-modules/django-oauth-toolkit/default.nix index e7cb4814cb4..6212c754f89 100644 --- a/pkgs/development/python-modules/django-oauth-toolkit/default.nix +++ b/pkgs/development/python-modules/django-oauth-toolkit/default.nix @@ -1,22 +1,58 @@ -{ lib, buildPythonPackage, fetchFromGitHub -, django, requests, oauthlib +{ lib +, buildPythonPackage +, fetchFromGitHub + +# propagates +, django +, jwcrypto +, requests +, oauthlib + +# tests +, djangorestframework +, pytest-django +, pytest-xdist +, pytest-mock +, pytestCheckHook }: buildPythonPackage rec { pname = "django-oauth-toolkit"; - version = "1.2.0"; + version = "1.6.1"; + format = "setuptools"; src = fetchFromGitHub { owner = "jazzband"; repo = pname; rev = version; - sha256 = "1zbksxrcxlqnapmlvx4rgvpqc4plgnq0xnf45cjwzwi1626zs8g6"; + sha256 = "sha256-TOrFxQULwiuwpVFqRwRkfTW+GRudLNy6F/gIjUYjZhI="; }; - propagatedBuildInputs = [ django requests oauthlib ]; + postPatch = '' + sed -i '/cov/d' tox.ini + ''; + + propagatedBuildInputs = [ + django + jwcrypto + oauthlib + requests + ]; + + DJANGO_SETTINGS_MODULE = "tests.settings"; + + checkInputs = [ + djangorestframework + pytest-django + pytest-xdist + pytest-mock + pytestCheckHook + ]; - # django.core.exceptions.ImproperlyConfigured: Requested setting OAUTH2_PROVIDER, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings - doCheck = false; + disabledTests = [ + # Failed to get a valid response from authentication server. Status code: 404, Reason: Not Found. + "test_response_when_auth_server_response_return_404" + ]; meta = with lib; { description = "OAuth2 goodies for the Djangonauts"; diff --git a/pkgs/development/python-modules/django_guardian/default.nix b/pkgs/development/python-modules/django_guardian/default.nix index 9685e55bb1c..c7bda13dd9a 100644 --- a/pkgs/development/python-modules/django_guardian/default.nix +++ b/pkgs/development/python-modules/django_guardian/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi -, django_environ, mock, django +, django-environ, mock, django , pytest, pytest-runner, pytest-django }: buildPythonPackage rec { @@ -11,7 +11,7 @@ buildPythonPackage rec { sha256 = "c58a68ae76922d33e6bdc0e69af1892097838de56e93e78a8361090bcd9f89a0"; }; - checkInputs = [ pytest pytest-runner pytest-django django_environ mock ]; + checkInputs = [ pytest pytest-runner pytest-django django-environ mock ]; propagatedBuildInputs = [ django ]; meta = with lib; { diff --git a/pkgs/development/python-modules/gql/default.nix b/pkgs/development/python-modules/gql/default.nix new file mode 100644 index 00000000000..65e4bbde319 --- /dev/null +++ b/pkgs/development/python-modules/gql/default.nix @@ -0,0 +1,77 @@ +{ lib +, aiofiles +, aiohttp +, botocore +, buildPythonPackage +, fetchFromGitHub +, graphql-core +, mock +, parse +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, requests +, requests-toolbelt +, urllib3 +, vcrpy +, websockets +, yarl +}: + +buildPythonPackage rec { + pname = "gql"; + version = "3.0.0rc0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "graphql-python"; + repo = pname; + rev = "v${version}"; + hash = "sha256-yr1DyMj/0C9XPTyGdbQbn7nMRKr4JwItFDsqvl/goqU="; + }; + + propagatedBuildInputs = [ + aiohttp + botocore + graphql-core + requests + requests-toolbelt + urllib3 + websockets + yarl + ]; + + checkInputs = [ + aiofiles + mock + parse + pytest-asyncio + pytestCheckHook + vcrpy + ]; + + disabledTests = [ + # Tests requires network access + "test_execute_result_error" + "test_http_transport" + ]; + + disabledTestPaths = [ + # Exclude linter tests + "gql-checker/tests/test_flake8_linter.py" + "gql-checker/tests/test_pylama_linter.py" + ]; + + pythonImportsCheck = [ + "gql" + ]; + + meta = with lib; { + description = "GraphQL client in Python"; + homepage = "https://github.com/graphql-python/gql"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/gradient-utils/default.nix b/pkgs/development/python-modules/gradient-utils/default.nix index 87002505c0e..e81d815e8c2 100644 --- a/pkgs/development/python-modules/gradient-utils/default.nix +++ b/pkgs/development/python-modules/gradient-utils/default.nix @@ -7,6 +7,7 @@ , poetry-core , prometheus-client , pytestCheckHook +, pythonOlder , requests }: @@ -15,6 +16,8 @@ buildPythonPackage rec { version = "0.5.0"; format = "pyproject"; + disabled = pythonOlder "3.6"; + src = fetchFromGitHub { owner = "Paperspace"; repo = pname; @@ -22,15 +25,9 @@ buildPythonPackage rec { sha256 = "19plkgwwfs6298vjplgsvhirixi3jbngq5y07x9c0fjxk39fa2dk"; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'numpy = "1.18.5"' 'numpy = "^1.18.5"' \ - --replace 'hyperopt = "0.1.2"' 'hyperopt = ">=0.1.2"' \ - --replace 'wheel = "^0.35.1"' 'wheel = "*"' \ - --replace 'prometheus-client = ">=0.8,<0.10"' 'prometheus-client = "*"' - ''; - - nativeBuildInputs = [ poetry-core ]; + nativeBuildInputs = [ + poetry-core + ]; propagatedBuildInputs = [ hyperopt @@ -44,20 +41,24 @@ buildPythonPackage rec { pytestCheckHook ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'wheel = "^0.35.1"' 'wheel = "*"' \ + --replace 'prometheus-client = ">=0.8,<0.10"' 'prometheus-client = "*"' + ''; + preCheck = '' export HOSTNAME=myhost-experimentId ''; - disabledTests = [ - "test_add_metrics_pushes_metrics" # requires a working prometheus push gateway - ]; - disabledTestPaths = [ - # needs network access + # Requires a working Prometheus push gateway "tests/integration/test_metrics.py" ]; - pythonImportsCheck = [ "gradient_utils" ]; + pythonImportsCheck = [ + "gradient_utils" + ]; meta = with lib; { description = "Python utils and helpers library for Gradient"; diff --git a/pkgs/development/python-modules/gradient/default.nix b/pkgs/development/python-modules/gradient/default.nix index ccde1a38ecc..026c61fc615 100644 --- a/pkgs/development/python-modules/gradient/default.nix +++ b/pkgs/development/python-modules/gradient/default.nix @@ -9,6 +9,7 @@ , fetchPypi , gradient_statsd , gradient-utils +, gql , halo , marshmallow , progressbar2 @@ -22,17 +23,19 @@ buildPythonPackage rec { pname = "gradient"; - version = "1.9.0"; + version = "1.9.1"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "47be02511d7ea66a13559598851cb435d435fb3f7676f6de17292d06daad8947"; + hash = "sha256-zimOh4bc9EQGpqMky/etwnAF04onJ2m/KAl29IaAeAY="; }; postPatch = '' substituteInPlace setup.py \ --replace 'attrs<=' 'attrs>=' \ --replace 'colorama==' 'colorama>=' \ + --replace 'gql[requests]==3.0.0a6' 'gql' \ --replace 'PyYAML==' 'PyYAML>=' \ --replace 'marshmallow<' 'marshmallow>=' \ --replace 'websocket-client==' 'websocket-client>=' @@ -45,6 +48,7 @@ buildPythonPackage rec { click-didyoumean click-help-colors colorama + gql gradient_statsd gradient-utils halo @@ -58,17 +62,20 @@ buildPythonPackage rec { websocket-client ]; - # tries to use /homeless-shelter to mimic container usage, etc + # Tries to use /homeless-shelter to mimic container usage, etc doCheck = false; + # marshmallow.exceptions.StringNotCollectionError: "only" should be a collection of strings. + # Support for marshmallow > 3 + # pythonImportsCheck = [ + # "gradient" + # ]; + meta = with lib; { description = "The command line interface for Gradient"; homepage = "https://github.com/Paperspace/gradient-cli"; license = licenses.isc; platforms = platforms.unix; maintainers = with maintainers; [ thoughtpolice ]; - # There is no support for click > 8 - # https://github.com/Paperspace/gradient-cli/issues/368 - broken = true; }; } diff --git a/pkgs/development/python-modules/makefun/default.nix b/pkgs/development/python-modules/makefun/default.nix index dbf4b8ffe46..1d4ae635800 100644 --- a/pkgs/development/python-modules/makefun/default.nix +++ b/pkgs/development/python-modules/makefun/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "makefun"; - version = "1.13.0"; + version = "1.13.1"; src = fetchPypi { inherit pname version; - sha256 = "2c673d2b4f0ef809347513cb45e3b23a04228588af7c9ac859e99247abac516a"; + sha256 = "985bb8b670ffbbb95d2a8aa996d318e6e9a3f26fc6f3ef2da93ebdf8f9c616bf"; }; postPatch = '' diff --git a/pkgs/development/python-modules/oauthlib/default.nix b/pkgs/development/python-modules/oauthlib/default.nix index 5c4cbc78adb..01e6ca29b5d 100644 --- a/pkgs/development/python-modules/oauthlib/default.nix +++ b/pkgs/development/python-modules/oauthlib/default.nix @@ -1,31 +1,40 @@ { lib , buildPythonPackage , fetchFromGitHub -, mock -, pytest -, cryptography + +# propagates , blinker +, cryptography , pyjwt + +# test +, mock +, pytestCheckHook }: buildPythonPackage rec { pname = "oauthlib"; - version = "unstable-2020-05-08"; + version = "3.1.1"; + format = "setuptools"; # master supports pyjwt==1.7.1 src = fetchFromGitHub { owner = pname; repo = pname; - rev = "46647402896db5f0d979eba9594623e889739060"; - sha256 = "1wrdjdvlfcd74lckcgascnasrffg8sip0z673si4ag5kv4afiz3l"; + rev = "v${version}"; + hash = "sha256:1bgxpzh11i0x7h9py3a29cz5z714b3p498b62znnn5ciy0cr80sv"; }; - checkInputs = [ mock pytest ]; - propagatedBuildInputs = [ cryptography blinker pyjwt ]; + propagatedBuildInputs = [ + blinker + cryptography + pyjwt + ]; - checkPhase = '' - py.test tests/ - ''; + checkInputs = [ + mock + pytestCheckHook + ]; meta = with lib; { homepage = "https://github.com/idan/oauthlib"; diff --git a/pkgs/development/python-modules/pydub/default.nix b/pkgs/development/python-modules/pydub/default.nix index 6b67814a222..3adf54281b7 100644 --- a/pkgs/development/python-modules/pydub/default.nix +++ b/pkgs/development/python-modules/pydub/default.nix @@ -1,8 +1,18 @@ -{ lib, stdenv, buildPythonPackage, fetchFromGitHub, scipy, ffmpeg-full }: +{ lib +, stdenv +, buildPythonPackage +, fetchFromGitHub + +# tests +, ffmpeg-full +, python +}: buildPythonPackage rec { pname = "pydub"; version = "0.25.1"; + format = "setuptools"; + # pypi version doesn't include required data files for tests src = fetchFromGitHub { owner = "jiaaro"; @@ -11,23 +21,24 @@ buildPythonPackage rec { sha256 = "0xskllq66wqndjfmvp58k26cv3w480sqsil6ifwp4gghir7hqc8m"; }; + pythonImportsCheck = [ + "pydub" + "pydub.audio_segment" + "pydub.playback" + ]; - # disable a test that fails on aarch64 due to rounding errors - postPatch = lib.optionalString stdenv.isAarch64 '' - substituteInPlace test/test.py \ - --replace "test_overlay_with_gain_change" "notest_overlay_with_gain_change" - ''; - - checkInputs = [ scipy ffmpeg-full ]; + checkInputs = [ + ffmpeg-full + ]; checkPhase = '' - python test/test.py + ${python.interpreter} test/test.py ''; meta = with lib; { - description = "Manipulate audio with a simple and easy high level interface."; - homepage = "http://pydub.com/"; - license = licenses.mit; - platforms = platforms.all; + description = "Manipulate audio with a simple and easy high level interface"; + homepage = "http://pydub.com"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; }; } diff --git a/pkgs/development/python-modules/pylgnetcast/default.nix b/pkgs/development/python-modules/pylgnetcast/default.nix index cadb4bb8383..51e3dfdab28 100644 --- a/pkgs/development/python-modules/pylgnetcast/default.nix +++ b/pkgs/development/python-modules/pylgnetcast/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pylgnetcast"; - version = "0.3.5"; + version = "0.3.7"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "Drafteed"; repo = "python-lgnetcast"; rev = "v${version}"; - sha256 = "11g7ya4ppqxjiv3fkz9mi6h1afw9icy6xyn4jzm63kjvxqhrwnw4"; + sha256 = "0pmz52k2sfxj5x2wcwdjks2lqh1gb5zfrjgc6xij8jal4l9xd2dz"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pynetbox/default.nix b/pkgs/development/python-modules/pynetbox/default.nix index eeb6ad01798..54fb270a176 100644 --- a/pkgs/development/python-modules/pynetbox/default.nix +++ b/pkgs/development/python-modules/pynetbox/default.nix @@ -10,13 +10,13 @@ buildPythonPackage rec { pname = "pynetbox"; - version = "6.4.1"; + version = "6.5.0"; src = fetchFromGitHub { owner = "netbox-community"; repo = pname; rev = "v${version}"; - sha256 = "08k2zxfz23gzbk49r3hmh6r3m5rgx1gk7w83qxi1v4gbm4wr0v9m"; + sha256 = "1fk64bi7aswsmfqsciamml2wydgfg464h6i7479xfim4mwmkkik4"; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; diff --git a/pkgs/development/python-modules/pytest-cases/default.nix b/pkgs/development/python-modules/pytest-cases/default.nix index ccbf5401bd2..c3374032d33 100644 --- a/pkgs/development/python-modules/pytest-cases/default.nix +++ b/pkgs/development/python-modules/pytest-cases/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "pytest-cases"; - version = "3.6.7"; + version = "3.6.8"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ZUAXmIww/tdm7nDAj2VDXq0B6raHeDX1ywxnnv3EVIE="; + sha256 = "d423e87b30e1080cc162d86c72bfa35861cccfe3539125e81c68ba142ab974bc"; }; nativeBuildInputs = [ |