diff options
| author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-01-29 00:02:04 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-29 00:02:04 +0000 |
| commit | 189be4ddc104fbb372f33ded7d8a43e1803a49b9 (patch) | |
| tree | 983225a8b907c3164677a6bf688b22c5bc887e96 /pkgs/development/python-modules | |
| parent | 3ecbb12aa1e83061613a10593b3741bf6e4a29a9 (diff) | |
| parent | 0c0f31bf510e7253aef56037e6cc2ddf51a23301 (diff) | |
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/python-modules')
13 files changed, 129 insertions, 38 deletions
diff --git a/pkgs/development/python-modules/apache-beam/default.nix b/pkgs/development/python-modules/apache-beam/default.nix index 44748f2fdb05..f3e47bfc9010 100644 --- a/pkgs/development/python-modules/apache-beam/default.nix +++ b/pkgs/development/python-modules/apache-beam/default.nix @@ -57,6 +57,12 @@ buildPythonPackage rec { ./fix-cython.patch ]; + # See https://github.com/NixOS/nixpkgs/issues/156957. + postPatch = '' + substituteInPlace setup.py \ + --replace "typing-extensions>=3.7.0,<4" "typing-extensions" + ''; + sourceRoot = "source/sdks/python"; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/cfn-flip/default.nix b/pkgs/development/python-modules/cfn-flip/default.nix index bf3eab19d4fa..105775a4547e 100644 --- a/pkgs/development/python-modules/cfn-flip/default.nix +++ b/pkgs/development/python-modules/cfn-flip/default.nix @@ -1,25 +1,25 @@ -{ buildPythonPackage -, fetchFromGitHub -, lib - -# pythonPackages +{ lib +, buildPythonPackage , click -, pytest -, pytest-cov -, pytest-runner +, fetchFromGitHub +, pytestCheckHook +, pythonOlder , pyyaml , six }: buildPythonPackage rec { pname = "cfn-flip"; - version = "1.2.2"; + version = "1.3.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-cfn-template-flip"; rev = version; - sha256 = "05fk725a1i3zl3idik2hxl3w6k1ln0j33j3jdq1gvy1sfyc79ifm"; + hash = "sha256-1cV0mHc6+P0CbnLIMSSwNEzDB+1QzNjioH/EoIo40xU="; }; propagatedBuildInputs = [ @@ -29,27 +29,27 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest - pytest-cov - pytest-runner + pytestCheckHook ]; - checkPhase = '' - py.test \ - --cov=cfn_clean \ - --cov=cfn_flip \ - --cov=cfn_tools \ - --cov-report term-missing \ - --cov-report html + postPatch = '' + sed -i "/--cov/d" tox.ini ''; + disabledTests = [ + # TypeError: load() missing 1 required positional argument: 'Loader' + "test_flip_to_yaml_with_longhand_functions" + "test_yaml_no_ordered_dict" + ]; + + pythonImportsCheck = [ + "cfn_flip" + ]; + meta = with lib; { description = "Tool for converting AWS CloudFormation templates between JSON and YAML formats"; homepage = "https://github.com/awslabs/aws-cfn-template-flip"; license = licenses.asl20; - maintainers = with maintainers; [ - kamadorueda - psyanticy - ]; + maintainers = with maintainers; [ kamadorueda psyanticy ]; }; } diff --git a/pkgs/development/python-modules/dm-haiku/default.nix b/pkgs/development/python-modules/dm-haiku/default.nix index 5468776c72d1..14ceebf0a19b 100644 --- a/pkgs/development/python-modules/dm-haiku/default.nix +++ b/pkgs/development/python-modules/dm-haiku/default.nix @@ -4,6 +4,7 @@ , dill , dm-tree , fetchFromGitHub +, jaxlib , jmp , lib , pytestCheckHook @@ -31,6 +32,7 @@ buildPythonPackage rec { chex cloudpickle dm-tree + jaxlib pytestCheckHook tensorflow ]; diff --git a/pkgs/development/python-modules/elegy/default.nix b/pkgs/development/python-modules/elegy/default.nix index ec968dce8ec3..5b0cb293c0a3 100644 --- a/pkgs/development/python-modules/elegy/default.nix +++ b/pkgs/development/python-modules/elegy/default.nix @@ -4,6 +4,7 @@ , deepmerge , dm-haiku , fetchFromGitHub +, jaxlib , lib , poetry , pytestCheckHook @@ -35,6 +36,8 @@ buildPythonPackage rec { poetry ]; + buildInputs = [ jaxlib ]; + propagatedBuildInputs = [ cloudpickle deepdish diff --git a/pkgs/development/python-modules/flax/default.nix b/pkgs/development/python-modules/flax/default.nix index b8479c0f73ca..b5a22858b57a 100644 --- a/pkgs/development/python-modules/flax/default.nix +++ b/pkgs/development/python-modules/flax/default.nix @@ -1,5 +1,6 @@ { buildPythonPackage , fetchFromGitHub +, jaxlib , keras , lib , matplotlib @@ -21,6 +22,8 @@ buildPythonPackage rec { sha256 = "0zvq0vl88hiwmss49bnm7gdmndr1dfza2bcs1fj88a9r7w9dmlsr"; }; + buildInputs = [ jaxlib ]; + propagatedBuildInputs = [ matplotlib msgpack diff --git a/pkgs/development/python-modules/jmp/default.nix b/pkgs/development/python-modules/jmp/default.nix index dc096b93ae46..09c41a7ededd 100644 --- a/pkgs/development/python-modules/jmp/default.nix +++ b/pkgs/development/python-modules/jmp/default.nix @@ -19,10 +19,9 @@ buildPythonPackage rec { sha256 = "0hh4cmp93wjyidj48gh07vhx2kjvpwd23xvy79bsjn5qaaf6q4cm"; }; - # Wheel requires only `numpy`, but the import needs both `jax` and `jaxlib`. + # Wheel requires only `numpy`, but the import needs `jax`. propagatedBuildInputs = [ jax - jaxlib ]; pythonImportsCheck = [ @@ -30,6 +29,7 @@ buildPythonPackage rec { ]; checkInputs = [ + jaxlib pytestCheckHook ]; diff --git a/pkgs/development/python-modules/optax/default.nix b/pkgs/development/python-modules/optax/default.nix index bf0383fa1530..6a3b6a9d3e67 100644 --- a/pkgs/development/python-modules/optax/default.nix +++ b/pkgs/development/python-modules/optax/default.nix @@ -22,10 +22,11 @@ buildPythonPackage rec { sha256 = "1q8cxc42a5xais2ll1l238cnn3l7w28savhgiz0lg01ilz2ysbli"; }; + buildInputs = [ jaxlib ]; + propagatedBuildInputs = [ absl-py chex - jaxlib numpy ]; diff --git a/pkgs/development/python-modules/pycfmodel/default.nix b/pkgs/development/python-modules/pycfmodel/default.nix new file mode 100644 index 000000000000..320e6d51c7ac --- /dev/null +++ b/pkgs/development/python-modules/pycfmodel/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, httpx +, pydantic +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pycfmodel"; + version = "0.13.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Skyscanner"; + repo = pname; + rev = version; + hash = "sha256-BlnLf0C/wxPXhoAH0SRB22eGWbbZ05L20rNy6qfOI+A="; + }; + + propagatedBuildInputs = [ + pydantic + ]; + + checkInputs = [ + httpx + pytestCheckHook + ]; + + disabledTests = [ + # Test require network access + "test_cloudformation_actions" + ]; + + pythonImportsCheck = [ + "pycfmodel" + ]; + + meta = with lib; { + description = "Model for Cloud Formation scripts"; + homepage = "https://github.com/Skyscanner/pycfmodel"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pydash/default.nix b/pkgs/development/python-modules/pydash/default.nix index 7d75896397f3..5b0ffade5885 100644 --- a/pkgs/development/python-modules/pydash/default.nix +++ b/pkgs/development/python-modules/pydash/default.nix @@ -1,23 +1,46 @@ -{ lib, buildPythonPackage, fetchFromGitHub, mock, pytestCheckHook, invoke }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, invoke +, mock +, pytestCheckHook +, pythonOlder +, sphinx_rtd_theme +}: buildPythonPackage rec { pname = "pydash"; - version = "4.9.3"; + version = "5.1.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "dgilland"; repo = pname; rev = "v${version}"; - sha256 = "sha256-BAyiSnILvujUOFOAkiXSgyozs2Q809pYihHwa+6BHcQ="; + hash = "sha256-BAyiSnILvujUOFOAkiXSgyozs2Q809pYihHwa+6BHcQ="; }; - patches = [ ./0001-Only-build-unit-tests.patch ]; + checkInputs = [ + invoke + mock + sphinx_rtd_theme + pytestCheckHook + ]; + + postPatch = '' + sed -i "/--cov/d" setup.cfg + sed -i "/--no-cov/d" setup.cfg + ''; - checkInputs = [ mock pytestCheckHook invoke ]; + pythonImportsCheck = [ + "pydash" + ]; meta = with lib; { - homepage = "https://github.com/dgilland/pydash"; - description = "The kitchen sink of Python utility libraries for doing \"stuff\" in a functional way. Based on the Lo-Dash Javascript library."; + description = "Python utility libraries for doing stuff in a functional way"; + homepage = "https://pydash.readthedocs.io"; license = licenses.mit; maintainers = with maintainers; [ ma27 ]; }; diff --git a/pkgs/development/python-modules/pytest-httpserver/default.nix b/pkgs/development/python-modules/pytest-httpserver/default.nix index cd07a104038c..eb04881455d7 100644 --- a/pkgs/development/python-modules/pytest-httpserver/default.nix +++ b/pkgs/development/python-modules/pytest-httpserver/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "pytest-httpserver"; - version = "1.0.3"; + version = "1.0.4"; src = fetchPypi { pname = "pytest_httpserver"; inherit version; - sha256 = "87561c4fa6a7bc306d76d1979a3eb9d54eb26bfb2f3f51f1643bf3c090ce629d"; + sha256 = "6de464ba5f74628d6182ebbdcb56783edf2c9b0caf598dc35c11f014f24a3f0d"; }; propagatedBuildInputs = [ werkzeug ]; diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix index a59ec10be037..26ccb1aacc51 100644 --- a/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/pkgs/development/python-modules/sentry-sdk/default.nix @@ -109,6 +109,8 @@ buildPythonPackage rec { "test_circular_references" # Failing wsgi test "test_session_mode_defaults_to_request_mode_in_wsgi_handler" + # Network requests to public web + "test_crumb_capture" ]; disabledTestPaths = [ diff --git a/pkgs/development/python-modules/treeo/default.nix b/pkgs/development/python-modules/treeo/default.nix index d0293d3e2c06..c8329f99a60e 100644 --- a/pkgs/development/python-modules/treeo/default.nix +++ b/pkgs/development/python-modules/treeo/default.nix @@ -22,12 +22,12 @@ buildPythonPackage rec { poetry-core ]; - # These deps are not needed for the wheel, but required during the import. + # jax is not declared in the dependencies, but is necessary. propagatedBuildInputs = [ jax - jaxlib ]; + checkInputs = [ jaxlib ]; pythonImportsCheck = [ "treeo" ]; diff --git a/pkgs/development/python-modules/treex/default.nix b/pkgs/development/python-modules/treex/default.nix index 1f4a55416d56..0b5ad0c89839 100644 --- a/pkgs/development/python-modules/treex/default.nix +++ b/pkgs/development/python-modules/treex/default.nix @@ -5,6 +5,7 @@ , fetchFromGitHub , flax , hypothesis +, jaxlib , keras , lib , poetry-core @@ -38,6 +39,8 @@ buildPythonPackage rec { poetry-core ]; + buildInputs = [ jaxlib ]; + propagatedBuildInputs = [ einops flax |
