diff options
Diffstat (limited to 'pkgs/development/python-modules')
11 files changed, 164 insertions, 63 deletions
diff --git a/pkgs/development/python-modules/airtouch4pyapi/default.nix b/pkgs/development/python-modules/airtouch4pyapi/default.nix new file mode 100644 index 0000000000000..193070ac72613 --- /dev/null +++ b/pkgs/development/python-modules/airtouch4pyapi/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pythonOlder +}: + +buildPythonPackage rec { + pname = "airtouch4pyapi"; + version = "1.0.5"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "LonePurpleWolf"; + repo = pname; + # https://github.com/LonePurpleWolf/airtouch4pyapi/issues/5 + rev = "34783888846783c058fe79cec16feda45504f701"; + sha256 = "17c7fm72p085pg9msvsfdggbskvm12a6jlb5bw1cndrqsqcrxywx"; + }; + + propagatedBuildInputs = [ + numpy + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "airtouch4pyapi" ]; + + meta = with lib; { + description = "Python API for Airtouch 4 controllers"; + homepage = "https://github.com/LonePurpleWolf/airtouch4pyapi"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/jax/default.nix b/pkgs/development/python-modules/jax/default.nix index e1d21af094f9f..ce9a7758bc61f 100644 --- a/pkgs/development/python-modules/jax/default.nix +++ b/pkgs/development/python-modules/jax/default.nix @@ -1,39 +1,64 @@ -{ buildPythonPackage, fetchFromGitHub, lib -# propagatedBuildInputs -, absl-py, numpy, opt-einsum -# checkInputs -, jaxlib, pytestCheckHook +{ lib +, absl-py +, buildPythonPackage +, fetchFromGitHub +, jaxlib +, numpy +, opt-einsum +, pytestCheckHook +, pythonOlder +, scipy +, typing-extensions }: buildPythonPackage rec { pname = "jax"; - version = "0.2.21"; + version = "0.2.24"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; - # Fetching from pypi doesn't allow us to run the test suite. See https://discourse.nixos.org/t/pythonremovetestsdir-hook-being-run-before-checkphase/14612/3. src = fetchFromGitHub { owner = "google"; repo = pname; rev = "jax-v${version}"; - sha256 = "05w157h6jv20k8w2gnmlxbycmzf24lr5v392q0c5v0qcql11q7pn"; + sha256 = "1mmn1m4mprpwqlb1smjfdy3f74zm9p3l9dhhn25x6jrcj2cgc5pi"; }; # jaxlib is _not_ included in propagatedBuildInputs because there are # different versions of jaxlib depending on the desired target hardware. The # JAX project ships separate wheels for CPU, GPU, and TPU. Currently only the # CPU wheel is packaged. - propagatedBuildInputs = [ absl-py numpy opt-einsum ]; + propagatedBuildInputs = [ + absl-py + numpy + opt-einsum + scipy + typing-extensions + ]; + + checkInputs = [ + jaxlib + pytestCheckHook + ]; - checkInputs = [ jaxlib pytestCheckHook ]; # NOTE: Don't run the tests in the expiremental directory as they require flax # which creates a circular dependency. See https://discourse.nixos.org/t/how-to-nix-ify-python-packages-with-circular-dependencies/14648/2. # Not a big deal, this is how the JAX docs suggest running the test suite # anyhow. - pytestFlagsArray = [ "-W ignore::DeprecationWarning" "tests/" ]; + pytestFlagsArray = [ + "-W ignore::DeprecationWarning" + "tests/" + ]; + + pythonImportsCheck = [ + "jax" + ]; meta = with lib; { description = "Differentiate, compile, and transform Numpy code"; - homepage = "https://github.com/google/jax"; - license = licenses.asl20; + homepage = "https://github.com/google/jax"; + license = licenses.asl20; maintainers = with maintainers; [ samuela ]; }; } diff --git a/pkgs/development/python-modules/nassl/default.nix b/pkgs/development/python-modules/nassl/default.nix index 0d3716ca289eb..b9e19439251ac 100644 --- a/pkgs/development/python-modules/nassl/default.nix +++ b/pkgs/development/python-modules/nassl/default.nix @@ -3,7 +3,8 @@ , fetchurl , buildPythonPackage , pkgsStatic -, openssl +, openssl_1_1 +, openssl_1_0_2 , invoke , tls-parser , cacert @@ -36,7 +37,7 @@ let "enable-mdc2" "-fPIC" ]; - opensslStatic = (openssl.override nasslOpensslArgs).overrideAttrs ( + opensslStatic = (openssl_1_1.override nasslOpensslArgs).overrideAttrs ( oldAttrs: rec { name = "openssl-${version}"; version = "1.1.1h"; @@ -49,10 +50,24 @@ let "enable-tls1_3" "no-async" ]; + patches = builtins.filter ( + p: (builtins.baseNameOf (toString p)) != "macos-yosemite-compat.patch" + ) oldAttrs.patches; buildInputs = oldAttrs.buildInputs ++ [ zlibStatic cacert ]; + meta = oldAttrs.meta // { + knownVulnerabilities = [ + "CVE-2020-1971" + "CVE-2021-23840" + "CVE-2021-23841" + "CVE-2021-3449" + "CVE-2021-3450" + "CVE-2021-3711" + "CVE-2021-3712" + ]; + }; } ); - opensslLegacyStatic = (openssl.override nasslOpensslArgs).overrideAttrs ( + opensslLegacyStatic = (openssl_1_0_2.override nasslOpensslArgs).overrideAttrs ( oldAttrs: rec { name = "openssl-${version}"; version = "1.0.2e"; @@ -61,7 +76,9 @@ let sha256 = "1zqb1rff1wikc62a7vj5qxd1k191m8qif5d05mwdxz2wnzywlg72"; }; configureFlags = oldAttrs.configureFlags ++ nasslOpensslFlagsCommon; - patches = [ ]; + patches = builtins.filter ( + p: (builtins.baseNameOf (toString p)) == "darwin64-arm64.patch" + ) oldAttrs.patches; buildInputs = oldAttrs.buildInputs ++ [ zlibStatic ]; # openssl_1_0_2 needs `withDocs = false` outputs = lib.remove "doc" oldAttrs.outputs; diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix index e188a3ef86862..382eb3c5a3148 100644 --- a/pkgs/development/python-modules/python-telegram-bot/default.nix +++ b/pkgs/development/python-modules/python-telegram-bot/default.nix @@ -13,12 +13,14 @@ buildPythonPackage rec { pname = "python-telegram-bot"; - version = "13.7"; + version = "13.8.1"; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-JN91RZ4zW5a6/6aZFnn4RL1CaXivWmnKQZoKxDpAYCw="; + sha256 = "sha256-sGaR5Vw1lDJn7mNtmqcCs1eRVdLzLg4tbX8R8LXnJ/A="; }; propagatedBuildInputs = [ @@ -45,7 +47,9 @@ buildPythonPackage rec { # tests not included with release doCheck = false; - pythonImportsCheck = [ "telegram" ]; + pythonImportsCheck = [ + "telegram" + ]; meta = with lib; { description = "Python library to interface with the Telegram Bot API"; diff --git a/pkgs/development/python-modules/pyturbojpeg/default.nix b/pkgs/development/python-modules/pyturbojpeg/default.nix index 84b3a9bc5e9cb..a357e45a5faf6 100644 --- a/pkgs/development/python-modules/pyturbojpeg/default.nix +++ b/pkgs/development/python-modules/pyturbojpeg/default.nix @@ -1,21 +1,22 @@ { lib , stdenv -, python , buildPythonPackage , fetchPypi -, substituteAll , libjpeg_turbo , numpy +, python +, substituteAll }: buildPythonPackage rec { pname = "pyturbojpeg"; - version = "1.6.2"; + version = "1.6.3"; + format = "setuptools"; src = fetchPypi { pname = "PyTurboJPEG"; inherit version; - sha256 = "sha256-gOf/i2OyNtB3oIATXzijRUnhEaMlHRvwWXPguqHDG1A="; + sha256 = "sha256-5g9MQB7vpeuorVGExt0scHtLdrWlkuLOZMT38FhAsi4="; }; patches = [ @@ -34,7 +35,9 @@ buildPythonPackage rec { ${python.interpreter} -c 'from turbojpeg import TurboJPEG; TurboJPEG()' ''; - pythonImportsCheck = [ "turbojpeg" ]; + pythonImportsCheck = [ + "turbojpeg" + ]; meta = with lib; { description = "A Python wrapper of libjpeg-turbo for decoding and encoding JPEG image"; diff --git a/pkgs/development/python-modules/rdflib/default.nix b/pkgs/development/python-modules/rdflib/default.nix index 5f17bbd03c3ef..2ffe190a47206 100644 --- a/pkgs/development/python-modules/rdflib/default.nix +++ b/pkgs/development/python-modules/rdflib/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchPypi , html5lib @@ -47,6 +48,11 @@ buildPythonPackage rec { "test_bad_password" "test_service" "testGuessFormatForParse" + ] ++ lib.optional stdenv.isDarwin [ + # Require loopback network access + "test_sparqlstore" + "test_sparqlupdatestore_mock" + "TestGraphHTTP" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/streamz/default.nix b/pkgs/development/python-modules/streamz/default.nix index 2b327174524d6..ee96efe5e01f2 100644 --- a/pkgs/development/python-modules/streamz/default.nix +++ b/pkgs/development/python-modules/streamz/default.nix @@ -1,44 +1,39 @@ { lib , buildPythonPackage -, fetchPypi -, fetchpatch , confluent-kafka , distributed +, fetchPypi , flaky , graphviz , networkx -, pytest +, pytest-asyncio +, pytestCheckHook +, pythonOlder , requests , six , toolz , tornado , zict -, pythonOlder }: buildPythonPackage rec { pname = "streamz"; - version = "0.6.2"; + version = "0.6.3"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "04446ece273c041506b1642bd3d8380367a8372196be4d6d6d03faafadc590b2"; + sha256 = "sha256-0wZ1ldLFRAIL9R+gLfwsFbL+gvdORAkYWNjnDmeafm8="; }; - patches = [ - # Fix apply import from dask - (fetchpatch { - url = "https://patch-diff.githubusercontent.com/raw/python-streamz/streamz/pull/423.patch"; - sha256 = "sha256-CR+uRvzaFu9WQ633tbvX3gAnudhlVN6VvmxKiR37diw="; - }) - ]; - propagatedBuildInputs = [ networkx - tornado + six toolz + tornado zict - six ]; checkInputs = [ @@ -46,25 +41,31 @@ buildPythonPackage rec { distributed flaky graphviz - pytest + pytest-asyncio + pytestCheckHook requests ]; - disabled = pythonOlder "3.6"; + disabledTests = [ + # Disable test_tcp_async because fails on sandbox build + "test_partition_timeout" + "test_tcp_async" + "test_tcp" + ]; + + disabledTestPaths = [ + # Disable kafka tests + "streamz/tests/test_kafka.py" + ]; - # Disable test_tcp_async because fails on sandbox build - # disable kafka tests - checkPhase = '' - pytest --deselect=streamz/tests/test_sources.py::test_tcp_async \ - --deselect=streamz/tests/test_sources.py::test_tcp \ - --deselect=streamz/tests/test_core.py::test_partition_timeout \ - --ignore=streamz/tests/test_kafka.py - ''; + pythonImportsCheck = [ + "streamz" + ]; meta = with lib; { description = "Pipelines to manage continuous streams of data"; homepage = "https://github.com/python-streamz/streamz"; license = licenses.bsd3; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index c077265bf6321..e6c103651e363 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -283,6 +283,7 @@ let bazelBuildFlags = [ "--config=opt" # optimize using the flags set in the configure phase ] + ++ lib.optionals stdenv.cc.isClang [ "--cxxopt=-x" "--cxxopt=c++" "--host_cxxopt=-x" "--host_cxxopt=c++" ] ++ lib.optionals (mklSupport) [ "--config=mkl" ]; bazelTarget = "//tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/lib_package:libtensorflow"; diff --git a/pkgs/development/python-modules/types-requests/default.nix b/pkgs/development/python-modules/types-requests/default.nix index 05fb1b2b9f438..5070ebf988aef 100644 --- a/pkgs/development/python-modules/types-requests/default.nix +++ b/pkgs/development/python-modules/types-requests/default.nix @@ -5,11 +5,11 @@ buildPythonPackage rec { pname = "types-requests"; - version = "2.25.11"; + version = "2.25.12"; src = fetchPypi { inherit pname version; - sha256 = "sha256-snkoTlH2aOOO4S2WZeTXiQifUy3CoL5KFQjKDv2Yup4="; + sha256 = "sha256-BVhjwKrPj48pzSyg0zIO/fOfKOcd5o0yd2F1HS9iu1c="; }; # Modules doesn't have tests diff --git a/pkgs/development/python-modules/yamale/default.nix b/pkgs/development/python-modules/yamale/default.nix index f590e8d896c06..05958ab51125c 100644 --- a/pkgs/development/python-modules/yamale/default.nix +++ b/pkgs/development/python-modules/yamale/default.nix @@ -9,7 +9,8 @@ buildPythonPackage rec { pname = "yamale"; - version = "3.0.8"; + version = "4.0.2"; + format = "setuptools"; disabled = pythonOlder "3.6"; @@ -17,7 +18,7 @@ buildPythonPackage rec { owner = "23andMe"; repo = pname; rev = version; - sha256 = "0bn0himn5fwndaxn205s55bdc4np7lhd940i0lkv0m7ybhbw7dap"; + sha256 = "sha256-hFBU3o3HpL0Schgzcx3oYq0IAUVGKThIfEteYcFbLnk="; }; propagatedBuildInputs = [ @@ -29,7 +30,9 @@ buildPythonPackage rec { pytestCheckHook ]; - pythonImportsCheck = [ "yamale" ]; + pythonImportsCheck = [ + "yamale" + ]; meta = with lib; { description = "A schema and validator for YAML"; diff --git a/pkgs/development/python-modules/ytmusicapi/default.nix b/pkgs/development/python-modules/ytmusicapi/default.nix index 8bf781ef3a420..9a86075c790ec 100644 --- a/pkgs/development/python-modules/ytmusicapi/default.nix +++ b/pkgs/development/python-modules/ytmusicapi/default.nix @@ -1,19 +1,20 @@ { lib , buildPythonPackage -, isPy27 , fetchPypi +, pythonOlder , requests }: buildPythonPackage rec { pname = "ytmusicapi"; - version = "0.19.3"; + version = "0.19.4"; + format = "setuptools"; - disabled = isPy27; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "dfd0271f7177173cea9c255730151a10a2fe4a32f9accd2fe31e7645936c90c5"; + sha256 = "sha256-AAGUfa91f9aquPLQZs9kQDbZXrBrxjSBFdWIrxB5D/I="; }; propagatedBuildInputs = [ @@ -22,10 +23,12 @@ buildPythonPackage rec { doCheck = false; # requires network access - pythonImportsCheck = [ "ytmusicapi" ]; + pythonImportsCheck = [ + "ytmusicapi" + ]; meta = with lib; { - description = "Unofficial API for YouTube Music"; + description = "Python API for YouTube Music"; homepage = "https://github.com/sigma67/ytmusicapi"; license = licenses.mit; maintainers = with maintainers; [ dotlambda ]; |