diff options
Diffstat (limited to 'pkgs/development/python-modules')
120 files changed, 1154 insertions, 509 deletions
diff --git a/pkgs/development/python-modules/aesedb/default.nix b/pkgs/development/python-modules/aesedb/default.nix index 558cc2be80c..cb9db9a886f 100644 --- a/pkgs/development/python-modules/aesedb/default.nix +++ b/pkgs/development/python-modules/aesedb/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "aesedb"; - version = "0.0.7"; + version = "0.1.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-zDzTQ7drq2jFvTO170GKbY76HjnWcFbcw9YSfDnltGQ="; + hash = "sha256-TetXhDrWG6MECm/nhsZDUwcOJwP5drFO+YLarGC2pak="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/aioaladdinconnect/default.nix b/pkgs/development/python-modules/aioaladdinconnect/default.nix index 4bb6a930544..56298ca0b37 100644 --- a/pkgs/development/python-modules/aioaladdinconnect/default.nix +++ b/pkgs/development/python-modules/aioaladdinconnect/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "aioaladdinconnect"; - version = "0.1.43"; + version = "0.1.44"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "AIOAladdinConnect"; inherit version; - hash = "sha256-P0o8LhjTzhfJerunTcadvYQOZMd7WbfnKbeAEhXFP1Q="; + hash = "sha256-TtqCbU3NYrRy4upBOZNSC3+TrcBg4ol7JXqeOI6+IhA="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/airthings-ble/default.nix b/pkgs/development/python-modules/airthings-ble/default.nix index fbaae43b978..552ba149be9 100644 --- a/pkgs/development/python-modules/airthings-ble/default.nix +++ b/pkgs/development/python-modules/airthings-ble/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "airthings-ble"; - version = "0.3.0"; + version = "0.5.0"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "vincegio"; repo = pname; rev = "v${version}"; - hash = "sha256-E/+ObY/kO52J0nbyHGsBlqY5OYlnwf3ujAHEd1pEKvo="; + hash = "sha256-ihNy5Rme20fCO1tG7aqdVFhSF3DI9hAlge54+/nNGLs="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/asysocks/default.nix b/pkgs/development/python-modules/asysocks/default.nix index 4ad71306789..d03e5b9055b 100644 --- a/pkgs/development/python-modules/asysocks/default.nix +++ b/pkgs/development/python-modules/asysocks/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "asysocks"; - version = "0.1.7"; + version = "0.2.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-I9X8+ucadYJsPteHvZsbw7GJ7DdliWG86DyemUVeNUw="; + sha256 = "sha256-1mrXgwWI1XGmN3J9HJBktHFowIEU+RPt9L6S4ylHTzw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/boxx/default.nix b/pkgs/development/python-modules/boxx/default.nix index f8ab26fae17..469f2af96f7 100644 --- a/pkgs/development/python-modules/boxx/default.nix +++ b/pkgs/development/python-modules/boxx/default.nix @@ -12,7 +12,7 @@ , fn , pyopengl , seaborn -, pytorch +, torch , pythonOlder , torchvision }: @@ -43,7 +43,7 @@ buildPythonPackage rec { checkInputs = [ xvfb-run - pytorch + torch torchvision ]; diff --git a/pkgs/development/python-modules/bthome-ble/default.nix b/pkgs/development/python-modules/bthome-ble/default.nix index c2e26fcac44..268f5b2ca7b 100644 --- a/pkgs/development/python-modules/bthome-ble/default.nix +++ b/pkgs/development/python-modules/bthome-ble/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "bthome-ble"; - version = "0.4.0"; + version = "0.5.1"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = pname; rev = "v${version}"; - hash = "sha256-pL9b3ocjx81tU+U6C1kOe28HM23dsuE7hkoOUV4YBAQ="; + hash = "sha256-G3EZ23bpvt0HBjHtxJnpXgOzv+3/Rl8yWrVR5s3iZQA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/chex/default.nix b/pkgs/development/python-modules/chex/default.nix index 98598e4acf1..79eeb931997 100644 --- a/pkgs/development/python-modules/chex/default.nix +++ b/pkgs/development/python-modules/chex/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "chex"; - version = "0.1.3"; + version = "0.1.4"; format = "setuptools"; src = fetchFromGitHub { owner = "deepmind"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-oIdRh0WKzdvyCfcamKRDiMsV51b6rdmNYcELjDQKGX4="; + hash = "sha256-FiZElESyOVu1VJxUDNiN6HVADiaubDrGdQHYp2CN8f4="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/cloudscraper/default.nix b/pkgs/development/python-modules/cloudscraper/default.nix index 6f693f369cd..1d66da4e2bc 100644 --- a/pkgs/development/python-modules/cloudscraper/default.nix +++ b/pkgs/development/python-modules/cloudscraper/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "cloudscraper"; - version = "1.2.60"; + version = "1.2.64"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-DTQTsv/59895UTsMmqxYtSfFosUWPRx8wMT4zKHQ9Oc="; + hash = "sha256-FS+p+dtfGfStp+dWI+k/RdBb/T+ynZyuhPKRc6JZFTA="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/coinmetrics-api-client/default.nix b/pkgs/development/python-modules/coinmetrics-api-client/default.nix new file mode 100644 index 00000000000..5192ef131f5 --- /dev/null +++ b/pkgs/development/python-modules/coinmetrics-api-client/default.nix @@ -0,0 +1,42 @@ +{ buildPythonPackage, fetchPypi, lib, orjson, pandas, poetry-core +, pytestCheckHook, pytest-mock, pythonOlder, python-dateutil, requests, typer +, websocket-client }: + +buildPythonPackage rec { + pname = "coinmetrics-api-client"; + version = "2022.8.29.6"; + format = "pyproject"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-EPPRKOdFbLLYw0K5C4nojR8GueekoFW7xIlwKeSV1EY="; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + orjson python-dateutil requests typer websocket-client + ]; + + checkInputs = [ + pandas + pytestCheckHook + pytest-mock + ]; + + pythonImportsCheck = [ "coinmetrics.api_client" ]; + + passthru = { + optional-dependencies = { + pandas = [ pandas ]; + }; + }; + + meta = with lib; { + homepage = "https://coinmetrics.github.io/api-client-python/site/index.html"; + description = "Coin Metrics API v4 client library (Python)"; + license = licenses.mit; + maintainers = with maintainers; [ centromere ]; + }; +} diff --git a/pkgs/development/python-modules/coqui-trainer/default.nix b/pkgs/development/python-modules/coqui-trainer/default.nix index da8255a3b5a..d78a7b07088 100644 --- a/pkgs/development/python-modules/coqui-trainer/default.nix +++ b/pkgs/development/python-modules/coqui-trainer/default.nix @@ -6,7 +6,7 @@ , coqpit , fsspec -, pytorch-bin +, torch-bin , tensorboardx , protobuf @@ -17,7 +17,7 @@ let pname = "coqui-trainer"; - version = "0.0.13"; + version = "0.0.14"; in buildPythonPackage { inherit pname version; @@ -27,13 +27,13 @@ buildPythonPackage { owner = "coqui-ai"; repo = "Trainer"; rev = "refs/tags/v${version}"; - hash = "sha256-tRm/TElGjVTgCrI80wCt4F1hO82CsDPz2ynJzQKmbIs="; + hash = "sha256-WvJDGV7gmf/QQN3SswTq/ABy9ppPFi5xYnMeL/M7GxY="; }; propagatedBuildInputs = [ coqpit fsspec - pytorch-bin + torch-bin soundfile tensorboardx protobuf diff --git a/pkgs/development/python-modules/dash/default.nix b/pkgs/development/python-modules/dash/default.nix index 3d1fb2621d6..98ce06b8945 100644 --- a/pkgs/development/python-modules/dash/default.nix +++ b/pkgs/development/python-modules/dash/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { pname = "dash"; - version = "2.6.0"; + version = "2.6.1"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = "plotly"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-pZax5qkQ73SVhIKVR+q6xAm6hp+v7jSu6b9HBk5Rr8w="; + hash = "sha256-7RFRaGtgNULcPr9YYZsiVV3jSjyAamo8B2fwyqFKpis="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/databricks-cli/default.nix b/pkgs/development/python-modules/databricks-cli/default.nix index eafd7d2e8bc..190dac7fdc7 100644 --- a/pkgs/development/python-modules/databricks-cli/default.nix +++ b/pkgs/development/python-modules/databricks-cli/default.nix @@ -10,11 +10,11 @@ buildPythonPackage rec { pname = "databricks-cli"; - version = "0.17.1"; + version = "0.17.3"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ZfFcPfL/uqREwF8zK7KKuIn6wMnaGFOx6W/e/sPGnAw="; + sha256 = "sha256-LwDz5w6FmAnwWViF7Hb8c7pgrQzM1pVk999dlbbJAGY="; }; checkInputs = [ diff --git a/pkgs/development/python-modules/deal/default.nix b/pkgs/development/python-modules/deal/default.nix index 5f887848453..b9e050187db 100644 --- a/pkgs/development/python-modules/deal/default.nix +++ b/pkgs/development/python-modules/deal/default.nix @@ -6,16 +6,13 @@ , astroid , pytestCheckHook , docstring-parser -, isort , marshmallow -, pytest-cov , sphinx , hypothesis , vaa , deal-solver , pygments , typeguard -, coverage , urllib3 }: diff --git a/pkgs/development/python-modules/debian/default.nix b/pkgs/development/python-modules/debian/default.nix index 352779f13dd..9412e29fe5a 100644 --- a/pkgs/development/python-modules/debian/default.nix +++ b/pkgs/development/python-modules/debian/default.nix @@ -7,27 +7,32 @@ buildPythonPackage rec { pname = "python-debian"; - version = "0.1.44"; + version = "0.1.47"; + format = "setuptools"; disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ZVkv47ZPbGyT2U4tJZnbXgwigx07z/B8t7ltOECxMz4="; + hash = "sha256-UeICgjd3o9cWqEO4pUD7oroL7Z9QeofAwPnu/N7DNCw="; }; - propagatedBuildInputs = [ chardet ]; + propagatedBuildInputs = [ + chardet + ]; # No tests in archive doCheck = false; - pythonImportsCheck = [ "debian" ]; + pythonImportsCheck = [ + "debian" + ]; meta = with lib; { description = "Debian package related modules"; homepage = "https://salsa.debian.org/python-debian-team/python-debian"; changelog = "https://salsa.debian.org/python-debian-team/python-debian/-/blob/master/debian/changelog"; - license = licenses.gpl2; + license = licenses.gpl2Plus; maintainers = with maintainers; [ SuperSandro2000 ]; }; } diff --git a/pkgs/development/python-modules/deepwave/default.nix b/pkgs/development/python-modules/deepwave/default.nix index 0e5e9b45661..f69c386047d 100644 --- a/pkgs/development/python-modules/deepwave/default.nix +++ b/pkgs/development/python-modules/deepwave/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub -, pytorch +, torch , ninja , scipy , which @@ -48,7 +48,7 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; - propagatedBuildInputs = [ pytorch pybind11 ]; + propagatedBuildInputs = [ torch pybind11 ]; checkInputs = [ which diff --git a/pkgs/development/python-modules/dicom2nifti/default.nix b/pkgs/development/python-modules/dicom2nifti/default.nix index dd43902949a..0a934431330 100644 --- a/pkgs/development/python-modules/dicom2nifti/default.nix +++ b/pkgs/development/python-modules/dicom2nifti/default.nix @@ -1,9 +1,9 @@ { lib , buildPythonPackage , fetchFromGitHub -, isPy27 +, pythonOlder +, pytestCheckHook , gdcm -, nose , nibabel , numpy , pydicom @@ -13,21 +13,30 @@ buildPythonPackage rec { pname = "dicom2nifti"; - version = "2.3.0"; - disabled = isPy27; + version = "2.4.3"; + disabled = pythonOlder "3.6"; # no tests in PyPI dist src = fetchFromGitHub { owner = "icometrix"; repo = pname; rev = version; - sha256 = "sha256-QSu9CGXFjDpI25Cy6QSbrwiQ2bwsVezCUxSovRLs6AI="; + hash = "sha256-za2+HdnUhPu3+p29JsF4iL1lyPQVmEv3fam0Yf1oeMQ="; }; - propagatedBuildInputs = [ nibabel numpy pydicom scipy setuptools ]; + propagatedBuildInputs = [ gdcm nibabel numpy pydicom scipy setuptools ]; - checkInputs = [ nose gdcm ]; - checkPhase = "nosetests tests"; + # python-gdcm just builds the python interface provided by the "gdcm" package, so + # we should be able to replace "python-gdcm" with "gdcm" but this doesn't work + # (similar to https://github.com/NixOS/nixpkgs/issues/84774) + postPatch = '' + substituteInPlace setup.py --replace "python-gdcm" "" + substituteInPlace tests/test_generic.py --replace "from common" "from dicom2nifti.common" + ''; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "dicom2nifti" ]; meta = with lib; { homepage = "https://github.com/icometrix/dicom2nifti"; diff --git a/pkgs/development/python-modules/django-cacheops/default.nix b/pkgs/development/python-modules/django-cacheops/default.nix index bdb10688924..b8d76ebe7b4 100644 --- a/pkgs/development/python-modules/django-cacheops/default.nix +++ b/pkgs/development/python-modules/django-cacheops/default.nix @@ -5,6 +5,8 @@ , funcy , redis , six +, pytest-django +, pytestCheckHook }: buildPythonPackage rec { @@ -23,14 +25,33 @@ buildPythonPackage rec { six ]; - # tests need a redis server - # pythonImportsCheck not possible since DJANGO_SETTINGS_MODULE needs to be set - doCheck = false; + checkInputs = [ + pytestCheckHook + pytest-django + ]; + + disabledTests = [ + # Tests require networking + "test_cached_as" + "test_invalidation_signal" + "test_queryset" + "test_queryset_empty" + "test_lock" + "test_context_manager" + "test_decorator" + "test_in_transaction" + "test_nested" + "test_unhashable_args" + "test_db_agnostic_by_default" + "test_db_agnostic_disabled" + ]; + + DJANGO_SETTINGS_MODULE = "tests.settings"; meta = with lib; { description = "A slick ORM cache with automatic granular event-driven invalidation for Django"; homepage = "https://github.com/Suor/django-cacheops"; license = licenses.bsd3; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ onny ]; }; } diff --git a/pkgs/development/python-modules/doc8/default.nix b/pkgs/development/python-modules/doc8/default.nix index 97066662397..46d0db5e4a4 100644 --- a/pkgs/development/python-modules/doc8/default.nix +++ b/pkgs/development/python-modules/doc8/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "doc8"; - version = "0.11.2"; + version = "1.0.0"; format = "pyproject"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-w1ojH4jxXCBGWRVO09SZ+k1ALX5j1By6e1TPXmRhI6s="; + sha256 = "sha256-HpmaFP5BXqltidUFPHkNAQYfGbZzdwa4F9FXnCoHzBY="; }; nativeBuildInputs = [ @@ -52,6 +52,6 @@ buildPythonPackage rec { description = "Style checker for Sphinx (or other) RST documentation"; homepage = "https://github.com/pycqa/doc8"; license = licenses.asl20; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ onny ]; }; } diff --git a/pkgs/development/python-modules/edalize/default.nix b/pkgs/development/python-modules/edalize/default.nix new file mode 100644 index 00000000000..4e220ba6466 --- /dev/null +++ b/pkgs/development/python-modules/edalize/default.nix @@ -0,0 +1,73 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, coreutils +, jinja2 +, pandas +, pytestCheckHook +, which +, verilog +, yosys +}: + +buildPythonPackage rec { + pname = "edalize"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "olofk"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-fpUNCxW7+uymodJ/yGME9VNcCEZdBROIdT1+blpgkzA="; + }; + + postPatch = '' + substituteInPlace tests/test_edam.py \ + --replace /usr/bin/touch ${coreutils}/bin/touch + patchShebangs tests/mock_commands/vsim + ''; + + propagatedBuildInputs = [ jinja2 ]; + + checkInputs = [ + pytestCheckHook + pandas + which + yosys + verilog + ]; + + pythonImportsCheck = [ "edalize" ]; + + disabledTestPaths = [ + "tests/test_apicula.py" + "tests/test_ascentlint.py" + "tests/test_diamond.py" + "tests/test_gatemate.py" + "tests/test_ghdl.py" + "tests/test_icarus.py" + "tests/test_icestorm.py" + "tests/test_ise.py" + "tests/test_mistral.py" + "tests/test_openlane.py" + "tests/test_oxide.py" + "tests/test_quartus.py" + "tests/test_radiant.py" + "tests/test_spyglass.py" + "tests/test_symbiyosys.py" + "tests/test_trellis.py" + "tests/test_vcs.py" + "tests/test_veribleformat.py" + "tests/test_veriblelint.py" + "tests/test_vivado.py" + "tests/test_xcelium.py" + "tests/test_xsim.py" + ]; + + meta = with lib; { + description = "Abstraction library for interfacing EDA tools"; + homepage = "https://github.com/olofk/edalize"; + license = licenses.bsd2; + maintainers = [ maintainers.astro ]; + }; +} diff --git a/pkgs/development/python-modules/elegy/default.nix b/pkgs/development/python-modules/elegy/default.nix index a4d17a830e4..f4e3249755c 100644 --- a/pkgs/development/python-modules/elegy/default.nix +++ b/pkgs/development/python-modules/elegy/default.nix @@ -8,7 +8,7 @@ , lib , poetry , pytestCheckHook -, pytorch +, torch , pyyaml , sh , tables @@ -66,7 +66,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - pytorch + torch sh tensorflow ]; diff --git a/pkgs/development/python-modules/env-canada/default.nix b/pkgs/development/python-modules/env-canada/default.nix index 77ed6401f65..74b0fa28b6b 100644 --- a/pkgs/development/python-modules/env-canada/default.nix +++ b/pkgs/development/python-modules/env-canada/default.nix @@ -5,6 +5,7 @@ , geopy , imageio , lxml +, pandas , pillow , pytestCheckHook , python-dateutil @@ -14,7 +15,7 @@ buildPythonPackage rec { pname = "env-canada"; - version = "0.5.24"; + version = "0.5.25"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -23,7 +24,7 @@ buildPythonPackage rec { owner = "michaeldavie"; repo = "env_canada"; rev = "refs/tags/v${version}"; - sha256 = "sha256-R6X4TY0yrfSj30FXHmHHK6QBHAT3pb+UXjjZ3SW1SP8="; + sha256 = "sha256-UF04TAhgeb76bYisNYOAraw59K54WkX9a8QOtHywMTQ="; }; propagatedBuildInputs = [ @@ -31,6 +32,7 @@ buildPythonPackage rec { geopy imageio lxml + pandas pillow python-dateutil voluptuous diff --git a/pkgs/development/python-modules/ezyrb/default.nix b/pkgs/development/python-modules/ezyrb/default.nix index dc46bcfcd95..7730c1fe8e8 100644 --- a/pkgs/development/python-modules/ezyrb/default.nix +++ b/pkgs/development/python-modules/ezyrb/default.nix @@ -8,7 +8,7 @@ , scipy , matplotlib , scikit-learn -, pytorch +, torch , pytestCheckHook }: @@ -32,7 +32,7 @@ buildPythonPackage rec { scipy matplotlib scikit-learn - pytorch + torch ]; checkInputs = [ diff --git a/pkgs/development/python-modules/flax/default.nix b/pkgs/development/python-modules/flax/default.nix index 5eda127fb1c..ebdb3ac898a 100644 --- a/pkgs/development/python-modules/flax/default.nix +++ b/pkgs/development/python-modules/flax/default.nix @@ -1,6 +1,7 @@ { buildPythonPackage , fetchFromGitHub , jaxlib +, jax , keras , lib , matplotlib @@ -10,26 +11,40 @@ , pytest-xdist , pytestCheckHook , tensorflow +, fetchpatch +, rich }: buildPythonPackage rec { pname = "flax"; - version = "0.5.2"; + version = "0.6.0"; src = fetchFromGitHub { owner = "google"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-t24JZ08EmvuAINZC26OQI1icklUhUkfz6ZRKPr2COAw="; + sha256 = "sha256-egTYYFZxhE/Kk7jXRi1HmjCjyFia2LoRigH042isDu0="; }; + patches = [ + # Bump rich dependency, should be fixed in releases after 0.6.0 + # https://github.com/google/flax/pull/2407 + (fetchpatch { + url = "https://github.com/google/flax/commit/72189153f9779022b97858ae747c23fbaf571e3d.patch"; + sha256 = "sha256-hKOn/M7qpBM6R1RIJpnXpRoZgIHqkwQZApN4L0fBzIE="; + name = "bump_rich_dependency.patch"; + }) + ]; + buildInputs = [ jaxlib ]; propagatedBuildInputs = [ + jax matplotlib msgpack numpy optax + rich ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/flufl/lock.nix b/pkgs/development/python-modules/flufl/lock.nix index c2cc5723e4d..1cca2219a77 100644 --- a/pkgs/development/python-modules/flufl/lock.nix +++ b/pkgs/development/python-modules/flufl/lock.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "flufl.lock"; - version = "7.0"; + version = "7.1"; format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "sha256-FBX30Z2N2WpYJC4O+5DOPLGHf7VFB0rYwcrky3GR/gE="; + sha256 = "sha256-Qxt/6PZhKZIA/2elOLrJNxchgcHtOm76bSiTS0i4oSw="; }; nativeBuildInputs = [ pdm-pep517 ]; diff --git a/pkgs/development/python-modules/functorch/default.nix b/pkgs/development/python-modules/functorch/default.nix index 53860d2c2b4..033f0a3b4fd 100644 --- a/pkgs/development/python-modules/functorch/default.nix +++ b/pkgs/development/python-modules/functorch/default.nix @@ -5,7 +5,7 @@ , ninja , pytestCheckHook , python -, pytorch +, torch , pybind11 , which }: @@ -26,7 +26,7 @@ buildPythonPackage rec { # `setup.py` imports `torch.utils.cpp_extension`. nativeBuildInputs = [ ninja - pytorch + torch which ]; diff --git a/pkgs/development/python-modules/glances-api/default.nix b/pkgs/development/python-modules/glances-api/default.nix index 86e5e03387e..dd241d5ff82 100644 --- a/pkgs/development/python-modules/glances-api/default.nix +++ b/pkgs/development/python-modules/glances-api/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "glances-api"; - version = "0.4.0"; + version = "0.4.1"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "home-assistant-ecosystem"; repo = "python-glances-api"; rev = version; - sha256 = "sha256-T7Z+xipTuE7IE9v+ZmiMvP5g8a/MU0ExnaE11DRjvpM="; + sha256 = "sha256-IBEy19iouYAHIZwc/bnMgmHLrbfZjLni0Ne4o0I6FNg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/google-auth/default.nix b/pkgs/development/python-modules/google-auth/default.nix index 58056152a9c..8a4c8474adc 100644 --- a/pkgs/development/python-modules/google-auth/default.nix +++ b/pkgs/development/python-modules/google-auth/default.nix @@ -72,7 +72,8 @@ buildPythonPackage rec { responses urllib3 ] ++ passthru.optional-dependencies.aiohttp - ++ passthru.optional-dependencies.enterprise_cert + # `cryptography` is still required on `aarch64-darwin` for `tests/crypt/*` + ++ (if (stdenv.isDarwin && stdenv.isAarch64) then [ cryptography ] else passthru.optional-dependencies.enterprise_cert) ++ passthru.optional-dependencies.reauth; pythonImportsCheck = [ @@ -80,11 +81,12 @@ buildPythonPackage rec { "google.oauth2" ]; - disabledTestPaths = [ - # Disable tests related to pyopenssl + disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + # Disable tests using pyOpenSSL as it does not build on M1 Macs "tests/transport/test__mtls_helper.py" "tests/transport/test_requests.py" "tests/transport/test_urllib3.py" + "tests/transport/test__custom_tls_signer.py" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/google-cloud-compute/default.nix b/pkgs/development/python-modules/google-cloud-compute/default.nix new file mode 100644 index 00000000000..6607dde5255 --- /dev/null +++ b/pkgs/development/python-modules/google-cloud-compute/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, google-api-core +, mock +, proto-plus +, protobuf +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "google-cloud-compute"; + version = "1.4.0"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "0sgp0xa9cfmgyb1dwdy1f4q9dfr3lgsgm7vbiks9xmiaf0fr221m"; + }; + + propagatedBuildInputs = [ + google-api-core + proto-plus + protobuf + ]; + + checkInputs = [ + mock + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "google.cloud.compute" + "google.cloud.compute_v1" + ]; + + # disable tests that require credentials + disabledTestPaths = [ + "tests/system/test_addresses.py" + "tests/system/test_instance_group.py" + "tests/system/test_pagination.py" + "tests/system/test_smoke.py" + ]; + + meta = with lib; { + description = "API Client library for Google Cloud Compute"; + homepage = "https://github.com/googleapis/python-compute"; + license = licenses.asl20; + maintainers = with maintainers; [ jpetrucciani ]; + }; +} diff --git a/pkgs/development/python-modules/google-cloud-secret-manager/default.nix b/pkgs/development/python-modules/google-cloud-secret-manager/default.nix index 9246c8393ff..6bee80695f0 100644 --- a/pkgs/development/python-modules/google-cloud-secret-manager/default.nix +++ b/pkgs/development/python-modules/google-cloud-secret-manager/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "google-cloud-secret-manager"; - version = "2.12.3"; + version = "2.12.4"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-591Z/JIMwIwjhj4VKJKUztu2FMupdyUuKmxxUfK/TLE="; + hash = "sha256-nbM+uZr7a3RXvtLI7n5XZZD9r9ZVoh5iCSoZAnDIuQQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/google-cloud-securitycenter/default.nix b/pkgs/development/python-modules/google-cloud-securitycenter/default.nix index 67c60295c51..076be48781f 100644 --- a/pkgs/development/python-modules/google-cloud-securitycenter/default.nix +++ b/pkgs/development/python-modules/google-cloud-securitycenter/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "google-cloud-securitycenter"; - version = "1.13.0"; + version = "1.14.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-Jrd1ySx6n2ilUbObPrvsLOzUIUIGHeFQZTop8xbrAdY="; + hash = "sha256-VNvIt3WYMMXOMovJvbSwKU2/Xz8/F+BW0XoKdi0QSo0="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/hvplot/default.nix b/pkgs/development/python-modules/hvplot/default.nix index c39fc338a17..14d11af62e3 100644 --- a/pkgs/development/python-modules/hvplot/default.nix +++ b/pkgs/development/python-modules/hvplot/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "hvplot"; - version = "0.8.0"; + version = "0.8.1"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-hjDbo0lpsQXiZ8vhQjfi1W2ZacgBmArl5RkLwYsnktY="; + sha256 = "sha256-U93+BnQ8TVkk+x5ZdlW/oU6A/q9XpDi/0oRC02rHwrY="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/icontract/default.nix b/pkgs/development/python-modules/icontract/default.nix index 7b7d20ce17f..41bd796372d 100644 --- a/pkgs/development/python-modules/icontract/default.nix +++ b/pkgs/development/python-modules/icontract/default.nix @@ -15,11 +15,12 @@ , astor , numpy , asyncstdlib +, deal }: buildPythonPackage rec { pname = "icontract"; - version = "2.6.1"; + version = "2.6.2"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -27,7 +28,7 @@ buildPythonPackage rec { owner = "Parquery"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-QyuegyjVyRLQS0DjBJXpTDNeBM7LigGJ5cztVOO7e3Y="; + hash = "sha256-NUgMt/o9EpSQyOiAhYBVJtQKJn0Pd2lI45bKlo2z7mk="; }; preCheck = '' @@ -55,12 +56,10 @@ buildPythonPackage rec { astor numpy asyncstdlib + deal ]; disabledTestPaths = [ - # needs an old version of deal to comply with the tests - # see https://github.com/Parquery/icontract/issues/244 - "tests_with_others/test_deal.py" # mypy decorator checks don't pass. For some reaseon mypy # doesn't check the python file provided in the test. "tests/test_mypy_decorators.py" diff --git a/pkgs/development/python-modules/ignite/default.nix b/pkgs/development/python-modules/ignite/default.nix index 9898ef4b3d5..fae5a8abf03 100644 --- a/pkgs/development/python-modules/ignite/default.nix +++ b/pkgs/development/python-modules/ignite/default.nix @@ -8,7 +8,7 @@ , matplotlib , mock , packaging -, pytorch +, torch , scikit-learn , tqdm }: @@ -25,7 +25,7 @@ buildPythonPackage rec { }; checkInputs = [ pytestCheckHook matplotlib mock pytest-xdist torchvision ]; - propagatedBuildInputs = [ packaging pytorch scikit-learn tqdm ]; + propagatedBuildInputs = [ packaging torch scikit-learn tqdm ]; # runs succesfully in 3.9, however, async isn't correctly closed so it will fail after test suite. doCheck = pythonOlder "3.9"; diff --git a/pkgs/development/python-modules/ipydatawidgets/default.nix b/pkgs/development/python-modules/ipydatawidgets/default.nix index 6203d9a03ca..ef25868ea68 100644 --- a/pkgs/development/python-modules/ipydatawidgets/default.nix +++ b/pkgs/development/python-modules/ipydatawidgets/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "ipydatawidgets"; - version = "4.3.1.post1"; + version = "4.3.2"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "sha256-aYGrzNmmupSuf2FuGBqabaPrFUM+VrtfFAQeXBEaJR8="; + sha256 = "sha256-LyuZf2Vp0+4fT3412wyx2gjAd7IaiPHAHFn1uYajGqY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/itemloaders/default.nix b/pkgs/development/python-modules/itemloaders/default.nix index e6098208033..aa8d2acf1c9 100644 --- a/pkgs/development/python-modules/itemloaders/default.nix +++ b/pkgs/development/python-modules/itemloaders/default.nix @@ -11,20 +11,28 @@ buildPythonPackage rec { pname = "itemloaders"; - version = "1.0.4"; + version = "1.0.5"; + format = "setuptools"; + disabled = pythonOlder "3.6"; - # Tests not included in PyPI tarball src = fetchFromGitHub { owner = "scrapy"; repo = pname; rev = "v${version}"; - sha256 = "0j68xgx2z63sc1nc9clw6744036vfbijdsghvjv6pk674d5lgyam"; + hash = "sha256-ueq1Rsuae+wz4eFc1O7luBVR4XWGbefpDr124H6j56g="; }; - propagatedBuildInputs = [ w3lib parsel jmespath itemadapter ]; + propagatedBuildInputs = [ + w3lib + parsel + jmespath + itemadapter + ]; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ + pytestCheckHook + ]; disabledTests = [ # Test are failing (AssertionError: Lists differ: ...) @@ -32,12 +40,15 @@ buildPythonPackage rec { "test_nested_xpath" ]; - pythonImportsCheck = [ "itemloaders" ]; + pythonImportsCheck = [ + "itemloaders" + ]; meta = with lib; { description = "Base library for scrapy's ItemLoader"; homepage = "https://github.com/scrapy/itemloaders"; + changelog = "https://github.com/scrapy/itemloaders/raw/v${version}/docs/release-notes.rst"; license = licenses.bsd3; - maintainers = [ maintainers.marsam ]; + maintainers = with maintainers; [ marsam ]; }; } diff --git a/pkgs/development/python-modules/jax/cache-fix.patch b/pkgs/development/python-modules/jax/cache-fix.patch deleted file mode 100644 index 5db5319485f..00000000000 --- a/pkgs/development/python-modules/jax/cache-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/jax/experimental/compilation_cache/file_system_cache.py b/jax/experimental/compilation_cache/file_system_cache.py -index b85969de..92acd523 100644 ---- a/jax/experimental/compilation_cache/file_system_cache.py -+++ b/jax/experimental/compilation_cache/file_system_cache.py -@@ -33,6 +33,7 @@ class FileSystemCache(CacheInterface): - path_to_key = os.path.join(self._path, key) - if os.path.exists(path_to_key): - with open(path_to_key, "rb") as file: -+ os.utime(file.fileno()) - return file.read() - else: - return None diff --git a/pkgs/development/python-modules/jax/default.nix b/pkgs/development/python-modules/jax/default.nix index a302341c314..9970783aa3b 100644 --- a/pkgs/development/python-modules/jax/default.nix +++ b/pkgs/development/python-modules/jax/default.nix @@ -2,10 +2,11 @@ , absl-py , blas , buildPythonPackage +, etils , fetchFromGitHub -, fetchpatch , jaxlib , lapack +, matplotlib , numpy , opt-einsum , pytestCheckHook @@ -20,7 +21,7 @@ let in buildPythonPackage rec { pname = "jax"; - version = "0.3.6"; + version = "0.3.16"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -29,34 +30,25 @@ buildPythonPackage rec { owner = "google"; repo = pname; rev = "jax-v${version}"; - hash = "sha256-eGdAEZFHadNTHgciP4KMYHdwksz9g6un0Ar+A/KV5TE="; + hash = "sha256-4idh7boqBXSO9vEHxEcrzXjBIrKmmXiCf6cXh7En1/I="; }; - patches = [ - # See https://github.com/google/jax/issues/7944 - ./cache-fix.patch - - # See https://github.com/google/jax/issues/10292 - (fetchpatch { - url = "https://github.com/google/jax/commit/cadc8046d56e0c1433cf48a2f106947d5f4ecbfd.patch"; - hash = "sha256-jrpIqt4LzWAswt/Cpwtfa5d1Yn31HcXkVH3ETmaigA0="; - }) - ]; - # 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 + etils numpy opt-einsum scipy typing-extensions - ]; + ] ++ etils.optional-dependencies.epath; checkInputs = [ jaxlib + matplotlib pytestCheckHook pytest-xdist ]; diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index eee432f7185..456c9108593 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -9,11 +9,14 @@ , buildBazelPackage , buildPythonPackage , cctools +, curl , cython , fetchFromGitHub , git , IOKit , jsoncpp +, nsync +, openssl , pybind11 , setuptools , symlinkJoin @@ -50,7 +53,7 @@ let inherit (cudaPackages) cudatoolkit cudnn nccl; pname = "jaxlib"; - version = "0.3.0"; + version = "0.3.15"; meta = with lib; { description = "JAX is Autograd and XLA, brought together for high-performance machine learning research."; @@ -93,7 +96,7 @@ let owner = "google"; repo = "jax"; rev = "${pname}-v${version}"; - sha256 = "0ndpngx5k6lf6jqjck82bbp0gs943z0wh7vs9gwbyk2bw0da7w72"; + sha256 = "sha256-pIl7zzl82w5HHnJadH2vtCT4mYFd5YmM9iHC2GoJD6s="; }; nativeBuildInputs = [ @@ -103,15 +106,19 @@ let setuptools wheel which + ] ++ lib.optionals stdenv.isDarwin [ + cctools ]; buildInputs = [ + curl double-conversion giflib grpc jsoncpp libjpeg_turbo numpy + openssl pkgs.flatbuffers pkgs.protobuf pybind11 @@ -124,6 +131,8 @@ let cudnn ] ++ lib.optionals stdenv.isDarwin [ IOKit + ] ++ lib.optionals (!stdenv.isDarwin) [ + nsync ]; postPatch = '' @@ -149,6 +158,7 @@ let build --action_env=PYENV_ROOT build --python_path="${python}/bin/python" build --distinct_host_configuration=false + build --define PROTOBUF_INCLUDE_PATH="${pkgs.protobuf}/include" '' + lib.optionalString cudaSupport '' build --action_env CUDA_TOOLKIT_PATH="${cudatoolkit_joined}" build --action_env CUDNN_INSTALL_PATH="${cudnn}" @@ -163,7 +173,7 @@ let # Copy-paste from TF derivation. # Most of these are not really used in jaxlib compilation but it's simpler to keep it # 'as is' so that it's more compatible with TF derivation. - TF_SYSTEM_LIBS = lib.concatStringsSep "," [ + TF_SYSTEM_LIBS = lib.concatStringsSep "," ([ "absl_py" "astor_archive" "astunparse_archive" @@ -179,7 +189,6 @@ let "cython" "dill_archive" "double_conversion" - "enum34_archive" "flatbuffers" "functools32_archive" "gast_archive" @@ -190,11 +199,9 @@ let "libjpeg_turbo" "lmdb" "nasm" - # "nsync" # not packaged in nixpkgs "opt_einsum_archive" "org_sqlite" "pasta" - "pcre" "png" "pybind11" "six_archive" @@ -204,7 +211,9 @@ let "typing_extensions_archive" "wrapt" "zlib" - ]; + ] ++ lib.optionals (!stdenv.isDarwin) [ + "nsync" # fails to build on darwin + ]); # Make sure Bazel knows about our configuration flags during fetching so that the # relevant dependencies can be downloaded. @@ -226,9 +235,11 @@ let fetchAttrs = { sha256 = if cudaSupport then - "sha256-Ald+vplRx/DDG/7TfHAqD4Gktb1BGnf7FSCCJzSI0eo=" + "sha256-tdO4YjO985zbittb16RFWgxgUBrHYQfv5gRsA4IAkTk=" + else if stdenv.isDarwin then + "sha256-+XYxfXBCASueqDGg0Zqcmpf7zmemYM6xCE+x0rl3j34=" else - "sha256-eK5IjTAncDarkWYKnXrEo7kw7J7iOH7in2L2GabnFYo="; + "sha256-La1wC8X5aGK5mXvYy/kO8n4J+zaRZEc/DAX5zaH1D5A="; }; buildAttrs = { @@ -239,15 +250,10 @@ let # 2) Link protobuf from nixpkgs (through TF_SYSTEM_LIBS when using gcc) to prevent crashes on # loading multiple extensions in the same python program due to duplicate protobuf DBs. # 3) Patch python path in the compiler driver. - # 4) Patch tensorflow sources to work with later versions of protobuf. See - # https://github.com/google/jax/issues/9534. Note that this should be - # removed on the next release after 0.3.0. preBuild = '' - for src in ./jaxlib/*.{cc,h}; do + for src in ./jaxlib/*.{cc,h} ./jaxlib/cuda/*.{cc,h}; do sed -i 's@include/pybind11@pybind11@g' $src done - substituteInPlace ../output/external/org_tensorflow/tensorflow/compiler/xla/python/pprof_profile_builder.cc \ - --replace "status.message()" "std::string{status.message()}" '' + lib.optionalString cudaSupport '' patchShebangs ../output/external/org_tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl '' + lib.optionalString stdenv.isDarwin '' @@ -275,7 +281,7 @@ let }; platformTag = if stdenv.targetPlatform.isLinux then - "manylinux2010_${stdenv.targetPlatform.linuxArch}" + "manylinux2014_${stdenv.targetPlatform.linuxArch}" else if stdenv.system == "x86_64-darwin" then "macosx_10_9_${stdenv.targetPlatform.linuxArch}" else if stdenv.system == "aarch64-darwin" then @@ -306,6 +312,7 @@ buildPythonPackage { propagatedBuildInputs = [ absl-py + curl double-conversion flatbuffers giflib diff --git a/pkgs/development/python-modules/jc/default.nix b/pkgs/development/python-modules/jc/default.nix index be1262f1ca2..7cce5dca7aa 100644 --- a/pkgs/development/python-modules/jc/default.nix +++ b/pkgs/development/python-modules/jc/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "jc"; - version = "1.21.0"; + version = "1.21.2"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "kellyjonbrazil"; repo = pname; rev = "v${version}"; - sha256 = "sha256-kS42WokR7ZIqIPi8LbX4tmtjn37tckea2ELbuqzTm2o="; + sha256 = "sha256-gzxN2ZbnZw7EE5oVeSpugzl/paAbyKKQlxVs/8n3Hzw="; }; propagatedBuildInputs = [ ruamel-yaml xmltodict pygments ]; diff --git a/pkgs/development/python-modules/jellyfin-apiclient-python/default.nix b/pkgs/development/python-modules/jellyfin-apiclient-python/default.nix index 08eed6e941e..be848b65282 100644 --- a/pkgs/development/python-modules/jellyfin-apiclient-python/default.nix +++ b/pkgs/development/python-modules/jellyfin-apiclient-python/default.nix @@ -1,36 +1,42 @@ { lib , buildPythonPackage -, pythonOlder -, fetchPypi , certifi +, fetchPypi +, pythonOlder , requests -, six +, urllib3 , websocket-client }: buildPythonPackage rec { pname = "jellyfin-apiclient-python"; - version = "1.8.1"; + version = "1.9.1"; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "t2XmZ7rsrZq943lzRDrqzsY/djFNjFbkEYeHeA2AViI="; + hash = "sha256-fS+NQUTKNxHuE+qsV91mpTlYt7DfXQVsA9ybfLlHYtc="; }; propagatedBuildInputs = [ certifi requests - six + urllib3 websocket-client ]; - doCheck = false; # no tests - pythonImportsCheck = [ "jellyfin_apiclient_python" ]; + # Module has no test + doCheck = false; + + pythonImportsCheck = [ + "jellyfin_apiclient_python" + ]; meta = with lib; { - homepage = "https://github.com/jellyfin/jellyfin-apiclient-python"; description = "Python API client for Jellyfin"; + homepage = "https://github.com/jellyfin/jellyfin-apiclient-python"; license = licenses.gpl3Only; maintainers = with maintainers; [ jojosch ]; }; diff --git a/pkgs/development/python-modules/jmp/default.nix b/pkgs/development/python-modules/jmp/default.nix index 09c41a7eded..647cec6871c 100644 --- a/pkgs/development/python-modules/jmp/default.nix +++ b/pkgs/development/python-modules/jmp/default.nix @@ -15,8 +15,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "deepmind"; repo = pname; - rev = "4b94370b8de29b79d6f840b09d1990b91c1afddd"; - sha256 = "0hh4cmp93wjyidj48gh07vhx2kjvpwd23xvy79bsjn5qaaf6q4cm"; + rev = "260e5ba01f46b10c579a61393e6c7e546aeae93e"; + sha256 = "sha256-BTHy/jNf6LeV+x3GTI9MDBWLK6A5z2Z1TQyBkHMTeuE="; }; # Wheel requires only `numpy`, but the import needs `jax`. diff --git a/pkgs/development/python-modules/jupyterlab-git/default.nix b/pkgs/development/python-modules/jupyterlab-git/default.nix index 606e2226d22..3052167d1d3 100644 --- a/pkgs/development/python-modules/jupyterlab-git/default.nix +++ b/pkgs/development/python-modules/jupyterlab-git/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "jupyterlab-git"; - version = "0.37.1"; + version = "0.39.0"; disabled = pythonOlder "3.6"; src = fetchPypi { pname = "jupyterlab_git"; inherit version; - sha256 = "sha256-vOM2y8XrjmKtVtI6h4/DUrHzSLJuZXIm0C7//gMh+5o="; + sha256 = "sha256-2BMSbZ5ICISavg1JON7fiKd4e4vAyWW+geSgxbMowis="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/klaus/default.nix b/pkgs/development/python-modules/klaus/default.nix index dd57c835738..c0f077a283c 100644 --- a/pkgs/development/python-modules/klaus/default.nix +++ b/pkgs/development/python-modules/klaus/default.nix @@ -1,14 +1,14 @@ -{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, six, flask, pygments, dulwich, httpauth, humanize, pytest, requests, python-ctags3, mock }: +{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, flask, pygments, dulwich, httpauth, humanize, pytest, requests, python-ctags3, mock }: buildPythonPackage rec { pname = "klaus"; - version = "1.5.2"; + version = "2.0.0"; src = fetchFromGitHub { owner = "jonashaag"; repo = pname; rev = version; - sha256 = "12b96jgiv9y7zmkqqj3dh0fbbm3ps8gbqk925qrhh56zqjl66kx2"; + sha256 = "sha256-GyWlIFmP78t+cyPWjjB/EgA/L+2QqHPnmfJ64W5gsf8="; }; prePatch = '' @@ -17,7 +17,7 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ - six flask pygments dulwich httpauth humanize + flask pygments dulwich httpauth humanize ]; checkInputs = [ diff --git a/pkgs/development/python-modules/mailsuite/default.nix b/pkgs/development/python-modules/mailsuite/default.nix index 147686afb95..ff44629de9f 100644 --- a/pkgs/development/python-modules/mailsuite/default.nix +++ b/pkgs/development/python-modules/mailsuite/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "mailsuite"; - version = "1.9.5"; + version = "1.9.7"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-bvS+sH10LkQkH/nAGuk/rvPjPhaR/rArIf9W9CWjFMY="; + hash = "sha256-d96r712suiL4dSzT5vG/rD+4PInlvpuoAo3cedqVe+w="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/markdownify/default.nix b/pkgs/development/python-modules/markdownify/default.nix new file mode 100644 index 00000000000..7083f9514cd --- /dev/null +++ b/pkgs/development/python-modules/markdownify/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, beautifulsoup4 +, six +}: + +buildPythonPackage rec { + pname = "markdownify"; + version = "0.11.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-crOkiv/M8v7rJd/Tvsq67PU76vTgi+aNzthEcniDKBM="; + }; + + propagatedBuildInputs = [ beautifulsoup4 six ]; + checkInputs = [ pytestCheckHook ]; + + meta = with lib; { + description = "HTML to Markdown converter"; + homepage = "https://github.com/matthewwithanm/python-markdownify"; + license = licenses.mit; + maintainers = [ maintainers.McSinyx ]; + }; +} diff --git a/pkgs/development/python-modules/mathlibtools/default.nix b/pkgs/development/python-modules/mathlibtools/default.nix index be1df56206d..11e4b320728 100644 --- a/pkgs/development/python-modules/mathlibtools/default.nix +++ b/pkgs/development/python-modules/mathlibtools/default.nix @@ -1,25 +1,52 @@ -{ lib, buildPythonPackage, fetchPypi, PyGithub, GitPython, toml, click, tqdm, - networkx, pydot, pyyaml, atomicwrites }: +{ lib +, atomicwrites +, buildPythonPackage +, click +, fetchPypi +, GitPython +, networkx +, pydot +, PyGithub +, pythonOlder +, pyyaml +, toml +, tqdm +}: buildPythonPackage rec { pname = "mathlibtools"; - version = "1.1.1"; + version = "1.1.2"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-0iW7SWIxb+Ek4T26hru5EgBgXfqRh6zOR73GAgLFNyE="; + hash = "sha256-Jbnb3FKyB1NAehB8tZxBV6d7JJCOgWZPMWMaFEAOzkM="; }; propagatedBuildInputs = [ - PyGithub GitPython toml click tqdm networkx pydot pyyaml atomicwrites + atomicwrites + click + GitPython + networkx + pydot + PyGithub + pyyaml + toml + tqdm ]; - # requires internet access + # Requires internet access doCheck = false; + pythonImportsCheck = [ + "mathlibtools" + ]; + meta = with lib; { + description = "Supporting tool for Lean's mathlib"; homepage = "https://github.com/leanprover-community/mathlib-tools"; - description = "leanproject is a supporting tool for Lean's mathlib"; license = licenses.asl20; maintainers = with maintainers; [ gebner ]; }; diff --git a/pkgs/development/python-modules/minikerberos/default.nix b/pkgs/development/python-modules/minikerberos/default.nix index a6e9fd68c2b..ee9c657fe05 100644 --- a/pkgs/development/python-modules/minikerberos/default.nix +++ b/pkgs/development/python-modules/minikerberos/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "minikerberos"; - version = "0.2.20"; + version = "0.3.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-eJ+AImP6GIL3AbEj9u7ASLRc1zG/G1KIcABdrwdAIEc="; + hash = "sha256-wFz82EaxlzsrDVAenp+iomNUPXdisFL8gD/B3oSShqM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/monai/default.nix b/pkgs/development/python-modules/monai/default.nix index 83b55ad5584..82e984b8dfa 100644 --- a/pkgs/development/python-modules/monai/default.nix +++ b/pkgs/development/python-modules/monai/default.nix @@ -6,7 +6,7 @@ , ignite , numpy , pybind11 -, pytorch +, torch , which }: @@ -33,7 +33,7 @@ buildPythonPackage rec { nativeBuildInputs = [ ninja which ]; buildInputs = [ pybind11 ]; - propagatedBuildInputs = [ numpy pytorch ignite ]; + propagatedBuildInputs = [ numpy torch ignite ]; BUILD_MONAI = 1; diff --git a/pkgs/development/python-modules/online-judge-api-client/default.nix b/pkgs/development/python-modules/online-judge-api-client/default.nix index 81ca9bfaf42..fb8e70e8259 100644 --- a/pkgs/development/python-modules/online-judge-api-client/default.nix +++ b/pkgs/development/python-modules/online-judge-api-client/default.nix @@ -20,13 +20,13 @@ let pythonEnv = python.withPackages (ps: with ps; [ colorlog jinja2 markdown toml ]); in buildPythonPackage rec { pname = "online-judge-api-client"; - version = "10.10.0"; + version = "10.10.1"; src = fetchFromGitHub { owner = "online-judge-tools"; repo = "api-client"; - rev = "v${version}"; - sha256 = "0lmryqi0bv82v9k9kf1rzzq9zr83smpmy8ivzw4fk31hvpczp4fn"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-P0pIjd/YS155dSDpY/ekMp8HnJcM35waV7aoTQiEWHo="; }; patches = [ ./fix-paths.patch ]; diff --git a/pkgs/development/python-modules/oslo-db/default.nix b/pkgs/development/python-modules/oslo-db/default.nix index 7a393e69e74..6f50c4cbffb 100644 --- a/pkgs/development/python-modules/oslo-db/default.nix +++ b/pkgs/development/python-modules/oslo-db/default.nix @@ -16,12 +16,12 @@ buildPythonPackage rec { pname = "oslo-db"; - version = "12.0.0"; + version = "12.1.0"; src = fetchPypi { pname = "oslo.db"; inherit version; - sha256 = "sha256-EFuxQWOk7GG85z+N8ZADLIdZiJuA8B1ZrsdwR+cN24c="; + sha256 = "sha256-NekFa19t537lMlld8CX6iG4qstxIN4v11vTobdN8v3Y="; }; nativeBuildInputs = [ pbr ]; diff --git a/pkgs/development/python-modules/pallets-sphinx-themes/default.nix b/pkgs/development/python-modules/pallets-sphinx-themes/default.nix new file mode 100644 index 00000000000..463ba1c0667 --- /dev/null +++ b/pkgs/development/python-modules/pallets-sphinx-themes/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub, sphinx, packaging }: + +buildPythonPackage rec { + pname = "pallets-sphinx-themes"; + version = "2.0.2"; + + src = fetchFromGitHub { + owner = "pallets"; + repo = "pallets-sphinx-themes"; + rev = version; + sha256 = "0nvznv6abmkkda2fahydd4rykd94rmz74hx5aypv6j22zvf5pj8b"; + }; + + propagatedBuildInputs = [ packaging sphinx ]; + + pythonImportsCheck = [ "pallets_sphinx_themes" ]; + + doCheck = false; + + meta = with lib; { + homepage = "https://github.com/pallets/pallets-sphinx-themes"; + description = "Sphinx theme for Pallets projects"; + license = licenses.bsd3; + maintainers = with maintainers; [ kaction ]; + }; +} diff --git a/pkgs/development/python-modules/peaqevcore/default.nix b/pkgs/development/python-modules/peaqevcore/default.nix index 1987375f098..dfcfe87c9a9 100644 --- a/pkgs/development/python-modules/peaqevcore/default.nix +++ b/pkgs/development/python-modules/peaqevcore/default.nix @@ -6,14 +6,14 @@ buildPythonPackage rec { pname = "peaqevcore"; - version = "5.14.0"; + version = "5.18.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-YDdQ/q/QyR9vgY0jteAfQg6A4oCPKjFLySt/g74+eyw="; + hash = "sha256-LKb1sTekBbOKdsdxZbiAMAmOTjS21nvq7UWzVxEqJh0="; }; postPatch = '' diff --git a/pkgs/development/python-modules/pex/default.nix b/pkgs/development/python-modules/pex/default.nix index 1a1fa63ff48..5c880afcb3f 100644 --- a/pkgs/development/python-modules/pex/default.nix +++ b/pkgs/development/python-modules/pex/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "pex"; - version = "2.1.103"; + version = "2.1.104"; format = "flit"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-B7zWM2Jrf9bRjrDWMDrP0KT7yzFpLnN7FXlGJtqJa/A="; + hash = "sha256-ToDNuTNVKtjjaT/6KwQbjcNPr9SLcpQfabd64rxg8PA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/picobox/default.nix b/pkgs/development/python-modules/picobox/default.nix new file mode 100644 index 00000000000..6094b65efaa --- /dev/null +++ b/pkgs/development/python-modules/picobox/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, flask +, isPy27 +, pytestCheckHook +, pythonAtLeast +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "picobox"; + version = "2.2.0"; + + disabled = isPy27; + + src = fetchFromGitHub { + owner = "ikalnytskyi"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-B2A8GMhBFU/mb/JiiqtP+HvpPj5FYwaYO3gQN2QI6z0="; + }; + + patches = [ + (fetchpatch { + # already in master, but no new release yet. + # https://github.com/ikalnytskyi/picobox/issues/55 + url = "https://github.com/ikalnytskyi/picobox/commit/1fcc4a0c26a7cd50ee3ef6694139177b5dfb2be0.patch"; + hash = "sha256-/NIEzTFlZ5wG7jHT/YdySYoxT/UhSk29Up9/VqjG/jg="; + includes = [ + "tests/test_box.py" + "tests/test_stack.py" + ]; + }) + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; + + checkInputs = [ + flask + pytestCheckHook + ]; + + pythonImportsCheck = [ + "picobox" + ]; + + meta = with lib; { + description = "Opinionated dependency injection framework"; + homepage = "https://github.com/ikalnytskyi/picobox"; + license = licenses.mit; + maintainers = with maintainers; [ flokli ]; + }; +} diff --git a/pkgs/development/python-modules/plugwise/default.nix b/pkgs/development/python-modules/plugwise/default.nix index e09182db18c..61d07195ecb 100644 --- a/pkgs/development/python-modules/plugwise/default.nix +++ b/pkgs/development/python-modules/plugwise/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { pname = "plugwise"; - version = "0.21.3"; + version = "0.22.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = pname; repo = "python-plugwise"; rev = "refs/tags/v${version}"; - sha256 = "sha256-z/HSvk8fXPZmmx7lWaUMPfgT8EAmRn5sjRI+F4JKryw="; + sha256 = "sha256-cUPomT6vmJO+YjEzLOOZ6YIAaBmN1fTWNYwLji15B7o="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/psycopg/default.nix b/pkgs/development/python-modules/psycopg/default.nix index f2398238b28..a5fe3150d5d 100644 --- a/pkgs/development/python-modules/psycopg/default.nix +++ b/pkgs/development/python-modules/psycopg/default.nix @@ -32,13 +32,13 @@ let pname = "psycopg"; - version = "3.0.16"; + version = "3.1"; src = fetchFromGitHub { owner = "psycopg"; repo = pname; - rev = version; - hash = "sha256-jKhpmCcDi7FyMSpn51eSukFvmu3yacNovmRYG9jnu3g="; + rev = "refs/tags/${version}"; + hash = "sha256-N0Qc8pSWN2NFZn06lYZ7DKMbk6H8aIByS+wDnOQ/O+Y="; }; patches = [ @@ -192,6 +192,7 @@ buildPythonPackage rec { "tests/test_dns_srv.py" # Mypy typing test "tests/test_typing.py" + "tests/crdb/test_typing.py" ]; pytestFlagsArray = [ diff --git a/pkgs/development/python-modules/py-deprecate/default.nix b/pkgs/development/python-modules/py-deprecate/default.nix index ff921789bbf..86064dd0933 100644 --- a/pkgs/development/python-modules/py-deprecate/default.nix +++ b/pkgs/development/python-modules/py-deprecate/default.nix @@ -3,7 +3,6 @@ , fetchFromGitHub , pytestCheckHook , scikit-learn -, pytorch }: let diff --git a/pkgs/development/python-modules/pybase64/default.nix b/pkgs/development/python-modules/pybase64/default.nix index d4b67f2bb21..d16ff8e4ef3 100644 --- a/pkgs/development/python-modules/pybase64/default.nix +++ b/pkgs/development/python-modules/pybase64/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "pybase64"; - version = "1.2.2"; + version = "1.2.3"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-vv2YOlp7ZVE1W2q+VnI/f58SxYDgLxJreIOwdb6/8lw="; + sha256 = "sha256-dtB035p7mJs1iZJqsZRmd7uzmez+IwcUsTFX4mM2Ee0="; }; checkInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/pydata-sphinx-theme/default.nix b/pkgs/development/python-modules/pydata-sphinx-theme/default.nix index 4305b8aa67c..9ab1da97a57 100644 --- a/pkgs/development/python-modules/pydata-sphinx-theme/default.nix +++ b/pkgs/development/python-modules/pydata-sphinx-theme/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "pydata-sphinx-theme"; - version = "0.9.0"; + version = "0.10.1"; format = "wheel"; @@ -21,7 +21,7 @@ buildPythonPackage rec { dist = "py3"; python = "py3"; pname = "pydata_sphinx_theme"; - sha256 = "sha256-sitEKm1kN+Xq8KHwVxaf/LMeqp8Qvn1UgaEl5zXHHBI="; + sha256 = "sha256-RzH5N8f0L1Fukn1Svgo1ara5AWmK74MxsJfmxP2BAPQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pykostalpiko/default.nix b/pkgs/development/python-modules/pykostalpiko/default.nix index 1b36374b20b..13b67271bd5 100644 --- a/pkgs/development/python-modules/pykostalpiko/default.nix +++ b/pkgs/development/python-modules/pykostalpiko/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "pykostalpiko"; - version = "1.1.1-1"; + version = "1.1.2"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "Florian7843"; repo = pname; rev = "v${version}"; - hash = "sha256-0szkxR19iSWWpPAEo3wriMmI5TFI6YeYRTj86b4rKlU="; + hash = "sha256-kmzFsOgmMb8bOkulg7G6vXEPdb0xizh7u5LjnHfEWWQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pylibmc/default.nix b/pkgs/development/python-modules/pylibmc/default.nix index 039c793f20b..3cd7a05e54b 100644 --- a/pkgs/development/python-modules/pylibmc/default.nix +++ b/pkgs/development/python-modules/pylibmc/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "pylibmc"; - version = "1.6.2"; + version = "1.6.3"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-QatJ05VAdnN0iRvvC+tSkcqXvrcEi3r3dSEGSVPATcA="; + hash = "sha256-7vpGEVU3q61l++LgMqzRs0Y9m/njNa9LCRbfTk0yBuA="; }; buildInputs = [ diff --git a/pkgs/development/python-modules/pymanopt/default.nix b/pkgs/development/python-modules/pymanopt/default.nix index f0435759685..cc6cef77669 100644 --- a/pkgs/development/python-modules/pymanopt/default.nix +++ b/pkgs/development/python-modules/pymanopt/default.nix @@ -3,7 +3,7 @@ , buildPythonPackage , numpy , scipy -, pytorch +, torch , autograd , nose2 , matplotlib @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "sha256-dqyduExNgXIbEFlgkckaPfhLFSVLqPgwAOyBUdowwiQ="; }; - propagatedBuildInputs = [ numpy scipy pytorch ]; + propagatedBuildInputs = [ numpy scipy torch ]; checkInputs = [ nose2 autograd matplotlib tensorflow ]; checkPhase = '' diff --git a/pkgs/development/python-modules/pymicrobot/default.nix b/pkgs/development/python-modules/pymicrobot/default.nix index fe8c8db91b0..5def66a11ef 100644 --- a/pkgs/development/python-modules/pymicrobot/default.nix +++ b/pkgs/development/python-modules/pymicrobot/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "pymicrobot"; - version = "0.0.5"; + version = "0.0.6"; format = "setuptools"; disabled = pythonOlder "3.9"; @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "PyMicroBot"; inherit version; - hash = "sha256-k+xefVwswTL6ww0k4D6nScjUKUOxOQloXUOZ75S+sbY="; + hash = "sha256-BvxF/9bnA0oXCAXq1GXoR7AUnPF9hQLxmlOHxfYX+u8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pypdf2/default.nix b/pkgs/development/python-modules/pypdf2/default.nix index 037c0437ffc..d9522d63a74 100644 --- a/pkgs/development/python-modules/pypdf2/default.nix +++ b/pkgs/development/python-modules/pypdf2/default.nix @@ -10,11 +10,11 @@ buildPythonPackage rec { pname = "PyPDF2"; - version = "2.10.0"; + version = "2.10.4"; src = fetchPypi { inherit pname version; - sha256 = "sha256-smB4IGIhxkEeyXpaXAiXWuebp+xGdXXRFHepnM5gHrk="; + sha256 = "sha256-8JDF/HmQz1ptY2TOI2KDSXTjITbVIpG6uyNy5dZH0Yg="; }; LC_ALL = "en_US.UTF-8"; diff --git a/pkgs/development/python-modules/pyro-ppl/default.nix b/pkgs/development/python-modules/pyro-ppl/default.nix index 7bc6ac00925..b14119c3280 100644 --- a/pkgs/development/python-modules/pyro-ppl/default.nix +++ b/pkgs/development/python-modules/pyro-ppl/default.nix @@ -10,7 +10,7 @@ , pillow , pyro-api , pythonOlder -, pytorch +, torch , scikit-learn , seaborn , torchvision @@ -32,7 +32,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pyro-api - pytorch + torch networkx opt-einsum tqdm diff --git a/pkgs/development/python-modules/pyschemes/default.nix b/pkgs/development/python-modules/pyschemes/default.nix index c7034d11cdc..3b7eaa0da42 100644 --- a/pkgs/development/python-modules/pyschemes/default.nix +++ b/pkgs/development/python-modules/pyschemes/default.nix @@ -1,8 +1,8 @@ { lib , buildPythonPackage , fetchFromGitHub -, pythonAtLeast , pytestCheckHook +, fetchpatch }: buildPythonPackage rec { @@ -10,8 +10,6 @@ buildPythonPackage rec { version = "unstable-2017-11-08"; format = "setuptools"; - disabled = pythonAtLeast "3.10"; - src = fetchFromGitHub { owner = "spy16"; repo = pname; @@ -19,6 +17,14 @@ buildPythonPackage rec { hash = "sha256-PssucudvlE8mztwVme70+h+2hRW/ri9oV9IZayiZhdU="; }; + patches = [ + # Fix python 3.10 compatibility. Tracked upstream in + # https://github.com/spy16/pyschemes/pull/6 + (fetchpatch { + url = "https://github.com/spy16/pyschemes/commit/23011128c6c22838d4fca9e00fd322a20bb566c4.patch"; + sha256 = "sha256-vDaWxMrn2aC2wmd035EWRZ3cd/XME81z/BWG0f2T9jc="; + }) + ]; checkInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/python-gitlab/default.nix b/pkgs/development/python-modules/python-gitlab/default.nix index 21cb103df83..eb431698973 100644 --- a/pkgs/development/python-modules/python-gitlab/default.nix +++ b/pkgs/development/python-modules/python-gitlab/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "python-gitlab"; - version = "3.8.1"; + version = "3.9.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-4dslB2Ug4RjHwmvssNB0p6aBJ0OYcNQ7hjY0Igax4JE="; + sha256 = "sha256-X8Xoj4HzZuEYUcuLS5pbgnSRziC6dYVEa3TJsJdya6M="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/python-ironicclient/default.nix b/pkgs/development/python-modules/python-ironicclient/default.nix index 44c258675a7..5f0f1d8dea5 100644 --- a/pkgs/development/python-modules/python-ironicclient/default.nix +++ b/pkgs/development/python-modules/python-ironicclient/default.nix @@ -20,11 +20,11 @@ buildPythonApplication rec { pname = "python-ironicclient"; - version = "5.0.0"; + version = "5.0.1"; src = fetchPypi { inherit pname version; - sha256 = "sha256-mA8+4cvWhxPn7LGVcWvwxGRBnlM671YgFfE10zhVPtQ="; + sha256 = "sha256-7RawbJ5O5KCruD499fOkuFcouBzp3f7aEUnE37wJqmM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pytorch-lightning/default.nix b/pkgs/development/python-modules/pytorch-lightning/default.nix index b775f13fdac..a2d8da399d2 100644 --- a/pkgs/development/python-modules/pytorch-lightning/default.nix +++ b/pkgs/development/python-modules/pytorch-lightning/default.nix @@ -6,7 +6,7 @@ , fsspec , packaging , pytestCheckHook -, pytorch +, torch , pyyaml , tensorboard , torchmetrics @@ -29,7 +29,7 @@ buildPythonPackage rec { packaging future fsspec - pytorch + torch pyyaml tensorboard torchmetrics diff --git a/pkgs/development/python-modules/pytorch-metric-learning/default.nix b/pkgs/development/python-modules/pytorch-metric-learning/default.nix index 1c6b2d61ecb..27b97af42b0 100644 --- a/pkgs/development/python-modules/pytorch-metric-learning/default.nix +++ b/pkgs/development/python-modules/pytorch-metric-learning/default.nix @@ -5,7 +5,7 @@ , numpy , scikit-learn , pytestCheckHook -, pytorch +, torch , torchvision , tqdm , faiss @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - pytorch + torch scikit-learn torchvision tqdm diff --git a/pkgs/development/python-modules/pytorch-pfn-extras/default.nix b/pkgs/development/python-modules/pytorch-pfn-extras/default.nix index bb4765aa2ac..639c13508c5 100644 --- a/pkgs/development/python-modules/pytorch-pfn-extras/default.nix +++ b/pkgs/development/python-modules/pytorch-pfn-extras/default.nix @@ -5,7 +5,7 @@ , onnx , packaging , pytestCheckHook -, pytorch +, torch , torchvision , typing-extensions }: @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "sha256-w4WSEgNLdVLDnKS4kzJBK9BkrrGzbk2aCIhk4HCM/Bk="; }; - propagatedBuildInputs = [ numpy packaging pytorch typing-extensions ]; + propagatedBuildInputs = [ numpy packaging torch typing-extensions ]; checkInputs = [ onnx pytestCheckHook torchvision ]; diff --git a/pkgs/development/python-modules/pytorch/binary-hashes.nix b/pkgs/development/python-modules/pytorch/binary-hashes.nix deleted file mode 100644 index 945af484a4a..00000000000 --- a/pkgs/development/python-modules/pytorch/binary-hashes.nix +++ /dev/null @@ -1,66 +0,0 @@ -# Warning: use the same CUDA version as pytorch-bin. -# -# Precompiled wheels can be found at: -# https://download.pytorch.org/whl/torch_stable.html - -# To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows. - -version : builtins.getAttr version { - "1.11.0" = { - x86_64-linux-37 = { - name = "torch-1.11.0-cp37-cp37m-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp37-cp37m-linux_x86_64.whl"; - hash = "sha256-9WMzRw2uo8lweLN2B+ADXMz3L8XDb9hFRuGkuNmUTys="; - }; - x86_64-linux-38 = { - name = "torch-1.11.0-cp38-cp38-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl"; - hash = "sha256-tqeZvbbuPZFOXmK920J21KECSMGvTy0hdzjl+e4nSFs="; - }; - x86_64-linux-39 = { - name = "torch-1.11.0-cp39-cp39-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp39-cp39-linux_x86_64.whl"; - hash = "sha256-6RJrCl2VcEvuQKnQ7xy9gtjceGPkY4o3a+9wLf1lk3A="; - }; - x86_64-linux-310 = { - name = "torch-1.11.0-cp310-cp310-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp310-cp310-linux_x86_64.whl"; - hash = "sha256-powzZXpUYTHrm8ROKpjS+nBKr66GFGCwUbgoE4Usy0Q="; - }; - x86_64-darwin-37 = { - name = "torch-1.11.0-cp37-none-macosx_10_9_x86_64.whl"; - url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp37-none-macosx_10_9_x86_64.whl"; - hash = "sha256-aGCx0b8LsLZ6a9R/haDkyCW1GO6hO11hAZmdu8vVvAw="; - }; - x86_64-darwin-38 = { - name = "torch-1.11.0-cp38-none-macosx_10_9_x86_64.whl"; - url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp38-none-macosx_10_9_x86_64.whl"; - hash = "sha256-DMyFzQYiej7fgJ4seV/Vdiw9Too4tcn3RMbnz4QTYbs="; - }; - x86_64-darwin-39 = { - name = "torch-1.11.0-cp39-none-macosx_10_9_x86_64.whl"; - url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp39-none-macosx_10_9_x86_64.whl"; - hash = "sha256-UP2b+FxXjIccKPHLCs6d/GAkQBx/OZsXT7DzcImfRFQ="; - }; - x86_64-darwin-310 = { - name = "torch-1.11.0-cp310-none-macosx_10_9_x86_64.whl"; - url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp39-none-macosx_10_9_x86_64.whl"; - hash = "sha256-UP2b+FxXjIccKPHLCs6d/GAkQBx/OZsXT7DzcImfRFQ="; - }; - aarch64-darwin-38 = { - name = "torch-1.11.0-cp38-none-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp38-none-macosx_11_0_arm64.whl"; - hash = "sha256-wVVOSddPGyw+cgLXcFa6LddGVDdYW6xkBitYD3FKROk="; - }; - aarch64-darwin-39 = { - name = "torch-1.11.0-cp39-none-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp39-none-macosx_11_0_arm64.whl"; - hash = "sha256-DkivZq11Xw+cXyZkAopBT1fEnWrcN+d+Bv4ABNpO22E="; - }; - aarch64-darwin-310 = { - name = "torch-1.11.0-cp310-none-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp39-none-macosx_11_0_arm64.whl"; - hash = "sha256-DkivZq11Xw+cXyZkAopBT1fEnWrcN+d+Bv4ABNpO22E="; - }; - }; -} diff --git a/pkgs/development/python-modules/pytorch/breakpad-sigstksz.patch b/pkgs/development/python-modules/pytorch/breakpad-sigstksz.patch deleted file mode 100644 index 33a2304cb9b..00000000000 --- a/pkgs/development/python-modules/pytorch/breakpad-sigstksz.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/src/client/linux/handler/exception_handler.cc -index ca353c4099..499be0a986 100644 ---- a/third_party/breakpad/src/client/linux/handler/exception_handler.cc -+++ b/third_party/breakpad/src/client/linux/handler/exception_handler.cc -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ const unsigned kSigStackSize = std::max<unsigned>(16384, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. diff --git a/pkgs/development/python-modules/pyunifiprotect/default.nix b/pkgs/development/python-modules/pyunifiprotect/default.nix index 00721ea630a..a7ba5252b4b 100644 --- a/pkgs/development/python-modules/pyunifiprotect/default.nix +++ b/pkgs/development/python-modules/pyunifiprotect/default.nix @@ -22,6 +22,7 @@ , pytz , termcolor , typer +, ffmpeg }: buildPythonPackage rec { @@ -38,6 +39,13 @@ buildPythonPackage rec { hash = "sha256-q6fzP1wauwnRUByGc+EQ/vNJgoCWx22Qh2uZeUF4Abk="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov=pyunifiprotect --cov-append" "" + substituteInPlace setup.cfg \ + --replace "pydantic!=1.9.1" "pydantic" + ''; + propagatedBuildInputs = [ aiofiles aiohttp @@ -60,6 +68,7 @@ buildPythonPackage rec { }; checkInputs = [ + ffmpeg # Required for command ffprobe pytest-aiohttp pytest-asyncio pytest-benchmark @@ -68,13 +77,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "--cov=pyunifiprotect --cov-append" "" - substituteInPlace setup.cfg \ - --replace "pydantic!=1.9.1" "pydantic" - ''; - pythonImportsCheck = [ "pyunifiprotect" ]; @@ -83,11 +85,6 @@ buildPythonPackage rec { "--benchmark-disable" ]; - disabledTests = [ - # Tests require ffprobe - "test_get_camera_video" - ]; - meta = with lib; { description = "Library for interacting with the Unifi Protect API"; homepage = "https://github.com/briis/pyunifiprotect"; diff --git a/pkgs/development/python-modules/pywick/default.nix b/pkgs/development/python-modules/pywick/default.nix index 0db11576203..6cbb64845db 100644 --- a/pkgs/development/python-modules/pywick/default.nix +++ b/pkgs/development/python-modules/pywick/default.nix @@ -8,7 +8,7 @@ , pandas , pillow , six -, pytorch +, torch , torchvision , tqdm , lib @@ -28,7 +28,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - h5py hickle numpy pandas pillow six pytorch torchvision tqdm + h5py hickle numpy pandas pillow six torch torchvision tqdm ]; checkInputs = [ pytest ]; diff --git a/pkgs/development/python-modules/qiskit-machine-learning/default.nix b/pkgs/development/python-modules/qiskit-machine-learning/default.nix index c74e6c53bde..ea4ae3bb343 100644 --- a/pkgs/development/python-modules/qiskit-machine-learning/default.nix +++ b/pkgs/development/python-modules/qiskit-machine-learning/default.nix @@ -13,7 +13,7 @@ , sparse # Optional inputs , withTorch ? true -, pytorch +, torch # Check Inputs , pytestCheckHook , ddt @@ -41,7 +41,7 @@ buildPythonPackage rec { qiskit-terra scikit-learn sparse - ] ++ lib.optional withTorch pytorch; + ] ++ lib.optional withTorch torch; doCheck = false; # TODO: enable. Tests fail on unstable due to some multithreading issue? checkInputs = [ diff --git a/pkgs/development/python-modules/recordlinkage/default.nix b/pkgs/development/python-modules/recordlinkage/default.nix index b717d8a4c5b..2e0f03b8972 100644 --- a/pkgs/development/python-modules/recordlinkage/default.nix +++ b/pkgs/development/python-modules/recordlinkage/default.nix @@ -17,12 +17,12 @@ buildPythonPackage rec { pname = "recordlinkage"; - version = "0.14"; + version = "0.15"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-kuY2MUuwaLb228kwkJmOnnU+OolZcvGlhKTTiama+T4="; + sha256 = "sha256-aIrx54vnf85I/Kit/4njg/VIOu6H0SE7NdQ1GbeP8Cc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/rising/default.nix b/pkgs/development/python-modules/rising/default.nix index b68fedbcfc0..07fdad78aad 100644 --- a/pkgs/development/python-modules/rising/default.nix +++ b/pkgs/development/python-modules/rising/default.nix @@ -6,7 +6,7 @@ , pytest-cov , dill , numpy -, pytorch +, torch , threadpoolctl , tqdm }: @@ -24,7 +24,7 @@ buildPythonPackage rec { sha256 = "15wYWToXRae1cMpHWbJwzAp0THx6ED9ixQgL+n1v9PI="; }; - propagatedBuildInputs = [ numpy pytorch threadpoolctl tqdm ]; + propagatedBuildInputs = [ numpy torch threadpoolctl tqdm ]; checkInputs = [ dill pytest-cov pytestCheckHook ]; disabledTests = [ "test_affine" ]; # deprecated division operator '/' diff --git a/pkgs/development/python-modules/rsskey/default.nix b/pkgs/development/python-modules/rsskey/default.nix new file mode 100644 index 00000000000..7f230fa0c87 --- /dev/null +++ b/pkgs/development/python-modules/rsskey/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, feedparser +, httpx +, loca +, markdownify +, trio +}: + +buildPythonPackage rec { + pname = "rsskey"; + version = "0.2.0"; + format = "flit"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-QedLuwd0ES2LWhZ72Cjh3+ZZ7HbRyNsyLN9lNFbY5dQ="; + }; + + propagatedBuildInputs = [ + feedparser + httpx + loca + markdownify + trio + ]; + + doCheck = false; # upstream has no test + pythonImportsCheck = [ "rsskey" ]; + + meta = with lib; { + description = "RSS feed mirror on Misskey"; + homepage = "https://sr.ht/~cnx/rsskey"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ McSinyx ]; + }; +} diff --git a/pkgs/development/python-modules/sanic/22.3.2-CVE-2022-35920.patch b/pkgs/development/python-modules/sanic/22.3.2-CVE-2022-35920.patch new file mode 100644 index 00000000000..694c69602c1 --- /dev/null +++ b/pkgs/development/python-modules/sanic/22.3.2-CVE-2022-35920.patch @@ -0,0 +1,141 @@ +Based on upstream 9d415e4ec63d31b3749fd540e2c2ac7c98dedcdd and +2fa28f1711a8e59c6f4d3468e9c2f8b6991188a2, adjusted to apply to +v22.3.2, raise the same exception as before and not remove any +imports. + +diff --git a/sanic/mixins/routes.py b/sanic/mixins/routes.py +index 9e2cf96..e0cf86b 100644 +--- a/sanic/mixins/routes.py ++++ b/sanic/mixins/routes.py +@@ -3,7 +3,7 @@ from contextlib import suppress + from functools import partial, wraps + from inspect import getsource, signature + from mimetypes import guess_type +-from os import path ++from os import path, sep + from pathlib import PurePath + from re import sub + from textwrap import dedent +@@ -775,23 +775,23 @@ class RouteMixin(metaclass=SanicMeta): + content_type=None, + __file_uri__=None, + ): +- # Using this to determine if the URL is trying to break out of the path +- # served. os.path.realpath seems to be very slow +- if __file_uri__ and "../" in __file_uri__: +- raise InvalidUsage("Invalid URL") + # Merge served directory and requested file if provided +- # Strip all / that in the beginning of the URL to help prevent python +- # from herping a derp and treating the uri as an absolute path +- root_path = file_path = file_or_directory ++ root_path = file_path = path.abspath(unquote(file_or_directory)) ++ + if __file_uri__: +- file_path = path.join( +- file_or_directory, sub("^[/]*", "", __file_uri__) +- ) ++ # Strip all / that in the beginning of the URL to help prevent ++ # python from herping a derp and treating the uri as an ++ # absolute path ++ unquoted_file_uri = unquote(__file_uri__).lstrip("/") ++ ++ segments = unquoted_file_uri.split("/") ++ if ".." in segments or any(sep in segment for segment in segments): ++ raise InvalidUsage("Invalid URL") ++ ++ file_path = path.join(file_or_directory, unquoted_file_uri) ++ file_path = path.abspath(file_path) + +- # URL decode the path sent by the browser otherwise we won't be able to +- # match filenames which got encoded (filenames with spaces etc) +- file_path = path.abspath(unquote(file_path)) +- if not file_path.startswith(path.abspath(unquote(root_path))): ++ if not file_path.startswith(root_path): + error_logger.exception( + f"File not found: path={file_or_directory}, " + f"relative_url={__file_uri__}" +diff --git a/tests/test_static.py b/tests/test_static.py +index 36a98e1..aeb625b 100644 +--- a/tests/test_static.py ++++ b/tests/test_static.py +@@ -1,6 +1,7 @@ + import inspect + import logging + import os ++import sys + + from collections import Counter + from pathlib import Path +@@ -8,7 +9,7 @@ from time import gmtime, strftime + + import pytest + +-from sanic import text ++from sanic import Sanic, text + from sanic.exceptions import FileNotFound + + +@@ -21,6 +22,22 @@ def static_file_directory(): + return static_directory + + ++@pytest.fixture(scope="module") ++def double_dotted_directory_file(static_file_directory: str): ++ """Generate double dotted directory and its files""" ++ if sys.platform == "win32": ++ raise Exception("Windows doesn't support double dotted directories") ++ ++ file_path = Path(static_file_directory) / "dotted.." / "dot.txt" ++ double_dotted_dir = file_path.parent ++ Path.mkdir(double_dotted_dir, exist_ok=True) ++ with open(file_path, "w") as f: ++ f.write("DOT\n") ++ yield file_path ++ Path.unlink(file_path) ++ Path.rmdir(double_dotted_dir) ++ ++ + def get_file_path(static_file_directory, file_name): + return os.path.join(static_file_directory, file_name) + +@@ -578,3 +595,40 @@ def test_resource_type_dir(app, static_file_directory): + def test_resource_type_unknown(app, static_file_directory, caplog): + with pytest.raises(ValueError): + app.static("/static", static_file_directory, resource_type="unknown") ++ ++ ++@pytest.mark.skipif( ++ sys.platform == "win32", ++ reason="Windows does not support double dotted directories", ++) ++def test_dotted_dir_ok( ++ app: Sanic, static_file_directory: str, double_dotted_directory_file: Path ++): ++ app.static("/foo", static_file_directory) ++ dot_relative_path = str( ++ double_dotted_directory_file.relative_to(static_file_directory) ++ ) ++ _, response = app.test_client.get("/foo/" + dot_relative_path) ++ assert response.status == 200 ++ assert response.body == b"DOT\n" ++ ++ ++def test_breakout(app: Sanic, static_file_directory: str): ++ app.static("/foo", static_file_directory) ++ ++ _, response = app.test_client.get("/foo/..%2Fstatic/test.file") ++ assert response.status == 400 ++ ++ ++@pytest.mark.skipif( ++ sys.platform != "win32", reason="Block backslash on Windows only" ++) ++def test_double_backslash_prohibited_on_win32( ++ app: Sanic, static_file_directory: str ++): ++ app.static("/foo", static_file_directory) ++ ++ _, response = app.test_client.get("/foo/static/..\\static/test.file") ++ assert response.status == 400 ++ _, response = app.test_client.get("/foo/static\\../static/test.file") ++ assert response.status == 400 diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index 45dec876335..3959c3b7bd7 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -36,6 +36,10 @@ buildPythonPackage rec { hash = "sha256-4zdPp3X22dfZ5YlW3G5/OqeUxrt+NiFO9dk2XjEKXEg="; }; + patches = [ + ./22.3.2-CVE-2022-35920.patch + ]; + postPatch = '' # Loosen dependency requirements. substituteInPlace setup.py \ diff --git a/pkgs/development/python-modules/screeninfo/default.nix b/pkgs/development/python-modules/screeninfo/default.nix index 886854d1f2a..dc794513fc4 100644 --- a/pkgs/development/python-modules/screeninfo/default.nix +++ b/pkgs/development/python-modules/screeninfo/default.nix @@ -25,11 +25,14 @@ buildPythonApplication rec { dataclasses ]; - buildInputs = [ - libX11 - libXinerama - libXrandr - ]; + postPatch = '' + substituteInPlace screeninfo/enumerators/xinerama.py \ + --replace 'load_library("X11")' 'ctypes.cdll.LoadLibrary("${libX11}/lib/libX11.so")' \ + --replace 'load_library("Xinerama")' 'ctypes.cdll.LoadLibrary("${libXinerama}/lib/libXinerama.so")' + substituteInPlace screeninfo/enumerators/xrandr.py \ + --replace 'load_library("X11")' 'ctypes.cdll.LoadLibrary("${libX11}/lib/libX11.so")' \ + --replace 'load_library("Xrandr")' 'ctypes.cdll.LoadLibrary("${libXrandr}/lib/libXrandr.so")' + ''; checkInputs = [ pytestCheckHook diff --git a/pkgs/development/python-modules/sensor-state-data/default.nix b/pkgs/development/python-modules/sensor-state-data/default.nix index 986436cacbe..80755b26bcc 100644 --- a/pkgs/development/python-modules/sensor-state-data/default.nix +++ b/pkgs/development/python-modules/sensor-state-data/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "sensor-state-data"; - version = "2.3.2"; + version = "2.6.0"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -18,8 +18,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "Bluetooth-Devices"; repo = pname; - rev = "v${version}"; - hash = "sha256-aWmcAFBLb8YGmZo5xJl5mwYFg8U30pAyTsqte0BwzVg="; + rev = "refs/tags/v${version}"; + hash = "sha256-qu8dP0HAu6szL/GwfX6ar3P0No5HDBbULNWdjLaiLwc="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/skorch/default.nix b/pkgs/development/python-modules/skorch/default.nix index 0b2056979e4..a6508ded491 100644 --- a/pkgs/development/python-modules/skorch/default.nix +++ b/pkgs/development/python-modules/skorch/default.nix @@ -7,7 +7,7 @@ , flaky , numpy , pandas -, pytorch +, torch , scikit-learn , scipy , tabulate @@ -23,7 +23,7 @@ buildPythonPackage rec { sha256 = "b35cb4e50045742f0ffcfad33044af691d5d36b50212573753a804483a947ca9"; }; - propagatedBuildInputs = [ numpy pytorch scikit-learn scipy tabulate tqdm ]; + propagatedBuildInputs = [ numpy torch scikit-learn scipy tabulate tqdm ]; checkInputs = [ pytest pytest-cov flaky pandas pytestCheckHook ]; disabledTests = [ diff --git a/pkgs/development/python-modules/slicer/default.nix b/pkgs/development/python-modules/slicer/default.nix index 2033c94fefc..f5352c3de93 100644 --- a/pkgs/development/python-modules/slicer/default.nix +++ b/pkgs/development/python-modules/slicer/default.nix @@ -4,7 +4,7 @@ , isPy27 , pytestCheckHook , pandas -, pytorch +, torch , scipy }: @@ -18,7 +18,7 @@ buildPythonPackage rec { sha256 = "f5d5f7b45f98d155b9c0ba6554fa9770c6b26d5793a3e77a1030fb56910ebeec"; }; - checkInputs = [ pytestCheckHook pandas pytorch scipy ]; + checkInputs = [ pytestCheckHook pandas torch scipy ]; disabledTests = [ # IndexError: too many indices for array diff --git a/pkgs/development/python-modules/sorl_thumbnail/default.nix b/pkgs/development/python-modules/sorl_thumbnail/default.nix index 61150ac45bb..bc9c6fcba3a 100644 --- a/pkgs/development/python-modules/sorl_thumbnail/default.nix +++ b/pkgs/development/python-modules/sorl_thumbnail/default.nix @@ -7,12 +7,12 @@ buildPythonPackage rec { pname = "sorl-thumbnail"; - version = "12.8.0"; + version = "12.9.0"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "sha256-7io8nwuInlmRk4PTeB8TF9ycSSf7RLIvsUN/b+cFS5Y="; + sha256 = "sha256-DLwvUhUufyJm48LLSuXYOv0ulv1eHELlZnNiuqo9LbM="; }; nativeBuildInputs = [ setuptools-scm ]; diff --git a/pkgs/development/python-modules/spacy-transformers/default.nix b/pkgs/development/python-modules/spacy-transformers/default.nix index 93bd22f1f65..d21f5d17cd2 100644 --- a/pkgs/development/python-modules/spacy-transformers/default.nix +++ b/pkgs/development/python-modules/spacy-transformers/default.nix @@ -3,7 +3,7 @@ , fetchPypi , buildPythonPackage , dataclasses -, pytorch +, torch , pythonOlder , spacy , spacy-alignments @@ -24,7 +24,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - pytorch + torch spacy spacy-alignments srsly diff --git a/pkgs/development/python-modules/sphinx-mdinclude/default.nix b/pkgs/development/python-modules/sphinx-mdinclude/default.nix new file mode 100644 index 00000000000..246c30e7966 --- /dev/null +++ b/pkgs/development/python-modules/sphinx-mdinclude/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchpatch +, fetchPypi +, flit-core +, docutils +, mistune +, pygments +}: + +buildPythonPackage rec { + pname = "sphinx-mdinclude"; + version = "0.5.2"; + format = "flit"; + + src = fetchPypi { + pname = "sphinx_mdinclude"; + inherit version; + hash = "sha256-F7UVe1xNrz+vCbJOCxwyJQoxfwSCORW+qu9vDH7oEPc="; + }; + + nativeBuildInputs = [ flit-core ]; + propagatedBuildInputs = [ mistune docutils ]; + + checkInputs = [ pygments ]; + + meta = with lib; { + homepage = "https://github.com/miyakogi/m2r"; + description = "Sphinx extension for including or writing pages in Markdown format."; + longDescription = '' + A simple Sphinx extension that enables including Markdown documents from within + reStructuredText. + It provides the .. mdinclude:: directive, and automatically converts the content of + Markdown documents to reStructuredText format. + + sphinx-mdinclude is a fork of m2r and m2r2, focused only on providing a Sphinx extension. + ''; + license = licenses.mit; + maintainers = with maintainers; [ flokli ]; + }; +} diff --git a/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix b/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix index c85d967222e..1b4c5f11d11 100644 --- a/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix +++ b/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix @@ -1,26 +1,49 @@ { lib , buildPythonPackage -, fetchPypi +, deepmerge +, fetchFromGitHub +, fetchpatch , isPy27 , setuptools-scm -, m2r -, pyyaml , jsonschema +, picobox +, pyyaml +, sphinx-mdinclude , sphinxcontrib_httpdomain }: buildPythonPackage rec { pname = "sphinxcontrib-openapi"; - version = "0.7.0"; + version = "unstable-2022-08-26"; disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "1c1bd10d7653912c59a42f727c62cbb7b75f7905ddd9ccc477ebfd1bc69f0cf3"; + # Switch to Cilums' fork of openapi, which uses m2r instead of mdinclude, + # as m2r is unmaintained and incompatible with the version of mistune. + # See + # https://github.com/cilium/cilium/commit/b9862461568dd41d4dc8924711d4cc363907270b and + # https://github.com/cilium/openapi/commit/cd829a05caebd90b31e325d4c9c2714b459d135f + # for details. + # PR to switch upstream sphinx-contrib/openapi from m2r to sphinx-mdinclude: + # https://github.com/sphinx-contrib/openapi/pull/127 + # (once merged, we should switch away from that fork again) + src = fetchFromGitHub { + owner = "cilium"; + repo = "openapi"; + rev = "0ea3332fa6482114f1a8248a32a1eacb61aebb69"; + hash = "sha256-a/oVMg9gGTD+NClfpC2SpjbY/mIcZEVLLOR0muAg5zY="; }; nativeBuildInputs = [ setuptools-scm ]; - propagatedBuildInputs = [ pyyaml jsonschema m2r sphinxcontrib_httpdomain ]; + propagatedBuildInputs = [ + deepmerge + jsonschema + picobox + pyyaml + sphinx-mdinclude + sphinxcontrib_httpdomain + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; doCheck = false; @@ -28,6 +51,6 @@ buildPythonPackage rec { homepage = "https://github.com/ikalnytskyi/sphinxcontrib-openapi"; description = "OpenAPI (fka Swagger) spec renderer for Sphinx"; license = licenses.bsd0; + maintainers = [ maintainers.flokli ]; }; - } diff --git a/pkgs/development/python-modules/sqlite-utils/default.nix b/pkgs/development/python-modules/sqlite-utils/default.nix index fccbc4affab..982c015a6e1 100644 --- a/pkgs/development/python-modules/sqlite-utils/default.nix +++ b/pkgs/development/python-modules/sqlite-utils/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "sqlite-utils"; - version = "3.28"; + version = "3.29"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-eQsB9L4WwydWubXq4HtrfJBbZhPKU41kaHfFCwWwpTo="; + hash = "sha256-2eoQJqnAB6iVzdBKvcvjzSrANRXCouu62SM5OaoRH1s="; }; postPatch = '' diff --git a/pkgs/development/python-modules/stanza/default.nix b/pkgs/development/python-modules/stanza/default.nix index 808f90f2245..d9e44eea116 100644 --- a/pkgs/development/python-modules/stanza/default.nix +++ b/pkgs/development/python-modules/stanza/default.nix @@ -7,7 +7,7 @@ , protobuf , requests , six -, pytorch +, torch , tqdm }: @@ -30,7 +30,7 @@ buildPythonPackage rec { protobuf requests six - pytorch + torch tqdm ]; diff --git a/pkgs/development/python-modules/telethon/default.nix b/pkgs/development/python-modules/telethon/default.nix index 137f6b136a7..0dcf98d4183 100644 --- a/pkgs/development/python-modules/telethon/default.nix +++ b/pkgs/development/python-modules/telethon/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "telethon"; - version = "1.24.0"; + version = "1.25.0"; src = fetchPypi { inherit version; pname = "Telethon"; - sha256 = "818cb61281ed3f75ba4da9b68cb69486bed9474d2db4e0aa16e482053117452c"; + sha256 = "sha256-Z22XuSbm0w2+0x1sbmYRzeyfyCdZeFzqVcR3C3RhQpA="; }; patchPhase = '' diff --git a/pkgs/development/python-modules/tensorboardx/default.nix b/pkgs/development/python-modules/tensorboardx/default.nix index 93d94d0c382..4bc85a5cd08 100644 --- a/pkgs/development/python-modules/tensorboardx/default.nix +++ b/pkgs/development/python-modules/tensorboardx/default.nix @@ -10,7 +10,7 @@ , pillow , protobuf3_8 , pytestCheckHook -, pytorch +, torch , six , soundfile , tensorboard @@ -55,7 +55,7 @@ buildPythonPackage rec { moto pillow pytestCheckHook - pytorch + torch tensorboard torchvision ]; diff --git a/pkgs/development/python-modules/teslajsonpy/default.nix b/pkgs/development/python-modules/teslajsonpy/default.nix index c205d548f5e..6d506bc2079 100644 --- a/pkgs/development/python-modules/teslajsonpy/default.nix +++ b/pkgs/development/python-modules/teslajsonpy/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "teslajsonpy"; - version = "2.4.3"; + version = "2.4.4"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "zabuldon"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-S2myMuQq1a3IFGwRi2KqHDhyPyJNGNUH9Xp0mBZMNh8="; + sha256 = "sha256-MTVL/yDKCqeSdBe3opdor+aBfgsO/FgOq6jPcFEK5rY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/test-tube/default.nix b/pkgs/development/python-modules/test-tube/default.nix index 5eac0d60b6c..d480600b253 100644 --- a/pkgs/development/python-modules/test-tube/default.nix +++ b/pkgs/development/python-modules/test-tube/default.nix @@ -7,7 +7,7 @@ , imageio , numpy , pandas -, pytorch +, torch , tensorboard }: @@ -33,7 +33,7 @@ buildPythonPackage rec { imageio numpy pandas - pytorch + torch tensorboard ]; diff --git a/pkgs/development/python-modules/torch-tb-profiler/default.nix b/pkgs/development/python-modules/torch-tb-profiler/default.nix index 28439106136..41ff63a21fa 100644 --- a/pkgs/development/python-modules/torch-tb-profiler/default.nix +++ b/pkgs/development/python-modules/torch-tb-profiler/default.nix @@ -3,7 +3,7 @@ , lib , pandas , pytestCheckHook -, pytorch +, torch , tensorboard , torchvision }: @@ -27,7 +27,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pandas tensorboard ]; - checkInputs = [ pytestCheckHook pytorch torchvision ]; + checkInputs = [ pytestCheckHook torch torchvision ]; disabledTests = [ # Tests that attempt to access the filesystem in naughty ways. diff --git a/pkgs/development/python-modules/pytorch/bin.nix b/pkgs/development/python-modules/torch/bin.nix index e2427ac22df..ac83f101572 100644 --- a/pkgs/development/python-modules/pytorch/bin.nix +++ b/pkgs/development/python-modules/torch/bin.nix @@ -20,12 +20,12 @@ let pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion; srcs = import ./binary-hashes.nix version; unsupported = throw "Unsupported system"; - version = "1.11.0"; + version = "1.12.1"; in buildPythonPackage { inherit version; - pname = "pytorch"; - # Don't forget to update pytorch to the same version. + pname = "torch"; + # Don't forget to update torch to the same version. format = "wheel"; @@ -68,7 +68,7 @@ in buildPythonPackage { pythonImportsCheck = [ "torch" ]; meta = with lib; { - description = "Open source, prototype-to-production deep learning platform"; + description = "PyTorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration"; homepage = "https://pytorch.org/"; changelog = "https://github.com/pytorch/pytorch/releases/tag/v${version}"; # Includes CUDA and Intel MKL, but redistributions of the binary are not limited. diff --git a/pkgs/development/python-modules/torch/binary-hashes.nix b/pkgs/development/python-modules/torch/binary-hashes.nix new file mode 100644 index 00000000000..2169e1873b0 --- /dev/null +++ b/pkgs/development/python-modules/torch/binary-hashes.nix @@ -0,0 +1,66 @@ +# Warning: use the same CUDA version as torch-bin. +# +# Precompiled wheels can be found at: +# https://download.pytorch.org/whl/torch_stable.html + +# To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows. + +version : builtins.getAttr version { + "1.12.1" = { + x86_64-linux-37 = { + name = "torch-1.12.1-cp37-cp37m-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torch-1.12.1%2Bcu116-cp37-cp37m-linux_x86_64.whl"; + hash = "sha256-/JtHhuxUvmfqqLDHyZmeL0riuJocGOQd4VFaGQRAxpE="; + }; + x86_64-linux-38 = { + name = "torch-1.12.1-cp38-cp38-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torch-1.12.1%2Bcu116-cp38-cp38-linux_x86_64.whl"; + hash = "sha256-3aMSkBIgiVCHzIPTZlRko9wXHQRGDGHDGvRj77+1SJY="; + }; + x86_64-linux-39 = { + name = "torch-1.12.1-cp39-cp39-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torch-1.12.1%2Bcu116-cp39-cp39-linux_x86_64.whl"; + hash = "sha256-dyVCDavr/K9EmE7c4yg+6pH5jw99WHS8aMehZL2BJuM="; + }; + x86_64-linux-310 = { + name = "torch-1.12.1-cp310-cp310-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torch-1.12.1%2Bcu116-cp310-cp310-linux_x86_64.whl"; + hash = "sha256-trwxJEqigYkp+7MMSDwiHfRx6dhW6AXFof9ysTGunns="; + }; + x86_64-darwin-37 = { + name = "torch-1.12.1-cp37-none-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/cpu/torch-1.12.1-cp37-none-macosx_10_9_x86_64.whl"; + hash = "sha256-ijSi+7qgfJIeGyA/WdPW4A7TefKzhERXc70U4yiltsg="; + }; + x86_64-darwin-38 = { + name = "torch-1.12.1-cp38-none-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/cpu/torch-1.12.1-cp38-none-macosx_10_9_x86_64.whl"; + hash = "sha256-qDILqa2H6AylpqAW5GraTRugxUYm4TXZmyEppFQcUJ0="; + }; + x86_64-darwin-39 = { + name = "torch-1.12.1-cp39-none-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/cpu/torch-1.12.1-cp39-none-macosx_10_9_x86_64.whl"; + hash = "sha256-v+woQ9qmVPBP2iO6gjrwPntvdlCoc823JnUtDjcY2to="; + }; + x86_64-darwin-310 = { + name = "torch-1.12.1-cp310-none-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/cpu/torch-1.12.1-cp310-none-macosx_10_9_x86_64.whl"; + hash = "sha256-l2w/mXzqOO6RoN08OkIyJ4VBR0jRdh75JreJ36l8YTQ="; + }; + aarch64-darwin-38 = { + name = "torch-1.12.1-cp38-none-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torch-1.12.1-cp38-none-macosx_11_0_arm64.whl"; + hash = "sha256-A+McN3Edss0gHgLeWCbeh1Up5FpVYx0xeq3OLx7UWqg="; + }; + aarch64-darwin-39 = { + name = "torch-1.12.1-cp39-none-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torch-1.12.1-cp39-none-macosx_11_0_arm64.whl"; + hash = "sha256-af4srnw5zK3WWhI3k9MODbiB8cGSeUVRnFwXMjExQ34="; + }; + aarch64-darwin-310 = { + name = "torch-1.12.1-cp310-none-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torch-1.12.1-cp310-none-macosx_11_0_arm64.whl"; + hash = "sha256-aBBORxWlXEuymoXGqNV9gg4HV9o2O+G6aA+ozFvhe1I="; + }; + }; +} diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/torch/default.nix index 76a83591039..672fcf75d33 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -120,33 +120,28 @@ let "LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH "; in buildPythonPackage rec { - pname = "pytorch"; - # Don't forget to update pytorch-bin to the same version. - version = "1.11.0"; + pname = "torch"; + # Don't forget to update torch-bin to the same version. + version = "1.12.1"; format = "setuptools"; disabled = pythonOlder "3.7.0"; outputs = [ - "out" # output standard python package - "dev" # output libtorch headers - "lib" # output libtorch libraries + "out" # output standard python package + "dev" # output libtorch headers + "lib" # output libtorch libraries ]; src = fetchFromGitHub { - owner = "pytorch"; - repo = "pytorch"; - rev = "v${version}"; + owner = "pytorch"; + repo = "pytorch"; + rev = "refs/tags/v${version}"; fetchSubmodules = true; - sha256 = "sha256-CEu63tdRBAF8CTchO3Qu8gUNObQylX6U08yDTI4/c/0="; + hash = "sha256-8378BVOBFCRYRG1+yIYFSPKmb1rFOLgR+8pNZKt9NfI="; }; - patches = [ - # Fix for a breakpad incompatibility with glibc>2.33 - # https://github.com/pytorch/pytorch/issues/70297 - # https://github.com/google/breakpad/commit/605c51ed96ad44b34c457bbca320e74e194c317e - ./breakpad-sigstksz.patch - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ # pthreadpool added support for Grand Central Dispatch in April # 2020. However, this relies on functionality (DISPATCH_APPLY_AUTO) # that is available starting with macOS 10.13. However, our current @@ -208,7 +203,7 @@ in buildPythonPackage rec { PYTORCH_BUILD_VERSION = version; PYTORCH_BUILD_NUMBER = 0; - USE_SYSTEM_NCCL=setBool useSystemNccl; # don't build pytorch's third_party NCCL + USE_SYSTEM_NCCL = setBool useSystemNccl; # don't build pytorch's third_party NCCL # Suppress a weird warning in mkl-dnn, part of ideep in pytorch # (upstream seems to have fixed this in the wrong place?) @@ -243,15 +238,17 @@ in buildPythonPackage rec { pillow six future tensorboard protobuf ] ++ lib.optionals MPISupport [ mpi ]; - checkInputs = [ hypothesis ninja psutil ]; - # Tests take a long time and may be flaky, so just sanity-check imports doCheck = false; + pythonImportsCheck = [ "torch" ]; + checkInputs = [ hypothesis ninja psutil ]; + checkPhase = with lib.versions; with lib.strings; concatStringsSep " " [ + "runHook preCheck" cudaStubEnv "${python.interpreter} test/run_test.py" "--exclude" @@ -264,13 +261,15 @@ in buildPythonPackage rec { # tensorboard has acceptable failures for pytorch 1.3.x due to dependencies on tensorboard-plugins (optionalString (majorMinor version == "1.3" ) "tensorboard") ]) + "runHook postCheck" ]; + postInstall = '' find "$out/${python.sitePackages}/torch/include" "$out/${python.sitePackages}/torch/lib" -type f -exec remove-references-to -t ${stdenv.cc} '{}' + mkdir $dev cp -r $out/${python.sitePackages}/torch/include $dev/include - cp -r $out/${python.sitePackages}/torch/share $dev/share + cp -r $out/${python.sitePackages}/torch/share $dev/share # Fix up library paths for split outputs substituteInPlace \ @@ -282,7 +281,7 @@ in buildPythonPackage rec { --replace \''${_IMPORT_PREFIX}/lib "$lib/lib" mkdir $lib - mv $out/${python.sitePackages}/torch/lib $lib/lib + mv $out/${python.sitePackages}/torch/lib $lib/lib ln -s $lib/lib $out/${python.sitePackages}/torch/lib ''; @@ -312,11 +311,12 @@ in buildPythonPackage rec { }; meta = with lib; { - description = "Open source, prototype-to-production deep learning platform"; - homepage = "https://pytorch.org/"; - license = licenses.bsd3; + changelog = "https://github.com/pytorch/pytorch/releases/tag/v${version}"; + # keep PyTorch in the description so the package can be found under that name on search.nixos.org + description = "PyTorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration"; + homepage = "https://pytorch.org/"; + license = licenses.bsd3; maintainers = with maintainers; [ teh thoughtpolice tscholak ]; # tscholak esp. for darwin-related builds - platforms = with platforms; linux ++ lib.optionals (!cudaSupport) darwin; - broken = stdenv.isLinux && stdenv.isAarch64; + platforms = with platforms; linux ++ lib.optionals (!cudaSupport) darwin; }; } diff --git a/pkgs/development/python-modules/pytorch/prefetch.sh b/pkgs/development/python-modules/torch/prefetch.sh index 31aae438dc5..78151ae787a 100755 --- a/pkgs/development/python-modules/pytorch/prefetch.sh +++ b/pkgs/development/python-modules/torch/prefetch.sh @@ -5,14 +5,15 @@ set -eou pipefail version=$1 -linux_bucket="https://download.pytorch.org/whl/cu113" +linux_cuda_version="cu116" +linux_bucket="https://download.pytorch.org/whl/${linux_cuda_version}" darwin_bucket="https://download.pytorch.org/whl/cpu" url_and_key_list=( - "x86_64-linux-37 $linux_bucket/torch-${version}%2Bcu113-cp37-cp37m-linux_x86_64.whl torch-${version}-cp37-cp37m-linux_x86_64.whl" - "x86_64-linux-38 $linux_bucket/torch-${version}%2Bcu113-cp38-cp38-linux_x86_64.whl torch-${version}-cp38-cp38-linux_x86_64.whl" - "x86_64-linux-39 $linux_bucket/torch-${version}%2Bcu113-cp39-cp39-linux_x86_64.whl torch-${version}-cp39-cp39-linux_x86_64.whl" - "x86_64-linux-310 $linux_bucket/torch-${version}%2Bcu113-cp310-cp310-linux_x86_64.whl torch-${version}-cp310-cp310-linux_x86_64.whl" + "x86_64-linux-37 $linux_bucket/torch-${version}%2B${linux_cuda_version}-cp37-cp37m-linux_x86_64.whl torch-${version}-cp37-cp37m-linux_x86_64.whl" + "x86_64-linux-38 $linux_bucket/torch-${version}%2B${linux_cuda_version}-cp38-cp38-linux_x86_64.whl torch-${version}-cp38-cp38-linux_x86_64.whl" + "x86_64-linux-39 $linux_bucket/torch-${version}%2B${linux_cuda_version}-cp39-cp39-linux_x86_64.whl torch-${version}-cp39-cp39-linux_x86_64.whl" + "x86_64-linux-310 $linux_bucket/torch-${version}%2B${linux_cuda_version}-cp310-cp310-linux_x86_64.whl torch-${version}-cp310-cp310-linux_x86_64.whl" "x86_64-darwin-37 $darwin_bucket/torch-${version}-cp37-none-macosx_10_9_x86_64.whl torch-${version}-cp37-none-macosx_10_9_x86_64.whl" "x86_64-darwin-38 $darwin_bucket/torch-${version}-cp38-none-macosx_10_9_x86_64.whl torch-${version}-cp38-none-macosx_10_9_x86_64.whl" "x86_64-darwin-39 $darwin_bucket/torch-${version}-cp39-none-macosx_10_9_x86_64.whl torch-${version}-cp39-none-macosx_10_9_x86_64.whl" diff --git a/pkgs/development/python-modules/pytorch/pthreadpool-disable-gcd.diff b/pkgs/development/python-modules/torch/pthreadpool-disable-gcd.diff index eddd45723f8..eddd45723f8 100644 --- a/pkgs/development/python-modules/pytorch/pthreadpool-disable-gcd.diff +++ b/pkgs/development/python-modules/torch/pthreadpool-disable-gcd.diff diff --git a/pkgs/development/python-modules/torchaudio/bin.nix b/pkgs/development/python-modules/torchaudio/bin.nix index 42558837bc0..7388bbc7d26 100644 --- a/pkgs/development/python-modules/torchaudio/bin.nix +++ b/pkgs/development/python-modules/torchaudio/bin.nix @@ -7,14 +7,14 @@ , isPy39 , isPy310 , python -, pytorch-bin +, torch-bin , pythonOlder , pythonAtLeast }: buildPythonPackage rec { pname = "torchaudio"; - version = "0.11.0"; + version = "0.12.1"; format = "wheel"; src = @@ -26,7 +26,7 @@ buildPythonPackage rec { disabled = !(isPy37 || isPy38 || isPy39 || isPy310); propagatedBuildInputs = [ - pytorch-bin + torch-bin ]; # The wheel-binary is not stripped to avoid the error of `ImportError: libtorch_cuda_cpp.so: ELF load command address/offset not properly aligned.`. @@ -38,7 +38,7 @@ buildPythonPackage rec { # Note: after patchelf'ing, libcudart can still not be found. However, this should # not be an issue, because PyTorch is loaded before torchvision and brings # in the necessary symbols. - patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}:${pytorch-bin}/${python.sitePackages}/torch/lib:" \ + patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}:${torch-bin}/${python.sitePackages}/torch/lib:" \ "$out/${python.sitePackages}/torchaudio/_torchaudio.so" ''; diff --git a/pkgs/development/python-modules/torchaudio/binary-hashes.nix b/pkgs/development/python-modules/torchaudio/binary-hashes.nix index 70ae3357221..8731c63787c 100644 --- a/pkgs/development/python-modules/torchaudio/binary-hashes.nix +++ b/pkgs/development/python-modules/torchaudio/binary-hashes.nix @@ -1,4 +1,4 @@ -# Warning: Need to update at the same time as pytorch-bin +# Warning: Need to update at the same time as torch-bin # # Precompiled wheels can be found at: # https://download.pytorch.org/whl/torch_stable.html @@ -6,61 +6,61 @@ # To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows. version : builtins.getAttr version { - "0.11.0" = { + "0.12.1" = { x86_64-linux-37 = { - name = "torchaudio-0.11.0-cp37-cp37m-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp37-cp37m-linux_x86_64.whl"; - hash = "sha256-AdqgntXh2rTD7rBePshFAQ2tVl7b+734wG4r471/Y2U="; + name = "torchaudio-0.12.1-cp37-cp37m-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torchaudio-0.12.1%2Bcu116-cp37-cp37m-linux_x86_64.whl"; + hash = "sha256-8Z72lazhnV2ZBtnvpdm5ZHhiyE/wHwEpQ9UzZoi//mw="; }; x86_64-linux-38 = { - name = "torchaudio-0.11.0-cp38-cp38-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl"; - hash = "sha256-zuCHDpz3bkOUjYWprqX9VXoUbXfR8Vhdf1VFfOUg8z4="; + name = "torchaudio-0.12.1-cp38-cp38-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torchaudio-0.12.1%2Bcu116-cp38-cp38-linux_x86_64.whl"; + hash = "sha256-CCtZ6eUhs/6kaoU0HwDDaK4JTSFKkVJF+OMAu368Zno="; }; x86_64-linux-39 = { - name = "torchaudio-0.11.0-cp39-cp39-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp39-cp39-linux_x86_64.whl"; - hash = "sha256-btI9TpsOjeLnIz6J56avNv4poJTpXjjhDbMy6+ZFQvI="; + name = "torchaudio-0.12.1-cp39-cp39-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torchaudio-0.12.1%2Bcu116-cp39-cp39-linux_x86_64.whl"; + hash = "sha256-pNa5fV9vC1cXeDLhHTCscO7RO2lst2Vmm0K7NzINqgw="; }; x86_64-linux-310 = { - name = "torchaudio-0.11.0-cp310-cp310-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp310-cp310-linux_x86_64.whl"; - hash = "sha256-Zk+AWytEXfJ+HM69BAPhVsvN6pgQwC6uaW7Xux2row4="; + name = "torchaudio-0.12.1-cp310-cp310-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torchaudio-0.12.1%2Bcu116-cp310-cp310-linux_x86_64.whl"; + hash = "sha256-KdeBVGBQ1lQxXxCQGwX17E1iptMis0Rfex++o4JmVog="; }; x86_64-darwin-37 = { - name = "torchaudio-0.11.0-cp37-cp37m-macosx_10_15_x86_64.whl"; - url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp37-cp37m-macosx_10_15_x86_64.whl"; - hash = "sha256-uaTT4athEWHAZe0hBoBIM/9LhfZNhAIexZBGg2MWn50="; + name = "torchaudio-0.12.1-cp37-cp37m-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/torchaudio-0.12.1-cp37-cp37m-macosx_10_9_x86_64.whl"; + hash = "sha256-I9vPN68vQdSRwDN8qUUB7H71iK2xdm4esoAz+sVJu9k="; }; x86_64-darwin-38 = { - name = "torchaudio-0.11.0-cp38-cp38-macosx_10_15_x86_64.whl"; - url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp38-cp38-macosx_10_15_x86_64.whl"; - hash = "sha256-9OndqejTzgu9XnkZJiGfUFS4uFNlx5vi7pAzOs+a2/w="; + name = "torchaudio-0.12.1-cp38-cp38-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/torchaudio-0.12.1-cp38-cp38-macosx_10_9_x86_64.whl"; + hash = "sha256-pMjBWx6BCpO7d7J/pJFZvqIlO1k++UA5lG7Emu9Rdk8="; }; x86_64-darwin-39 = { - name = "torchaudio-0.11.0-cp39-cp39-macosx_10_15_x86_64.whl"; - url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp39-cp39-macosx_10_15_x86_64.whl"; - hash = "sha256-cNi8B/J3YI0jqaoI2z+68DVmAlS8EtmzYWQMRVZ3dVk="; + name = "torchaudio-0.12.1-cp39-cp39-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/torchaudio-0.12.1-cp39-cp39-macosx_10_9_x86_64.whl"; + hash = "sha256-CPkrxTaC07rYYG3ttwpJ5aD3z5MGyRc/B027qXeFRC4="; }; x86_64-darwin-310 = { - name = "torchaudio-0.11.0-cp310-cp310-macosx_10_15_x86_64.whl"; - url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp310-cp310-macosx_10_15_x86_64.whl"; - hash = "sha256-g2Pj2wqK9YIP19O/g5agryPcgiHJqdS2Di44mAVJKUQ="; + name = "torchaudio-0.12.1-cp310-cp310-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/torchaudio-0.12.1-cp310-cp310-macosx_10_9_x86_64.whl"; + hash = "sha256-3BOL7gayMFRC/BMhcfKgHV9CUJ6qIb34fD0mpvSgn90="; }; aarch64-darwin-38 = { - name = "torchaudio-0.11.0-cp38-cp38-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp38-cp38-macosx_11_0_arm64.whl"; - hash = "sha256-MX/Y7Dn92zrx2tkGWTuezcPt9o5/V4DEL43pVlha5IA="; + name = "torchaudio-0.12.1-cp38-cp38-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torchaudio-0.12.1-cp38-cp38-macosx_11_0_arm64.whl"; + hash = "sha256-g8CLcabcjiPB17AHgKu55MKVKOR6bmRP497nrCJjgh4="; }; aarch64-darwin-39 = { - name = "torchaudio-0.11.0-cp39-cp39-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp39-cp39-macosx_11_0_arm64.whl"; - hash = "sha256-5eVRP83VeHAGGWW++/B2V4eyX0mcPgC1j02ETkQYMXc="; + name = "torchaudio-0.12.1-cp39-cp39-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torchaudio-0.12.1-cp39-cp39-macosx_11_0_arm64.whl"; + hash = "sha256-L8WivI6KrUdbxRnzyCuWSeFLXGV0h/+nEs98UUFD6dc="; }; aarch64-darwin-310 = { - name = "torchaudio-0.11.0-cp310-cp310-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp310-cp310-macosx_11_0_arm64.whl"; - hash = "sha256-06OyzOuV8E7ZNtozvFO9Zm2rBxWnnbM65HGYUiQdwtI="; + name = "torchaudio-0.12.1-cp310-cp310-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torchaudio-0.12.1-cp310-cp310-macosx_11_0_arm64.whl"; + hash = "sha256-HYH3GDfV1b5lHoXKn6k3fstFE7ASnd+wJVQOHCQG0+Y="; }; }; } diff --git a/pkgs/development/python-modules/torchaudio/prefetch.sh b/pkgs/development/python-modules/torchaudio/prefetch.sh index 294c917e0d1..72b919c479d 100755 --- a/pkgs/development/python-modules/torchaudio/prefetch.sh +++ b/pkgs/development/python-modules/torchaudio/prefetch.sh @@ -5,21 +5,22 @@ set -eou pipefail version=$1 -linux_bucket="https://download.pytorch.org/whl/cu113" +linux_cuda_version="cu116" +linux_bucket="https://download.pytorch.org/whl/${linux_cuda_version}" darwin_bucket="https://download.pytorch.org/whl" url_and_key_list=( - "x86_64-linux-37 $linux_bucket/torchaudio-${version}%2Bcu113-cp37-cp37m-linux_x86_64.whl torchaudio-${version}-cp37-cp37m-linux_x86_64.whl" - "x86_64-linux-38 $linux_bucket/torchaudio-${version}%2Bcu113-cp38-cp38-linux_x86_64.whl torchaudio-${version}-cp38-cp38-linux_x86_64.whl" - "x86_64-linux-39 $linux_bucket/torchaudio-${version}%2Bcu113-cp39-cp39-linux_x86_64.whl torchaudio-${version}-cp39-cp39-linux_x86_64.whl" - "x86_64-linux-310 $linux_bucket/torchaudio-${version}%2Bcu113-cp310-cp310-linux_x86_64.whl torchaudio-${version}-cp310-cp310-linux_x86_64.whl" - "x86_64-darwin-37 $darwin_bucket/torchaudio-${version}-cp37-cp37m-macosx_10_15_x86_64.whl torchaudio-${version}-cp37-cp37m-macosx_10_15_x86_64.whl" - "x86_64-darwin-38 $darwin_bucket/torchaudio-${version}-cp38-cp38-macosx_10_15_x86_64.whl torchaudio-${version}-cp38-cp38-macosx_10_15_x86_64.whl" - "x86_64-darwin-39 $darwin_bucket/torchaudio-${version}-cp39-cp39-macosx_10_15_x86_64.whl torchaudio-${version}-cp39-cp39-macosx_10_15_x86_64.whl" - "x86_64-darwin-310 $darwin_bucket/torchaudio-${version}-cp310-cp310-macosx_10_15_x86_64.whl torchaudio-${version}-cp310-cp310-macosx_10_15_x86_64.whl" - "aarch64-darwin-38 $darwin_bucket/torchaudio-${version}-cp38-cp38-macosx_11_0_arm64.whl torchaudio-${version}-cp38-cp38-macosx_11_0_arm64.whl" - "aarch64-darwin-39 $darwin_bucket/torchaudio-${version}-cp39-cp39-macosx_11_0_arm64.whl torchaudio-${version}-cp39-cp39-macosx_11_0_arm64.whl" - "aarch64-darwin-310 $darwin_bucket/torchaudio-${version}-cp310-cp310-macosx_11_0_arm64.whl torchaudio-${version}-cp310-cp310-macosx_11_0_arm64.whl" + "x86_64-linux-37 $linux_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp37-cp37m-linux_x86_64.whl torchaudio-${version}-cp37-cp37m-linux_x86_64.whl" + "x86_64-linux-38 $linux_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp38-cp38-linux_x86_64.whl torchaudio-${version}-cp38-cp38-linux_x86_64.whl" + "x86_64-linux-39 $linux_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp39-cp39-linux_x86_64.whl torchaudio-${version}-cp39-cp39-linux_x86_64.whl" + "x86_64-linux-310 $linux_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp310-cp310-linux_x86_64.whl torchaudio-${version}-cp310-cp310-linux_x86_64.whl" + "x86_64-darwin-37 $darwin_bucket/torchaudio-${version}-cp37-cp37m-macosx_10_9_x86_64.whl torchaudio-${version}-cp37-cp37m-macosx_10_9_x86_64.whl" + "x86_64-darwin-38 $darwin_bucket/torchaudio-${version}-cp38-cp38-macosx_10_9_x86_64.whl torchaudio-${version}-cp38-cp38-macosx_10_9_x86_64.whl" + "x86_64-darwin-39 $darwin_bucket/torchaudio-${version}-cp39-cp39-macosx_10_9_x86_64.whl torchaudio-${version}-cp39-cp39-macosx_10_9_x86_64.whl" + "x86_64-darwin-310 $darwin_bucket/torchaudio-${version}-cp310-cp310-macosx_10_9_x86_64.whl torchaudio-${version}-cp310-cp310-macosx_10_9_x86_64.whl" + "aarch64-darwin-38 $darwin_bucket/cpu/torchaudio-${version}-cp38-cp38-macosx_11_0_arm64.whl torchaudio-${version}-cp38-cp38-macosx_11_0_arm64.whl" + "aarch64-darwin-39 $darwin_bucket/cpu/torchaudio-${version}-cp39-cp39-macosx_11_0_arm64.whl torchaudio-${version}-cp39-cp39-macosx_11_0_arm64.whl" + "aarch64-darwin-310 $darwin_bucket/cpu/torchaudio-${version}-cp310-cp310-macosx_11_0_arm64.whl torchaudio-${version}-cp310-cp310-macosx_11_0_arm64.whl" ) hashfile=binary-hashes-"$version".nix diff --git a/pkgs/development/python-modules/torchgpipe/default.nix b/pkgs/development/python-modules/torchgpipe/default.nix index 2c289f85269..68e113ce70f 100644 --- a/pkgs/development/python-modules/torchgpipe/default.nix +++ b/pkgs/development/python-modules/torchgpipe/default.nix @@ -4,7 +4,7 @@ , isPy27 , pytest-runner , pytestCheckHook -, pytorch +, torch }: buildPythonPackage rec { @@ -20,7 +20,7 @@ buildPythonPackage rec { sha256 = "0ki0njhmz1i3pkpr3y6h6ac7p5qh1kih06mknc2s18mfw34f2l55"; }; - propagatedBuildInputs = [ pytorch ]; + propagatedBuildInputs = [ torch ]; checkInputs = [ pytest-runner pytestCheckHook ]; disabledTests = [ diff --git a/pkgs/development/python-modules/torchinfo/default.nix b/pkgs/development/python-modules/torchinfo/default.nix index 66bdb587bc2..c18f1c68be9 100644 --- a/pkgs/development/python-modules/torchinfo/default.nix +++ b/pkgs/development/python-modules/torchinfo/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , pytestCheckHook , pythonOlder -, pytorch +, torch , torchvision }: @@ -22,7 +22,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - pytorch + torch torchvision ]; diff --git a/pkgs/development/python-modules/torchmetrics/default.nix b/pkgs/development/python-modules/torchmetrics/default.nix index e71e623e428..933566fcb39 100644 --- a/pkgs/development/python-modules/torchmetrics/default.nix +++ b/pkgs/development/python-modules/torchmetrics/default.nix @@ -7,7 +7,7 @@ , packaging , psutil , py-deprecate -, pytorch +, torch , pytestCheckHook , torchmetrics , pytorch-lightning @@ -34,7 +34,7 @@ buildPythonPackage { # Let the user bring their own instance buildInputs = [ - pytorch + torch ]; checkInputs = [ diff --git a/pkgs/development/python-modules/torchvision/bin.nix b/pkgs/development/python-modules/torchvision/bin.nix index 60a33882021..e1a0055af26 100644 --- a/pkgs/development/python-modules/torchvision/bin.nix +++ b/pkgs/development/python-modules/torchvision/bin.nix @@ -9,14 +9,14 @@ , patchelf , pillow , python -, pytorch-bin +, torch-bin }: let pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion; srcs = import ./binary-hashes.nix version; unsupported = throw "Unsupported system"; - version = "0.12.0"; + version = "0.13.1"; in buildPythonPackage { inherit version; @@ -34,7 +34,7 @@ in buildPythonPackage { propagatedBuildInputs = [ pillow - pytorch-bin + torch-bin ]; # The wheel-binary is not stripped to avoid the error of `ImportError: libtorch_cuda_cpp.so: ELF load command address/offset not properly aligned.`. @@ -48,7 +48,7 @@ in buildPythonPackage { # Note: after patchelf'ing, libcudart can still not be found. However, this should # not be an issue, because PyTorch is loaded before torchvision and brings # in the necessary symbols. - patchelf --set-rpath "${rpath}:${pytorch-bin}/${python.sitePackages}/torch/lib:" \ + patchelf --set-rpath "${rpath}:${torch-bin}/${python.sitePackages}/torch/lib:" \ "$out/${python.sitePackages}/torchvision/_C.so" ''; diff --git a/pkgs/development/python-modules/torchvision/binary-hashes.nix b/pkgs/development/python-modules/torchvision/binary-hashes.nix index 271968391ef..9b6301bab2c 100644 --- a/pkgs/development/python-modules/torchvision/binary-hashes.nix +++ b/pkgs/development/python-modules/torchvision/binary-hashes.nix @@ -1,4 +1,4 @@ -# Warning: use the same CUDA version as pytorch-bin. +# Warning: use the same CUDA version as torch-bin. # # Precompiled wheels can be found at: # https://download.pytorch.org/whl/torch_stable.html @@ -6,61 +6,61 @@ # To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows. version : builtins.getAttr version { - "0.12.0" = { + "0.13.1" = { x86_64-linux-37 = { - name = "torchvision-0.12.0-cp37-cp37m-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torchvision-0.12.0%2Bcu113-cp37-cp37m-linux_x86_64.whl"; - hash = "sha256-i/qktZT+5HQYQjtTHtxOV751DcsP9AHMsSV9/svsGzA="; + name = "torchvision-0.13.1-cp37-cp37m-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torchvision-0.13.1%2Bcu116-cp37-cp37m-linux_x86_64.whl"; + hash = "sha256-3PMvbZmEk+duwho4u7hWt0Ailc96Z/sJzlvefn5yV1Y="; }; x86_64-linux-38 = { - name = "torchvision-0.12.0-cp38-cp38-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torchvision-0.12.0%2Bcu113-cp38-cp38-linux_x86_64.whl"; - hash = "sha256-NxM+jFsOwvAZmeWRFvbQ422a+xx/j1i9DD3ImW+DVBk="; + name = "torchvision-0.13.1-cp38-cp38-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torchvision-0.13.1%2Bcu116-cp38-cp38-linux_x86_64.whl"; + hash = "sha256-w86ys/RW8MmEr3HvVfhjfxeKKdw+E6ZvuwEM7q0okeE="; }; x86_64-linux-39 = { - name = "torchvision-0.12.0-cp39-cp39-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torchvision-0.12.0%2Bcu113-cp39-cp39-linux_x86_64.whl"; - hash = "sha256-bGO5q+KEnv7SexmbbUWaIbsBcIxyDbL8pevZQbLwDbg="; + name = "torchvision-0.13.1-cp39-cp39-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torchvision-0.13.1%2Bcu116-cp39-cp39-linux_x86_64.whl"; + hash = "sha256-dZhqvlchOCWOuXlctM1z9Asr34N0/voa9v9rsNvJcsY="; }; x86_64-linux-310 = { - name = "torchvision-0.12.0-cp310-cp310-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/cu113/torchvision-0.12.0%2Bcu113-cp310-cp310-linux_x86_64.whl"; - hash = "sha256-ocsGOHa967HcZGV+1omD/xMHufmoi166Yg2Hr+SEhfE="; + name = "torchvision-0.13.1-cp310-cp310-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu116/torchvision-0.13.1%2Bcu116-cp310-cp310-linux_x86_64.whl"; + hash = "sha256-DJorYFrDD89HXWD3m6N4rwBzoi3lhUU/jD3WwUUqubw="; }; x86_64-darwin-37 = { - name = "torchvision-0.12.0-cp37-cp37m-macosx_10_9_x86_64.whl"; - url = "https://download.pytorch.org/whl/torchvision-0.12.0-cp37-cp37m-macosx_10_9_x86_64.whl"; - hash = "sha256-GJM7xZf0VjmTJJcZqWqV28fTN0yQ+7MNPafVGPOv60I="; + name = "torchvision-0.13.1-cp37-cp37m-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/torchvision-0.13.1-cp37-cp37m-macosx_10_9_x86_64.whl"; + hash = "sha256-XmMSQb7jZh3mT4NhZlYiSvLjUS6yWA2nwI4IuMllqKw="; }; x86_64-darwin-38 = { - name = "torchvision-0.12.0-cp38-cp38-macosx_10_9_x86_64.whl"; - url = "https://download.pytorch.org/whl/torchvision-0.12.0-cp38-cp38-macosx_10_9_x86_64.whl"; - hash = "sha256-DWAuCb1Fc2/y55aOjduw7s6Vb/ltcVSLGxtIeP33S9g="; + name = "torchvision-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/torchvision-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl"; + hash = "sha256-8jChpA7XDVHkY85D3yQ+xSCQL4cl3iUC5IXvxe6p2GQ="; }; x86_64-darwin-39 = { - name = "torchvision-0.12.0-cp39-cp39-macosx_10_9_x86_64.whl"; - url = "https://download.pytorch.org/whl/torchvision-0.12.0-cp39-cp39-macosx_10_9_x86_64.whl"; - hash = "sha256-RMye+ZLS4qtjsIg/fezrwiRNupO3JUe6EfV6yEUvbq0="; + name = "torchvision-0.13.1-cp39-cp39-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/torchvision-0.13.1-cp39-cp39-macosx_10_9_x86_64.whl"; + hash = "sha256-Api647Caw2GGYIhDQAjYK5nWRY/oiIyN+Qcg70s0fUQ="; }; x86_64-darwin-310 = { - name = "torchvision-0.12.0-cp310-cp310-macosx_10_9_x86_64.whl"; - url = "https://download.pytorch.org/whl/torchvision-0.12.0-cp310-cp310-macosx_10_9_x86_64.whl"; - hash = "sha256-aTZW5nkLarIeSm6H6BwpgrrZ5FW16yThS7ZyOC7GEw8="; + name = "torchvision-0.13.1-cp310-cp310-macosx_10_9_x86_64.whl"; + url = "https://download.pytorch.org/whl/torchvision-0.13.1-cp310-cp310-macosx_10_9_x86_64.whl"; + hash = "sha256-GShqczxp3L1Be4Z5PfgHvSJ9tXhu14fBcpd0GpsND8c="; }; aarch64-darwin-38 = { - name = "torchvision-0.12.0-cp38-cp38-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/torchvision-0.12.0-cp38-cp38-macosx_11_0_arm64.whl"; - hash = "sha256-n0JCD38LKc09YXdt8xV4JyV6DPFrLAJ3bcFslquxJW0="; + name = "torchvision-0.13.1-cp38-cp38-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torchvision-0.13.1-cp38-cp38-macosx_11_0_arm64.whl"; + hash = "sha256-6aVjiU+fpAaS4k0apYw+8EBFABfP7TWY/5Y39ATz/js="; }; aarch64-darwin-39 = { - name = "torchvision-0.12.0-cp39-cp39-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/torchvision-0.12.0-cp39-cp39-macosx_11_0_arm64.whl"; - hash = "sha256-adgvR7Z7rW3cu4eDO6WVCmwnG6l7quTAlVYQBxvwNPU="; + name = "torchvision-0.13.1-cp39-cp39-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torchvision-0.13.1-cp39-cp39-macosx_11_0_arm64.whl"; + hash = "sha256-xe1gnIvIjFdSJkALIjLgMJCUR3yCrziVLgNz7e8AA/0="; }; aarch64-darwin-310 = { - name = "torchvision-0.12.0-cp310-cp310-macosx_11_0_arm64.whl"; - url = "https://download.pytorch.org/whl/torchvision-0.12.0-cp310-cp310-macosx_11_0_arm64.whl"; - hash = "sha256-oL5FAcoLobGVZEySQ/SaHEmiblKn83kkxCOdC/XsvY0="; + name = "torchvision-0.13.1-cp310-cp310-macosx_11_0_arm64.whl"; + url = "https://download.pytorch.org/whl/cpu/torchvision-0.13.1-cp310-cp310-macosx_11_0_arm64.whl"; + hash = "sha256-CPWS6mGDbr7Otcl/TXqBO519xlG7985EAVY8z65qIfw="; }; }; } diff --git a/pkgs/development/python-modules/torchvision/default.nix b/pkgs/development/python-modules/torchvision/default.nix index 4eb0368a821..c44413ba494 100644 --- a/pkgs/development/python-modules/torchvision/default.nix +++ b/pkgs/development/python-modules/torchvision/default.nix @@ -9,28 +9,28 @@ , numpy , scipy , pillow -, pytorch +, torch , pytest -, cudaSupport ? pytorch.cudaSupport or false # by default uses the value from pytorch +, cudaSupport ? torch.cudaSupport or false # by default uses the value from torch }: let - inherit (pytorch.cudaPackages) cudatoolkit cudnn; + inherit (torch.cudaPackages) cudatoolkit cudnn; cudatoolkit_joined = symlinkJoin { name = "${cudatoolkit.name}-unsplit"; paths = [ cudatoolkit.out cudatoolkit.lib ]; }; - cudaArchStr = lib.optionalString cudaSupport lib.strings.concatStringsSep ";" pytorch.cudaArchList; + cudaArchStr = lib.optionalString cudaSupport lib.strings.concatStringsSep ";" torch.cudaArchList; in buildPythonPackage rec { pname = "torchvision"; - version = "0.13.0"; + version = "0.13.1"; src = fetchFromGitHub { owner = "pytorch"; repo = "vision"; rev = "refs/tags/v${version}"; - sha256 = "sha256-nIE1HvmAhRh3Hvj3qlF52sN9LGIorLiXlLtN7tzQxqU="; + hash = "sha256-QlUAFAG6zEDCDSXR5n2CznspU3fT0kbqySzofGLPgK4="; }; nativeBuildInputs = [ libpng ninja which ] @@ -42,7 +42,7 @@ in buildPythonPackage rec { buildInputs = [ libjpeg_turbo libpng ] ++ lib.optionals cudaSupport [ cudnn ]; - propagatedBuildInputs = [ numpy pillow pytorch scipy ]; + propagatedBuildInputs = [ numpy pillow torch scipy ]; preBuild = lib.optionalString cudaSupport '' export TORCH_CUDA_ARCH_LIST="${cudaArchStr}" diff --git a/pkgs/development/python-modules/torchvision/prefetch.sh b/pkgs/development/python-modules/torchvision/prefetch.sh index 5f38bce8d8b..44a9ba8ece5 100755 --- a/pkgs/development/python-modules/torchvision/prefetch.sh +++ b/pkgs/development/python-modules/torchvision/prefetch.sh @@ -5,21 +5,22 @@ set -eou pipefail version=$1 -linux_bucket="https://download.pytorch.org/whl/cu113" +linux_cuda_version="cu116" +linux_bucket="https://download.pytorch.org/whl/${linux_cuda_version}" darwin_bucket="https://download.pytorch.org/whl" url_and_key_list=( - "x86_64-linux-37 $linux_bucket/torchvision-${version}%2Bcu113-cp37-cp37m-linux_x86_64.whl torchvision-${version}-cp37-cp37m-linux_x86_64.whl" - "x86_64-linux-38 $linux_bucket/torchvision-${version}%2Bcu113-cp38-cp38-linux_x86_64.whl torchvision-${version}-cp38-cp38-linux_x86_64.whl" - "x86_64-linux-39 $linux_bucket/torchvision-${version}%2Bcu113-cp39-cp39-linux_x86_64.whl torchvision-${version}-cp39-cp39-linux_x86_64.whl" - "x86_64-linux-310 $linux_bucket/torchvision-${version}%2Bcu113-cp310-cp310-linux_x86_64.whl torchvision-${version}-cp310-cp310-linux_x86_64.whl" + "x86_64-linux-37 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp37-cp37m-linux_x86_64.whl torchvision-${version}-cp37-cp37m-linux_x86_64.whl" + "x86_64-linux-38 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp38-cp38-linux_x86_64.whl torchvision-${version}-cp38-cp38-linux_x86_64.whl" + "x86_64-linux-39 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp39-cp39-linux_x86_64.whl torchvision-${version}-cp39-cp39-linux_x86_64.whl" + "x86_64-linux-310 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp310-cp310-linux_x86_64.whl torchvision-${version}-cp310-cp310-linux_x86_64.whl" "x86_64-darwin-37 $darwin_bucket/torchvision-${version}-cp37-cp37m-macosx_10_9_x86_64.whl torchvision-${version}-cp37-cp37m-macosx_10_9_x86_64.whl" "x86_64-darwin-38 $darwin_bucket/torchvision-${version}-cp38-cp38-macosx_10_9_x86_64.whl torchvision-${version}-cp38-cp38-macosx_10_9_x86_64.whl" "x86_64-darwin-39 $darwin_bucket/torchvision-${version}-cp39-cp39-macosx_10_9_x86_64.whl torchvision-${version}-cp39-cp39-macosx_10_9_x86_64.whl" "x86_64-darwin-310 $darwin_bucket/torchvision-${version}-cp310-cp310-macosx_10_9_x86_64.whl torchvision-${version}-cp310-cp310-macosx_10_9_x86_64.whl" - "aarch64-darwin-38 $darwin_bucket/torchvision-${version}-cp38-cp38-macosx_11_0_arm64.whl torchvision-${version}-cp38-cp38-macosx_11_0_arm64.whl" - "aarch64-darwin-39 $darwin_bucket/torchvision-${version}-cp39-cp39-macosx_11_0_arm64.whl torchvision-${version}-cp39-cp39-macosx_11_0_arm64.whl" - "aarch64-darwin-310 $darwin_bucket/torchvision-${version}-cp310-cp310-macosx_11_0_arm64.whl torchvision-${version}-cp310-cp310-macosx_11_0_arm64.whl" + "aarch64-darwin-38 $darwin_bucket/cpu/torchvision-${version}-cp38-cp38-macosx_11_0_arm64.whl torchvision-${version}-cp38-cp38-macosx_11_0_arm64.whl" + "aarch64-darwin-39 $darwin_bucket/cpu/torchvision-${version}-cp39-cp39-macosx_11_0_arm64.whl torchvision-${version}-cp39-cp39-macosx_11_0_arm64.whl" + "aarch64-darwin-310 $darwin_bucket/cpu/torchvision-${version}-cp310-cp310-macosx_11_0_arm64.whl torchvision-${version}-cp310-cp310-macosx_11_0_arm64.whl" ) hashfile="binary-hashes-$version.nix" diff --git a/pkgs/development/python-modules/towncrier/default.nix b/pkgs/development/python-modules/towncrier/default.nix index 9953e2c17be..7b7ab11079a 100644 --- a/pkgs/development/python-modules/towncrier/default.nix +++ b/pkgs/development/python-modules/towncrier/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "towncrier"; - version = "21.9.0"; + version = "22.8.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-nLb0XBbhoe7J0OdlEWXnvmDNCrgdE6XJbKl6SYrof0g="; + sha256 = "sha256-fTg5sDOFm0X7Vd+Ct0z9cCQxkzwMyfKHpafqPgXQQss="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/transformers/default.nix b/pkgs/development/python-modules/transformers/default.nix index 97132a96455..864245622c7 100644 --- a/pkgs/development/python-modules/transformers/default.nix +++ b/pkgs/development/python-modules/transformers/default.nix @@ -17,7 +17,7 @@ , scikit-learn , pillow , pyyaml -, pytorch +, torch , tokenizers , tqdm }: @@ -67,7 +67,7 @@ buildPythonPackage rec { # tf2onnx ]; torch = [ - pytorch + torch ]; tokenizers = [ tokenizers diff --git a/pkgs/development/python-modules/types-redis/default.nix b/pkgs/development/python-modules/types-redis/default.nix index e4f71c91f50..d05080bfabd 100644 --- a/pkgs/development/python-modules/types-redis/default.nix +++ b/pkgs/development/python-modules/types-redis/default.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "types-redis"; - version = "4.3.18"; + version = "4.3.19"; format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ImBTLBV9T2T24mbeZ7CqoZec+5aeQJoWRF7Gl2xKHeY="; + sha256 = "sha256-yIH/uUvUfcoh7VAzKFRKVrsxWFFXXuuyf7Nxv/c1hEo="; }; # Module doesn't have tests diff --git a/pkgs/development/python-modules/typish/default.nix b/pkgs/development/python-modules/typish/default.nix new file mode 100644 index 00000000000..8b7fcdce39b --- /dev/null +++ b/pkgs/development/python-modules/typish/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "typish"; + version = "1.9.3"; + + src = fetchFromGitHub { + owner = "ramonhagenaars"; + repo = "typish"; + rev = "7875850f55e2df8a9e2426e2d484ab618e347c7f"; + sha256 = "0mc5hw92f15mwd92rb2q9isc4wi7xq76449w7ph5bskcspas0wrf"; + }; + + checkInputs = [ + numpy + pytestCheckHook + ]; + + disabledTestPaths = [ + # Requires a very old version of nptyping + # which has a circular dependency on typish + "tests/functions/test_instance_of.py" + ]; + + pythonImportsCheck = [ + "typish" + ]; + + meta = with lib; { + description = "Python module for checking types of objects"; + homepage = "https://github.com/ramonhagenaars/typish"; + license = licenses.mit; + maintainers = with maintainers; [ fmoda3 ]; + }; +} diff --git a/pkgs/development/python-modules/unicrypto/default.nix b/pkgs/development/python-modules/unicrypto/default.nix index db69fef99cb..0bb9fc4e7b4 100644 --- a/pkgs/development/python-modules/unicrypto/default.nix +++ b/pkgs/development/python-modules/unicrypto/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "unicrypto"; - version = "0.0.8"; + version = "0.0.9"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-BIf53ZAJwybulTGnlBKuGK1nNCWhyADWSUe5b96wTN8="; + hash = "sha256-nV3YWK1a1gj6UkmHsX6IVdZNbSRQygyhFjj02S/GyAs="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/versioneer/default.nix b/pkgs/development/python-modules/versioneer/default.nix index 9fbea40b1e8..d4847cf4363 100644 --- a/pkgs/development/python-modules/versioneer/default.nix +++ b/pkgs/development/python-modules/versioneer/default.nix @@ -6,14 +6,14 @@ buildPythonPackage rec { pname = "versioneer"; - version = "0.23"; + version = "0.24"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-1rbWjCmWU3NqKfGZMJ7kMG6XoPDQp47LceIckM4TIrs="; + hash = "sha256-G426nlHi8OBMfoVFIW7s3qLWPhvVVpRI7mbFSffneC8="; }; # Couldn't get tests to work because, for instance, they used virtualenv and diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index fc6dbadaecb..a466c9919f4 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -25,7 +25,7 @@ , pytestCheckHook , python-dateutil , pythonOlder -, pytorch +, torch , pyyaml , requests , scikit-learn @@ -94,7 +94,7 @@ buildPythonPackage rec { pytest-mock pytest-xdist pytestCheckHook - pytorch + torch scikit-learn tqdm ]; diff --git a/pkgs/development/python-modules/west/default.nix b/pkgs/development/python-modules/west/default.nix index eb934fde112..508426ea1a3 100644 --- a/pkgs/development/python-modules/west/default.nix +++ b/pkgs/development/python-modules/west/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "west"; - version = "0.13.1"; + version = "0.14.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-B6B7shZ8FM5pyXzXknJv9mwr+ERq4kiEzRf5jLTCicM="; + hash = "sha256-mlKnhWX9TWnGS3XFSfYbExiSsbbSbBzBYs3q0aPPS48="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/xsdata/default.nix b/pkgs/development/python-modules/xsdata/default.nix index fbc621a5969..3ae950bf86a 100644 --- a/pkgs/development/python-modules/xsdata/default.nix +++ b/pkgs/development/python-modules/xsdata/default.nix @@ -14,15 +14,15 @@ buildPythonPackage rec { pname = "xsdata"; - version = "22.7"; + version = "22.8"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-2EpbTNYdjcHOQQqe+bEpMzGxD2Jh34P+eI+uK4SJPdo="; + hash = "sha256-MWHMRPY35Fs4n9O0z3QRW4IylfSltH3XUNdrCBK2iW4="; }; postPatch = '' |