diff options
Diffstat (limited to 'pkgs/development/python-modules')
158 files changed, 1091 insertions, 702 deletions
diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix index 9c626618ff0a9..a5cf035aa0602 100644 --- a/pkgs/development/python-modules/aiodns/default.nix +++ b/pkgs/development/python-modules/aiodns/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pycares - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ typing ]; diff --git a/pkgs/development/python-modules/aiorwlock/default.nix b/pkgs/development/python-modules/aiorwlock/default.nix new file mode 100644 index 0000000000000..9ee21f2a7c9b6 --- /dev/null +++ b/pkgs/development/python-modules/aiorwlock/default.nix @@ -0,0 +1,31 @@ +{ buildPythonPackage +, fetchPypi +, lib +, pytest-asyncio +, pytest-cov +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "aiorwlock"; + version = "1.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-g/Eth99LlyiguP2hdWWFqw1lKxB7q1nGCE4bGtaSq0U="; + }; + + checkInputs = [ + pytestCheckHook + pytest-asyncio + ]; + + pythonImportsCheck = [ "aiorwlock" ]; + + meta = with lib; { + description = "Read write lock for asyncio"; + homepage = "https://github.com/aio-libs/aiorwlock"; + license = licenses.asl20; + maintainers = with maintainers; [ billhuang ]; + }; +} diff --git a/pkgs/development/python-modules/ansible-runner/default.nix b/pkgs/development/python-modules/ansible-runner/default.nix index c261e5b163b73..14dfb65cfea8b 100644 --- a/pkgs/development/python-modules/ansible-runner/default.nix +++ b/pkgs/development/python-modules/ansible-runner/default.nix @@ -65,7 +65,7 @@ buildPythonPackage rec { "test_large_stdout_blob" # Failed: DID NOT RAISE <class 'RuntimeError'> "test_validate_pattern" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # test_process_isolation_settings is currently broken on Darwin Catalina # https://github.com/ansible/ansible-runner/issues/413 "process_isolation_settings" diff --git a/pkgs/development/python-modules/apache-airflow/default.nix b/pkgs/development/python-modules/apache-airflow/default.nix index 438dc46038cb2..cc57679f5052a 100644 --- a/pkgs/development/python-modules/apache-airflow/default.nix +++ b/pkgs/development/python-modules/apache-airflow/default.nix @@ -238,12 +238,17 @@ buildPythonPackage rec { "--prefix PYTHONPATH : $PYTHONPATH" ]; + postInstall = '' + cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static + # Needed for pythonImportsCheck below + export HOME=$(mktemp -d) + ''; + pythonImportsCheck = [ "airflow" ] ++ providerImports; - checkPhase = '' - export HOME=$(mktemp -d) + preCheck = '' export AIRFLOW_HOME=$HOME export AIRFLOW__CORE__UNIT_TEST_MODE=True export AIRFLOW_DB="$HOME/airflow.db" @@ -262,10 +267,6 @@ buildPythonPackage rec { "bash_operator_kill" # psutil.AccessDenied ]; - postInstall = '' - cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static - ''; - # Updates yarn.lock and package.json passthru.updateScript = writeScript "update.sh" '' #!/usr/bin/env nix-shell @@ -293,6 +294,18 @@ buildPythonPackage rec { ./update-providers.py ''; + # Note on testing the web UI: + # You can (manually) test the web UI as follows: + # + # nix shell .#python3Packages.apache-airflow + # airflow db init + # airflow reset -y # WARNING: this will wipe any existing db state you might have! + # airflow standalone + # + # Then navigate to the localhost URL using the credentials printed, try + # triggering the 'example_bash_operator' and 'example_bash_operator' DAGs and + # see if they report success. + meta = with lib; { description = "Programmatically author, schedule and monitor data pipelines"; homepage = "https://airflow.apache.org/"; diff --git a/pkgs/development/python-modules/aspy-refactor-imports/default.nix b/pkgs/development/python-modules/aspy-refactor-imports/default.nix index cfe935e16e808..a19002449dfaf 100644 --- a/pkgs/development/python-modules/aspy-refactor-imports/default.nix +++ b/pkgs/development/python-modules/aspy-refactor-imports/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { ]; # fails on darwin due to case-insensitive file system - disabledTests = lib.optional stdenv.isDarwin ["test_application_directory_case"]; + disabledTests = lib.optionals stdenv.isDarwin ["test_application_directory_case"]; meta = with lib; { description = "Utilities for refactoring imports in python-like syntax."; diff --git a/pkgs/development/python-modules/asyncio_mqtt/default.nix b/pkgs/development/python-modules/asyncio_mqtt/default.nix index c0ae1cea95f72..a87bca4396433 100644 --- a/pkgs/development/python-modules/asyncio_mqtt/default.nix +++ b/pkgs/development/python-modules/asyncio_mqtt/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ paho-mqtt - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ async_generator ]; diff --git a/pkgs/development/python-modules/azure-core/default.nix b/pkgs/development/python-modules/azure-core/default.nix index 5237130f59f80..75cf395876153 100644 --- a/pkgs/development/python-modules/azure-core/default.nix +++ b/pkgs/development/python-modules/azure-core/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { # disable 8 tests failing on some darwin machines with errors: # azure.core.polling.base_polling.BadStatus: Invalid return status 403 for 'GET' operation # azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden' - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ "location_polling_fail" ]; disabledTestPaths = [ diff --git a/pkgs/development/python-modules/behave/default.nix b/pkgs/development/python-modules/behave/default.nix index 5254f79c4b2fd..1030e589a21df 100644 --- a/pkgs/development/python-modules/behave/default.nix +++ b/pkgs/development/python-modules/behave/default.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchFromGitHub -, buildPythonApplication, python +, buildPythonPackage, python , pytestCheckHook, mock, path, pyhamcrest, pytest-html , glibcLocales , colorama, cucumber-tag-expressions, parse, parse-type, six }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "behave"; version = "1.2.7.dev2"; diff --git a/pkgs/development/python-modules/betterproto/default.nix b/pkgs/development/python-modules/betterproto/default.nix index 2f6ba2e29a236..b49204ee8c440 100644 --- a/pkgs/development/python-modules/betterproto/default.nix +++ b/pkgs/development/python-modules/betterproto/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ grpclib python-dateutil - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ dataclasses ]; diff --git a/pkgs/development/python-modules/bluetooth-auto-recovery/default.nix b/pkgs/development/python-modules/bluetooth-auto-recovery/default.nix index c11e09790eb76..602f87584ef7a 100644 --- a/pkgs/development/python-modules/bluetooth-auto-recovery/default.nix +++ b/pkgs/development/python-modules/bluetooth-auto-recovery/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "bluetooth-auto-recovery"; - version = "0.3.4"; + version = "0.3.6"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = pname; rev = "v${version}"; - hash = "sha256-jInCWya146QI7D89zSAPChF8GMDj7NRzu9NvVIbkntM="; + hash = "sha256-2GmBO67sUIjasF5MHrDkZ4D+dk3xN+HNpc7nSN+qTaQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/catboost/default.nix b/pkgs/development/python-modules/catboost/default.nix index 02e107f27e19c..9a395bc6c98e2 100644 --- a/pkgs/development/python-modules/catboost/default.nix +++ b/pkgs/development/python-modules/catboost/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { nativeBuildInputs = [ clang_12 python2 ]; propagatedBuildInputs = [ graphviz matplotlib numpy pandas scipy plotly six ] - ++ lib.optional withCuda [ cudatoolkit ]; + ++ lib.optionals withCuda [ cudatoolkit ]; patches = [ ./nix-support.patch diff --git a/pkgs/development/python-modules/cdcs/default.nix b/pkgs/development/python-modules/cdcs/default.nix index 748d0ff623fde..2c608c06251ec 100644 --- a/pkgs/development/python-modules/cdcs/default.nix +++ b/pkgs/development/python-modules/cdcs/default.nix @@ -1,16 +1,20 @@ { lib , buildPythonPackage , fetchFromGitHub +, ipython , numpy , pandas , pytestCheckHook , pythonOlder , requests +, responses +, setuptools +, tqdm }: buildPythonPackage rec { - version = "0.1.8"; pname = "cdcs"; + version = "0.1.9"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -18,18 +22,27 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "usnistgov"; repo = "pycdcs"; - rev = "v${version}"; - sha256 = "sha256-s+COE7hus1J5I8PTdagl7KEK5QFoidjQ3ee46kOWmkE="; + # https://github.com/usnistgov/pycdcs/issues/1 + rev = "0a770b752301c27e227ca40a4752f305b55dee20"; + sha256 = "sha256-AUrVEFea4VtBJXWWgECqdBFCqKuHWAlh07Dljp+HBa0="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ + ipython numpy pandas requests + tqdm ]; - # Project has no tests - doCheck = false; + checkInputs = [ + pytestCheckHook + responses + ]; pythonImportsCheck = [ "cdcs" diff --git a/pkgs/development/python-modules/censys/default.nix b/pkgs/development/python-modules/censys/default.nix index ee4ced91c6a93..6b0ebf926846f 100644 --- a/pkgs/development/python-modules/censys/default.nix +++ b/pkgs/development/python-modules/censys/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "censys"; - version = "2.1.8"; + version = "2.1.9"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -25,8 +25,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "censys"; repo = "censys-python"; - rev = "v${version}"; - hash = "sha256-iPCFflibEqA286j+7Vp4ZQaO9e6Bp+o7A/a7DELJcxA="; + rev = "refs/tags/v${version}"; + hash = "sha256-BB/pLpPK2qh5902bZp9QM3Wiu/l48pzq7HcjaAtM4D0="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/certifi/default.nix b/pkgs/development/python-modules/certifi/default.nix index 674fc1183d8ef..ecf7ed49aa5c4 100644 --- a/pkgs/development/python-modules/certifi/default.nix +++ b/pkgs/development/python-modules/certifi/default.nix @@ -7,22 +7,24 @@ buildPythonPackage rec { pname = "certifi"; - version = "2022.06.15"; + version = "2022.09.24"; - disabled = pythonOlder "3.5"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = pname; repo = "python-certifi"; rev = version; - sha256 = "sha256-CKO8wF5FMGLIZbTd7YrKE9OWV9MbfQ2+BMc5IPk1FFU="; + hash = "sha256-B6LO6AfG9cfpyNI7hj3VjmGTFsrrIkDYO4gPMkZY74w="; }; checkInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "certifi" ]; + pythonImportsCheck = [ + "certifi" + ]; meta = with lib; { homepage = "https://github.com/certifi/python-certifi"; diff --git a/pkgs/development/python-modules/ciso8601/default.nix b/pkgs/development/python-modules/ciso8601/default.nix index e210e974414d4..79afe8500072d 100644 --- a/pkgs/development/python-modules/ciso8601/default.nix +++ b/pkgs/development/python-modules/ciso8601/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { checkInputs = [ pytz - ] ++ lib.optional (isPy27) [ + ] ++ lib.optionals (isPy27) [ unittest2 ]; diff --git a/pkgs/development/python-modules/click-shell/default.nix b/pkgs/development/python-modules/click-shell/default.nix new file mode 100644 index 0000000000000..68d65069ae443 --- /dev/null +++ b/pkgs/development/python-modules/click-shell/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, click +, pytestCheckHook +, pytest-click +}: + +buildPythonPackage rec { + pname = "click-shell"; + version = "2.1"; + format = "setuptools"; + + # PyPi release is missing tests + src = fetchFromGitHub { + owner = "clarkperkins"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-4QpQzg0yFuOFymGiTI+A8o6LyX78iTJMqr0ernYbilI="; + }; + + propagatedBuildInputs = [ + click + ]; + + checkInputs = [ + pytest-click + pytestCheckHook + ]; + + pythonImportsCheck = [ + "click_shell" + ]; + + preCheck = "export HOME=$(mktemp -d)"; + + meta = with lib; { + description = "An extension to click that easily turns your click app into a shell utility"; + longDescription = '' + This is an extension to click that easily turns your click app into a + shell utility. It is built on top of the built in python cmd module, + with modifications to make it work with click. It adds a 'shell' mode + with command completion to any click app. + ''; + homepage = "https://github.com/clarkperkins/click-shell"; + license = licenses.bsd3; + maintainers = with maintainers; [ binsky ]; + }; +} diff --git a/pkgs/development/python-modules/clintermission/default.nix b/pkgs/development/python-modules/clintermission/default.nix index a0e5dcb7142f1..b5df005978c4d 100644 --- a/pkgs/development/python-modules/clintermission/default.nix +++ b/pkgs/development/python-modules/clintermission/default.nix @@ -1,8 +1,15 @@ -{ lib, buildPythonApplication, fetchFromGitHub, isPy3k, prompt-toolkit }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, prompt-toolkit }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "clintermission"; version = "0.2.0"; + format = "setuptools"; + + disabled = !isPy3k; src = fetchFromGitHub { owner = "sebageek"; @@ -11,14 +18,16 @@ buildPythonApplication rec { sha256 = "09wl0rpw6c9hab51rs957z64b0v9j4fcbqbn726wnapf4z5w6yxv"; }; - propagatedBuildInputs = [ prompt-toolkit ]; - - disabled = !isPy3k; + propagatedBuildInputs = [ + prompt-toolkit + ]; # repo contains no tests doCheck = false; - pythonImportsCheck = [ "clintermission" ]; + pythonImportsCheck = [ + "clintermission" + ]; meta = with lib; { description = "Non-fullscreen command-line selection menu"; diff --git a/pkgs/development/python-modules/coconut/default.nix b/pkgs/development/python-modules/coconut/default.nix index b7301cf1e73a7..dec024fa8385f 100644 --- a/pkgs/development/python-modules/coconut/default.nix +++ b/pkgs/development/python-modules/coconut/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , cpyparsing , ipykernel @@ -12,7 +12,7 @@ , watchdog }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "coconut"; version = "1.6.0"; diff --git a/pkgs/development/python-modules/codespell/default.nix b/pkgs/development/python-modules/codespell/default.nix deleted file mode 100644 index 016ffadd0bced..0000000000000 --- a/pkgs/development/python-modules/codespell/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ lib -, aspell-python -, aspellDicts -, buildPythonApplication -, chardet -, fetchFromGitHub -, pytestCheckHook -, pytest-dependency -, setuptools-scm -}: - -buildPythonApplication rec { - pname = "codespell"; - version = "2.2.2"; - - src = fetchFromGitHub { - owner = "codespell-project"; - repo = "codespell"; - rev = "v${version}"; - sha256 = "sha256-zXHqaZzGIS7BOFc/kPzA4sgpoEmXuaKHdOcKpMWWeOI="; - }; - - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov=codespell_lib" "" \ - --replace "--cov-report=" "" - ''; - - nativeBuildInputs = [ setuptools-scm ]; - - SETUPTOOLS_SCM_PRETEND_VERSION = version; - - checkInputs = [ - aspell-python - chardet - pytestCheckHook - pytest-dependency - ]; - - preCheck = '' - export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell" - ''; - - disabledTests = [ - # tries to run not fully installed script - "test_command" - # error 'dateset' should not be in aspell dictionaries (en, en_GB, en_US, en_CA, en_AU) for dictionary /build/source/codespell_lib/tests/../data/dictionary.txt - "test_dictionary_formatting" - ]; - - pythonImportsCheck = [ "codespell_lib" ]; - - meta = with lib; { - description = "Fix common misspellings in source code"; - homepage = "https://github.com/codespell-project/codespell"; - license = with licenses; [ gpl2Only cc-by-sa-30 ]; - maintainers = with maintainers; [ johnazoidberg SuperSandro2000 ]; - }; -} diff --git a/pkgs/development/python-modules/deepdiff/default.nix b/pkgs/development/python-modules/deepdiff/default.nix index c0519332342ea..368e95c2a1a02 100644 --- a/pkgs/development/python-modules/deepdiff/default.nix +++ b/pkgs/development/python-modules/deepdiff/default.nix @@ -8,50 +8,56 @@ , numpy , pytestCheckHook , pyyaml +, toml , pythonOlder }: buildPythonPackage rec { pname = "deepdiff"; - version = "5.8.2"; + version = "6.1.0"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "seperman"; repo = "deepdiff"; - rev = "v${version}"; - hash = "sha256-7eagu6lef5bc/4KU3y067LFOGtH6whda1ocBuRHS/kI="; + rev = "refs/tags/${version}"; + hash = "sha256-ngtQNyVQaywMyYitj37m0RJGBiMpjB4b8Rn+feMOjVU="; }; postPatch = '' - substituteInPlace requirements.txt \ - --replace "ordered-set==4.0.2" "ordered-set" substituteInPlace tests/test_command.py \ --replace '/tmp/' "$TMPDIR/" ''; propagatedBuildInputs = [ - click ordered-set ]; - pythonImportsCheck = [ - "deepdiff" - ]; + passthru.optional-dependencies = { + cli = [ + clevercsv + click + pyyaml + toml + ]; + }; checkInputs = [ - clevercsv jsonpickle numpy pytestCheckHook - pyyaml + ] ++ passthru.optional-dependencies.cli; + + pythonImportsCheck = [ + "deepdiff" ]; meta = with lib; { description = "Deep Difference and Search of any Python object/data"; homepage = "https://github.com/seperman/deepdiff"; + changelog = "https://github.com/seperman/deepdiff/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ mic92 ]; }; diff --git a/pkgs/development/python-modules/demjson3/default.nix b/pkgs/development/python-modules/demjson3/default.nix index 5887ec54c2ab6..50668ec388344 100644 --- a/pkgs/development/python-modules/demjson3/default.nix +++ b/pkgs/development/python-modules/demjson3/default.nix @@ -1,26 +1,29 @@ { lib -, python , buildPythonPackage , fetchPypi , pythonOlder +, python }: buildPythonPackage rec { pname = "demjson3"; - version = "3.0.5"; + version = "3.0.6"; + format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "103dc4pzwg8791q3zll1vv4gcc17d9v3jvr9zj23cpv9hpfsp6mb"; + hash = "sha256-N8g7DG6wjSXe/IjfCipIddWKeAmpZQvW7uev2AU826w="; }; checkPhase = '' ${python.interpreter} test/test_demjson3.py ''; - pythonImportsCheck = [ "demjson3" ]; + pythonImportsCheck = [ + "demjson3" + ]; meta = with lib; { description = "Encoder/decoder and lint/validator for JSON (JavaScript Object Notation)"; diff --git a/pkgs/development/python-modules/deprecation/default.nix b/pkgs/development/python-modules/deprecation/default.nix index 441971fa6e709..0e15f2d74c612 100644 --- a/pkgs/development/python-modules/deprecation/default.nix +++ b/pkgs/development/python-modules/deprecation/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { # avoiding mass rebuilds for python3.9, but no longer # needed with patch - checkInputs = [ unittestCheckHook ] ++ lib.optional (pythonOlder "3.10") [ + checkInputs = [ unittestCheckHook ] ++ lib.optionals (pythonOlder "3.10") [ unittest2 ]; diff --git a/pkgs/development/python-modules/django-debug-toolbar/default.nix b/pkgs/development/python-modules/django-debug-toolbar/default.nix index b4409dc04d4cb..bc54eadde8f70 100644 --- a/pkgs/development/python-modules/django-debug-toolbar/default.nix +++ b/pkgs/development/python-modules/django-debug-toolbar/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "django-debug-toolbar"; - version = "3.5"; + version = "3.7"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "jazzband"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-OZWO3tXZ+p+zKtQHCkj0kGSXpDFHFV+HqSgiJvLmMTg="; + hash = "sha256-LGEx21m5TNotbwKHf5in+EDkYqqNOoF7mBstnfLYe9s="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/djangorestframework-simplejwt/default.nix b/pkgs/development/python-modules/djangorestframework-simplejwt/default.nix index e41d6ed51dab0..8e26e9c6e4efc 100644 --- a/pkgs/development/python-modules/djangorestframework-simplejwt/default.nix +++ b/pkgs/development/python-modules/djangorestframework-simplejwt/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "djangorestframework-simplejwt"; - version = "5.2.1"; + version = "5.2.2"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "djangorestframework_simplejwt"; inherit version; - hash = "sha256-dhOHTDIqP24zDMEY+fAKPblX/qf4477YG6RRhTzR29U="; + hash = "sha256-0n1LysLGOU9njeqLTQ1RHG4Yp/Lriq7rin3mAa63fEI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/dnspython/default.nix b/pkgs/development/python-modules/dnspython/default.nix index 1dbbba48b1048..4b71485964920 100644 --- a/pkgs/development/python-modules/dnspython/default.nix +++ b/pkgs/development/python-modules/dnspython/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ cacert ]; diff --git a/pkgs/development/python-modules/drivelib/default.nix b/pkgs/development/python-modules/drivelib/default.nix index 526e58d14340d..7b0a629e8a89b 100644 --- a/pkgs/development/python-modules/drivelib/default.nix +++ b/pkgs/development/python-modules/drivelib/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , expiringdict , google-auth-httplib2 @@ -7,7 +7,7 @@ , google-api-python-client }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "drivelib"; version = "0.3.0"; diff --git a/pkgs/development/python-modules/enamlx/default.nix b/pkgs/development/python-modules/enamlx/default.nix index 46d5ee725c752..641956f10be65 100644 --- a/pkgs/development/python-modules/enamlx/default.nix +++ b/pkgs/development/python-modules/enamlx/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "enamlx"; - version = "0.6.0"; + version = "0.6.2"; src = fetchFromGitHub { owner = "frmdstryr"; repo = pname; - rev = "v${version}"; - sha256 = "10sn7wd4fjz8nkzprd8wa5da5dg8w91r0rngqaipwnpq1dz54b5s"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-LHqOZ1uLWFbUeQAGKoMH9GljhRq1K4RTVWzgV/pt3g8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/enlighten/default.nix b/pkgs/development/python-modules/enlighten/default.nix index 8ac970ebd7849..1946aa614974d 100644 --- a/pkgs/development/python-modules/enlighten/default.nix +++ b/pkgs/development/python-modules/enlighten/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { disabledTests = [ # AssertionError: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> is not... "test_init" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # https://github.com/Rockhopper-Technologies/enlighten/issues/44 "test_autorefresh" ]; diff --git a/pkgs/development/python-modules/eve/default.nix b/pkgs/development/python-modules/eve/default.nix index 2478b07d90401..e179f5c94d203 100644 --- a/pkgs/development/python-modules/eve/default.nix +++ b/pkgs/development/python-modules/eve/default.nix @@ -11,12 +11,14 @@ }: buildPythonPackage rec { - pname = "Eve"; - version = "2.0.1"; + pname = "eve"; + version = "2.0.2"; + format = "setuptools"; src = fetchPypi { - inherit pname version; - sha256 = "sha256-34dfYd1DSMAHSB0w6T8YPSQA3GUCgcNEFOD5sM+SapQ="; + inherit version; + pname = "Eve"; + sha256 = "80cad5702d07189c5f43f432d307c473331144477a6a360d22a27dc018366c13"; }; disabled = pythonOlder "3.7"; @@ -32,7 +34,8 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace "events>=0.3,<0.4" "events>=0.3,<0.5" + --replace "flask<2.2" "flask" \ + --replace "events>=0.3,<0.4" "events>=0.3" ''; pythonImportsCheck = [ "eve" ]; diff --git a/pkgs/development/python-modules/expiringdict/default.nix b/pkgs/development/python-modules/expiringdict/default.nix index 942feff4513f6..9dfe60aca7e38 100644 --- a/pkgs/development/python-modules/expiringdict/default.nix +++ b/pkgs/development/python-modules/expiringdict/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , dill , coverage @@ -8,16 +8,17 @@ , nose }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "expiringdict"; version = "1.2.2"; + format = "setuptools"; # use fetchFromGitHub instead of fetchPypi because the test suite of # the package is not included into the PyPI tarball src = fetchFromGitHub { owner = "mailgun"; repo = pname; - rev = "v${version}"; + rev = "refs/tags/v${version}"; sha256 = "sha256-vRhJSHIqc51I+s/wndtfANM44CKW3QS1iajqyoSBf0I="; }; @@ -30,14 +31,18 @@ buildPythonApplication rec { ]; checkPhase = '' + runHook preCheck nosetests -v --with-coverage --cover-package=expiringdict + runHook postCheck ''; - pythonImportsCheck = [ "expiringdict" ]; + pythonImportsCheck = [ + "expiringdict" + ]; meta = with lib; { description = "Dictionary with auto-expiring values for caching purposes"; - homepage = "https://pypi.org/project/expiringdict/"; + homepage = "https://github.com/mailgun/expiringdict"; license = licenses.asl20; maintainers = with maintainers; [ gravndal ]; }; diff --git a/pkgs/development/python-modules/filecheck/default.nix b/pkgs/development/python-modules/filecheck/default.nix index 2480c196881af..9cbd8bde2117d 100644 --- a/pkgs/development/python-modules/filecheck/default.nix +++ b/pkgs/development/python-modules/filecheck/default.nix @@ -1,10 +1,11 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub -, poetry +, poetry-core +, pytestCheckHook }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "filecheck"; version = "0.0.22"; format = "pyproject"; @@ -16,9 +17,23 @@ buildPythonApplication rec { sha256 = "sha256-I2SypKkgcVuLyLiwNw5oWDb9qT56TbC6vbui8PEcziI="; }; - nativeBuildInputs = [ poetry ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "poetry>=0.12" "poetry-core" \ + --replace "poetry.masonry.api" "poetry.core.masonry.api" + ''; - pythonImportsCheck = [ "filecheck" ]; + nativeBuildInputs = [ + poetry-core + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "filecheck" + ]; meta = with lib; { homepage = "https://github.com/mull-project/FileCheck.py"; diff --git a/pkgs/development/python-modules/fixtures/default.nix b/pkgs/development/python-modules/fixtures/default.nix index 3e9f9943327d5..2bc6612ba70d4 100644 --- a/pkgs/development/python-modules/fixtures/default.nix +++ b/pkgs/development/python-modules/fixtures/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef"; }; - patches = lib.optional (pythonAtLeast "3.9") [ + patches = lib.optionals (pythonAtLeast "3.9") [ # drop tests that try to monkeypatch a classmethod, which fails on python3.9 # https://github.com/testing-cabal/fixtures/issues/44 (fetchpatch { diff --git a/pkgs/development/python-modules/funcsigs/default.nix b/pkgs/development/python-modules/funcsigs/default.nix index 115d358cb7869..a59b6f33b5f69 100644 --- a/pkgs/development/python-modules/funcsigs/default.nix +++ b/pkgs/development/python-modules/funcsigs/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { }; # https://github.com/testing-cabal/funcsigs/issues/10 - patches = lib.optional (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ]; + patches = lib.optionals (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ]; # requires, unittest2 and package hasn't been maintained since 2013 doCheck = false; diff --git a/pkgs/development/python-modules/garminconnect/default.nix b/pkgs/development/python-modules/garminconnect/default.nix index 19a931c2bf48b..ec80ad6ba2305 100644 --- a/pkgs/development/python-modules/garminconnect/default.nix +++ b/pkgs/development/python-modules/garminconnect/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "garminconnect"; - version = "0.1.45"; + version = "0.1.48"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "cyberjunky"; repo = "python-garminconnect"; rev = "refs/tags/${version}"; - hash = "sha256-8ORot3ZEh+1cAV/Ec63ghBQFt4LyaH+rRsgzYA6wEdI="; + hash = "sha256-3HcwIcuZvHZS7eEIIw2wfley/Tdwt8S9HarrJMVYVVw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/gdown/default.nix b/pkgs/development/python-modules/gdown/default.nix index 91154649c1a72..8e958598ab406 100644 --- a/pkgs/development/python-modules/gdown/default.nix +++ b/pkgs/development/python-modules/gdown/default.nix @@ -1,6 +1,6 @@ { lib , beautifulsoup4 -, buildPythonApplication +, buildPythonPackage , fetchPypi , filelock , requests @@ -10,7 +10,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "gdown"; version = "4.5.3"; format = "setuptools"; diff --git a/pkgs/development/python-modules/gigalixir/default.nix b/pkgs/development/python-modules/gigalixir/default.nix deleted file mode 100644 index c32c98fb3dd26..0000000000000 --- a/pkgs/development/python-modules/gigalixir/default.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ stdenv -, lib -, buildPythonApplication -, click -, fetchPypi -, git -, httpretty -, qrcode -, pygments -, pyopenssl -, pytestCheckHook -, requests -, rollbar -, stripe -, pythonOlder -, sure -}: - -buildPythonApplication rec { - pname = "gigalixir"; - version = "1.3.0"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-kNtybgv8j7t1tl6R5ZuC4vj5fnEcEenuNt0twA1kAh0="; - }; - - propagatedBuildInputs = [ - click - pygments - pyopenssl - qrcode - requests - rollbar - stripe - ]; - - checkInputs = [ - git - httpretty - pytestCheckHook - sure - ]; - - postPatch = '' - substituteInPlace setup.py \ - --replace "'pytest-runner'," "" \ - --replace "cryptography==" "cryptography>=" - ''; - - disabledTests = [ - # Test requires network access - "test_rollback_without_version" - ]; - - pythonImportsCheck = [ - "gigalixir" - ]; - - meta = with lib; { - broken = stdenv.isDarwin; - description = "Gigalixir Command-Line Interface"; - homepage = "https://github.com/gigalixir/gigalixir-cli"; - license = licenses.mit; - maintainers = with maintainers; [ ]; - }; -} diff --git a/pkgs/development/python-modules/glymur/default.nix b/pkgs/development/python-modules/glymur/default.nix index 40748f86954e1..9c652994a8c3d 100644 --- a/pkgs/development/python-modules/glymur/default.nix +++ b/pkgs/development/python-modules/glymur/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - ] ++ lib.optional isPy27 [ contextlib2 mock importlib-resources ]; + ] ++ lib.optionals isPy27 [ contextlib2 mock importlib-resources ]; checkInputs = [ scikitimage diff --git a/pkgs/development/python-modules/gprof2dot/default.nix b/pkgs/development/python-modules/gprof2dot/default.nix index 4eb3a79e5e87c..1536c5fcbdb36 100644 --- a/pkgs/development/python-modules/gprof2dot/default.nix +++ b/pkgs/development/python-modules/gprof2dot/default.nix @@ -1,13 +1,14 @@ { lib , fetchFromGitHub -, buildPythonApplication +, buildPythonPackage , python , graphviz }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "gprof2dot"; version = "2021.02.21"; + format = "setuptools"; src = fetchFromGitHub { owner = "jrfonseca"; @@ -36,6 +37,6 @@ buildPythonApplication rec { homepage = "https://github.com/jrfonseca/gprof2dot"; description = "Python script to convert the output from many profilers into a dot graph"; license = licenses.lgpl3Plus; - maintainers = [ maintainers.pmiddend ]; + maintainers = with maintainers; [ pmiddend ]; }; } diff --git a/pkgs/development/python-modules/gpustat/default.nix b/pkgs/development/python-modules/gpustat/default.nix new file mode 100644 index 0000000000000..fbfa2faf597b0 --- /dev/null +++ b/pkgs/development/python-modules/gpustat/default.nix @@ -0,0 +1,44 @@ +{ buildPythonPackage +, blessed +, fetchPypi +, lib +, mockito +, nvidia-ml-py +, psutil +, pytest-runner +, pythonRelaxDepsHook +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "gpustat"; + version = "1.0.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-WB6P+FjDLJWjIruPA/HZ3D0Xe07LM93L7Sw3PGf04/E="; + }; + + nativeBuildInputs = [ pythonRelaxDepsHook ]; + pythonRelaxDeps = [ "nvidia-ml-py" ]; + + propagatedBuildInputs = [ + blessed + nvidia-ml-py + psutil + ]; + + checkInputs = [ + mockito + pytestCheckHook + ]; + + pythonImportsCheck = [ "gpustat" ]; + + meta = with lib; { + description = "A simple command-line utility for querying and monitoring GPU status"; + homepage = "https://github.com/wookayin/gpustat"; + license = licenses.mit; + maintainers = with maintainers; [ billhuang ]; + }; +} diff --git a/pkgs/development/python-modules/griffe/default.nix b/pkgs/development/python-modules/griffe/default.nix index f7e9fd75855fd..43191ca0b8924 100644 --- a/pkgs/development/python-modules/griffe/default.nix +++ b/pkgs/development/python-modules/griffe/default.nix @@ -1,6 +1,6 @@ { lib , aiofiles -, buildPythonApplication +, buildPythonPackage , cached-property , fetchFromGitHub , git @@ -9,7 +9,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "griffe"; version = "0.22.0"; format = "pyproject"; diff --git a/pkgs/development/python-modules/hahomematic/default.nix b/pkgs/development/python-modules/hahomematic/default.nix index 618bc5b6cc2c4..062cb6e8458e3 100644 --- a/pkgs/development/python-modules/hahomematic/default.nix +++ b/pkgs/development/python-modules/hahomematic/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "hahomematic"; - version = "2022.10.6"; + version = "2022.10.8"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "danielperna84"; repo = pname; rev = "refs/tags/${version}"; - sha256 = "sha256-rZb1VlJvzRt3YxEK5jrzqYTZXEPbiPJek8XtkUhzgm8="; + sha256 = "sha256-92TR0zkYUgIso+ki3k+meTeMQdWrcBooNgL42pf0EqA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/hatch-fancy-pypi-readme/default.nix b/pkgs/development/python-modules/hatch-fancy-pypi-readme/default.nix index 4e1a32236f0d6..4d1ba69c93df7 100644 --- a/pkgs/development/python-modules/hatch-fancy-pypi-readme/default.nix +++ b/pkgs/development/python-modules/hatch-fancy-pypi-readme/default.nix @@ -5,11 +5,13 @@ , pythonOlder , build , hatchling +, tomli +, typing-extensions }: buildPythonPackage rec { pname = "hatch-fancy-pypi-readme"; - version = "22.7.0"; + version = "22.8.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -17,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "hatch_fancy_pypi_readme"; inherit version; - hash = "sha256-3t8roLgaKXWrsd7ukxCy64XSI4D9oNUoaedgtUNapZY="; + hash = "sha256-2pEoLKCWAcGK3tjjeNr4tXjHAhSGbwlxFW7pu5zmwmo="; }; nativeBuildInputs = [ @@ -26,6 +28,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ hatchling + ] ++ lib.optionals (pythonOlder "3.11") [ + tomli + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions ]; checkInputs = [ diff --git a/pkgs/development/python-modules/heatzypy/default.nix b/pkgs/development/python-modules/heatzypy/default.nix index 578a359778a6b..0bd151e236afe 100644 --- a/pkgs/development/python-modules/heatzypy/default.nix +++ b/pkgs/development/python-modules/heatzypy/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "heatzypy"; - version = "2.0.4"; + version = "2.1.1"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -17,8 +17,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "Cyr-ius"; repo = pname; - rev = version; - sha256 = "sha256-i5tGV9nJrLRqZwJZ3y5c65MHykz34bnr3yz+OdaQEoM="; + rev = "refs/tags/${version}"; + sha256 = "sha256-4/v0xodpJzVi6/ciW5icqDFGCtBFKtGoMB92CknH9xw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/hupper/default.nix b/pkgs/development/python-modules/hupper/default.nix index 9726069746023..a9e8bd112163e 100644 --- a/pkgs/development/python-modules/hupper/default.nix +++ b/pkgs/development/python-modules/hupper/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { # segfaults in the testsuite that end up failing the tests in a background thread (in myapp) checkInputs = [ pytestCheckHook - ] ++ lib.optional (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.isDarwin) [ watchdog ]; diff --git a/pkgs/development/python-modules/importlib-resources/default.nix b/pkgs/development/python-modules/importlib-resources/default.nix index 7e5d7e1448acb..1247335687237 100644 --- a/pkgs/development/python-modules/importlib-resources/default.nix +++ b/pkgs/development/python-modules/importlib-resources/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ importlib-metadata - ] ++ lib.optional (pythonOlder "3.5") [ + ] ++ lib.optionals (pythonOlder "3.5") [ typing ]; diff --git a/pkgs/development/python-modules/intellifire4py/default.nix b/pkgs/development/python-modules/intellifire4py/default.nix index 0ef45a56a6dee..f0b702b1b5133 100644 --- a/pkgs/development/python-modules/intellifire4py/default.nix +++ b/pkgs/development/python-modules/intellifire4py/default.nix @@ -1,9 +1,11 @@ { lib , aenum , aiohttp +, asynctest , buildPythonPackage , fetchFromGitHub , pydantic +, pytest-mock , pytestCheckHook , pythonOlder , requests @@ -11,7 +13,7 @@ buildPythonPackage rec { pname = "intellifire4py"; - version = "2.0.1"; + version = "2.2.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,7 +22,7 @@ buildPythonPackage rec { owner = "jeeftor"; repo = pname; rev = version; - hash = "sha256-CO6ImL2e6B2yvHAQs3Cc7oaOllB5V9sap4bQS/XRnWI="; + hash = "sha256-dn5814eRZ9456Fn7blf1UzXPii4dXu3sjoXBV7CmwSs="; }; propagatedBuildInputs = [ @@ -31,6 +33,8 @@ buildPythonPackage rec { ]; checkInputs = [ + asynctest + pytest-mock pytestCheckHook ]; diff --git a/pkgs/development/python-modules/iso8601/default.nix b/pkgs/development/python-modules/iso8601/default.nix index 14cef7c62a8c0..e189e3778bc84 100644 --- a/pkgs/development/python-modules/iso8601/default.nix +++ b/pkgs/development/python-modules/iso8601/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "iso8601"; - version = "1.0.2"; + version = "1.1.0"; format = "pyproject"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-J/UDIg5oRdnblU+yErlbA2LYt+bBsjJqhwYcPek1lLE="; + hash = "sha256-MoEee4He7iBj6m0ulPiBmobR84EeSdI2I6QfqDK+8D8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/jaraco_text/default.nix b/pkgs/development/python-modules/jaraco_text/default.nix index 341c744a42934..4891b2ea38c5f 100644 --- a/pkgs/development/python-modules/jaraco_text/default.nix +++ b/pkgs/development/python-modules/jaraco_text/default.nix @@ -37,13 +37,13 @@ buildPythonPackage rec { jaraco-context jaraco_functools inflect - ] ++ lib.optional (pythonOlder "3.9") [ + ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]; checkInputs = [ pytestCheckHook - ] ++ lib.optional (pythonOlder "3.10") [ + ] ++ lib.optionals (pythonOlder "3.10") [ pathlib2 ]; diff --git a/pkgs/development/python-modules/jax/default.nix b/pkgs/development/python-modules/jax/default.nix index 9970783aa3bc6..07f4f5efedbdd 100644 --- a/pkgs/development/python-modules/jax/default.nix +++ b/pkgs/development/python-modules/jax/default.nix @@ -21,7 +21,7 @@ let in buildPythonPackage rec { pname = "jax"; - version = "0.3.16"; + version = "0.3.23"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = "google"; repo = pname; rev = "jax-v${version}"; - hash = "sha256-4idh7boqBXSO9vEHxEcrzXjBIrKmmXiCf6cXh7En1/I="; + hash = "sha256-ruXOwpBwpi1G8jgH9nhbWbs14JupwWkjh+Wzrj8HVU4="; }; # jaxlib is _not_ included in propagatedBuildInputs because there are @@ -92,9 +92,8 @@ buildPythonPackage rec { "tests/sparse_test.py" ]; - pythonImportsCheck = [ - "jax" - ]; + # As of 0.3.22, `import jax` does not work without jaxlib being installed. + pythonImportsCheck = [ ]; meta = with lib; { description = "Differentiate, compile, and transform Numpy code"; diff --git a/pkgs/development/python-modules/jaxlib/bin.nix b/pkgs/development/python-modules/jaxlib/bin.nix index a041edbd2cc61..1d3fb481b338d 100644 --- a/pkgs/development/python-modules/jaxlib/bin.nix +++ b/pkgs/development/python-modules/jaxlib/bin.nix @@ -3,7 +3,7 @@ # https://storage.googleapis.com/jax-releases/libtpu_releases.html. # For future reference, the easiest way to test the GPU backend is to run -# NIX_PATH=.. nix-shell -p python3 python3Packages.jax "python3Packages.jaxlib.override { cudaSupport = true; }" +# NIX_PATH=.. nix-shell -p python3 python3Packages.jax "python3Packages.jaxlib-bin.override { cudaSupport = true; }" # export XLA_FLAGS=--xla_gpu_force_compilation_parallelism=1 # python -c "from jax.lib import xla_bridge; assert xla_bridge.get_backend().platform == 'gpu'" # python -c "from jax import random; random.PRNGKey(0)" @@ -35,46 +35,32 @@ let inherit (cudaPackages) cudatoolkit cudnn; in -# There are no jaxlib wheels targeting cudnn <8.0.5, and although there are -# wheels for cudatoolkit <11.1, we don't support them. assert cudaSupport -> lib.versionAtLeast cudatoolkit.version "11.1"; -assert cudaSupport -> lib.versionAtLeast cudnn.version "8.0.5"; +assert cudaSupport -> lib.versionAtLeast cudnn.version "8.2"; let - version = "0.3.0"; + version = "0.3.22"; pythonVersion = python.pythonVersion; - # Find new releases at https://storage.googleapis.com/jax-releases. When - # upgrading, you can get these hashes from prefetch.sh. + # Find new releases at https://storage.googleapis.com/jax-releases/jax_releases.html. + # When upgrading, you can get these hashes from prefetch.sh. See + # https://github.com/google/jax/issues/12879 as to why this specific URL is + # the correct index. cpuSrcs = { - "3.9" = fetchurl { - url = "https://storage.googleapis.com/jax-releases/nocuda/jaxlib-${version}-cp39-none-manylinux2010_x86_64.whl"; - hash = "sha256-AfBVqoqChEXlEC5PgbtQ5rQzcbwo558fjqCjSPEmN5Q="; + "x86_64-linux" = fetchurl { + url = "https://storage.googleapis.com/jax-releases/nocuda/jaxlib-${version}-cp310-cp310-manylinux2014_x86_64.whl"; + hash = "sha256-w2wo0jk+1BdEkNwfSZRQbebdI4Ac8Kgn0MB0cIMcWU4="; }; - "3.10" = fetchurl { - url = "https://storage.googleapis.com/jax-releases/nocuda/jaxlib-${version}-cp310-none-manylinux2010_x86_64.whl"; - hash = "sha256-9uBkFOO8LlRpO6AP+S8XK9/d2yRdyHxQGlbAjShqHRQ="; + "aarch64-darwin" = fetchurl { + url = "https://storage.googleapis.com/jax-releases/mac/jaxlib-${version}-cp310-cp310-macosx_11_0_arm64.whl"; + hash = "sha256-7Ir55ZhBkccqfoa56WVBF8QwFAC2ws4KFHDkfVw6zm0="; }; }; - gpuSrcs = { - "3.9-805" = fetchurl { - url = "https://storage.googleapis.com/jax-releases/cuda11/jaxlib-${version}+cuda11.cudnn805-cp39-none-manylinux2010_x86_64.whl"; - hash = "sha256-CArIhzM5FrQi3TkdqpUqCeDQYyDMVXlzKFgjNXjLJXw="; - }; - "3.9-82" = fetchurl { - url = "https://storage.googleapis.com/jax-releases/cuda11/jaxlib-${version}+cuda11.cudnn82-cp39-none-manylinux2010_x86_64.whl"; - hash = "sha256-Q0plVnA9pUNQ+gCHSXiLNs4i24xCg8gBGfgfYe3bot4="; - }; - "3.10-805" = fetchurl { - url = "https://storage.googleapis.com/jax-releases/cuda11/jaxlib-${version}+cuda11.cudnn805-cp310-none-manylinux2010_x86_64.whl"; - hash = "sha256-JopevCEAs0hgDngIId6NqbLam5YfcS8Lr9cEffBKp1U="; - }; - "3.10-82" = fetchurl { - url = "https://storage.googleapis.com/jax-releases/cuda11/jaxlib-${version}+cuda11.cudnn82-cp310-none-manylinux2010_x86_64.whl"; - hash = "sha256-2f5TwbdP7EfQNRM3ZcJXCAkS2VXBwNYH6gwT9pdu3Go="; - }; + gpuSrc = fetchurl { + url = "https://storage.googleapis.com/jax-releases/cuda11/jaxlib-${version}+cuda11.cudnn82-cp310-cp310-manylinux2014_x86_64.whl"; + hash = "sha256-rabU62p4fF7Tu/6t8LNYZdf6YO06jGry/JtyFZeamCs="; }; in buildPythonPackage rec { @@ -82,23 +68,16 @@ buildPythonPackage rec { inherit version; format = "wheel"; - # At the time of writing (2022-03-03), there are releases for <=3.10. - # Supporting all of them is a pain, so we focus on 3.9, the current nixpkgs - # python3 version, and 3.10. - disabled = !(pythonVersion == "3.9" || pythonVersion == "3.10"); + # At the time of writing (2022-10-19), there are releases for <=3.10. + # Supporting all of them is a pain, so we focus on 3.10, the current nixpkgs + # python version. + disabled = !(pythonVersion == "3.10"); - src = - if !cudaSupport then cpuSrcs."${pythonVersion}" else - let - # jaxlib wheels are currently provided for cudnn versions at least 8.0.5 and - # 8.2. Try to use 8.2 whenever possible. - cudnnVersion = if (lib.versionAtLeast cudnn.version "8.2") then "82" else "805"; - in - gpuSrcs."${pythonVersion}-${cudnnVersion}"; + src = if !cudaSupport then cpuSrcs."${stdenv.hostPlatform.system}" else gpuSrc; # Prebuilt wheels are dynamically linked against things that nix can't find. # Run `autoPatchelfHook` to automagically fix them. - nativeBuildInputs = [ autoPatchelfHook ] ++ lib.optional cudaSupport addOpenGLRunpath; + nativeBuildInputs = lib.optionals cudaSupport [ autoPatchelfHook addOpenGLRunpath ]; # Dynamic link dependencies buildInputs = [ stdenv.cc.cc ]; @@ -142,6 +121,6 @@ buildPythonPackage rec { sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.asl20; maintainers = with maintainers; [ samuela ]; - platforms = [ "x86_64-linux" ]; + platforms = [ "aarch64-darwin" "x86_64-linux" ]; }; } diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index 12ba67b712446..37bfe4d739f8c 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -53,7 +53,7 @@ let inherit (cudaPackages) cudatoolkit cudnn nccl; pname = "jaxlib"; - version = "0.3.15"; + version = "0.3.22"; meta = with lib; { description = "JAX is Autograd and XLA, brought together for high-performance machine learning research."; @@ -96,7 +96,7 @@ let owner = "google"; repo = "jax"; rev = "${pname}-v${version}"; - sha256 = "sha256-pIl7zzl82w5HHnJadH2vtCT4mYFd5YmM9iHC2GoJD6s="; + hash = "sha256-bnczJ8ma/UMKhA5MUQ6H4az+Tj+By14ZTG6lQQwptQs="; }; nativeBuildInputs = [ @@ -219,11 +219,11 @@ let # relevant dependencies can be downloaded. bazelFlags = [ "-c opt" - ] ++ lib.optional (stdenv.targetPlatform.isx86_64 && stdenv.targetPlatform.isUnix) [ + ] ++ lib.optionals (stdenv.targetPlatform.isx86_64 && stdenv.targetPlatform.isUnix) [ "--config=avx_posix" - ] ++ lib.optional cudaSupport [ + ] ++ lib.optionals cudaSupport [ "--config=cuda" - ] ++ lib.optional mklSupport [ + ] ++ lib.optionals mklSupport [ "--config=mkl_open_source_only" ] ++ lib.optionals stdenv.cc.isClang [ # bazel depends on the compiler frontend automatically selecting these flags based on file @@ -235,11 +235,11 @@ let fetchAttrs = { sha256 = if cudaSupport then - "sha256-tdO4YjO985zbittb16RFWgxgUBrHYQfv5gRsA4IAkTk=" + "sha256-Z9GDWGv+1YFyJjudyshZfeRJsKShoA1kIbNR3h3GxPQ=" else if stdenv.isDarwin then - "sha256-+XYxfXBCASueqDGg0Zqcmpf7zmemYM6xCE+x0rl3j34=" + "sha256-i3wiJHD4+pgTvDMhnYiQo9pdxxKItgYnc4/4wGt2NXM=" else - "sha256-La1wC8X5aGK5mXvYy/kO8n4J+zaRZEc/DAX5zaH1D5A="; + "sha256-liRxmjwm0OmVMfgoGXx+nGBdW2fzzP/d4zmK6A59HAM="; }; buildAttrs = { @@ -293,7 +293,9 @@ buildPythonPackage { inherit meta pname version; format = "wheel"; - src = "${bazel-build}/jaxlib-${version}-cp${builtins.replaceStrings ["."] [""] python.pythonVersion}-none-${platformTag}.whl"; + src = + let cp = "cp${builtins.replaceStrings ["."] [""] python.pythonVersion}"; + in "${bazel-build}/jaxlib-${version}-${cp}-${cp}-${platformTag}.whl"; # Note that cudatoolkit is necessary since jaxlib looks for "ptxas" in $PATH. # See https://github.com/NixOS/nixpkgs/pull/164176#discussion_r828801621 for diff --git a/pkgs/development/python-modules/jsbeautifier/default.nix b/pkgs/development/python-modules/jsbeautifier/default.nix index 242b282d4dd2d..d67939bc8adb4 100644 --- a/pkgs/development/python-modules/jsbeautifier/default.nix +++ b/pkgs/development/python-modules/jsbeautifier/default.nix @@ -1,22 +1,22 @@ { lib , fetchPypi -, buildPythonApplication +, buildPythonPackage , editorconfig , pytestCheckHook , pythonOlder , six }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "jsbeautifier"; - version = "1.14.6"; + version = "1.14.7"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-DVJEhRFE3Ec7HRBEvj3WxW9h/Wnr3B+TuBPYIkJy8G8="; + hash = "sha256-d5kyVNsf9vhOtuHXXjtrcsui7yCBOlhbLYHo5ePHE8Y="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/language-data/default.nix b/pkgs/development/python-modules/language-data/default.nix index 803df3abaea59..ff04b036dc05c 100644 --- a/pkgs/development/python-modules/language-data/default.nix +++ b/pkgs/development/python-modules/language-data/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , marisa-trie , poetry-core @@ -7,7 +7,7 @@ , setuptools }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "language-data"; version = "1.0.1"; format = "pyproject"; diff --git a/pkgs/development/python-modules/life360/default.nix b/pkgs/development/python-modules/life360/default.nix index 15a0e9891aa7a..da5e0c7d8e75d 100644 --- a/pkgs/development/python-modules/life360/default.nix +++ b/pkgs/development/python-modules/life360/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "life360"; - version = "5.1.1"; + version = "5.2.1"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "pnbruckner"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-Fsv0lK0C9suVqgeaxKVuyAacHzHJJ1FHXzzy95RnhWw="; + hash = "sha256-yhOqiLozeqPjl5ZBgPaMuZ2fJeOwhI460p9x7i1hVuM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index 015417151b7a2..ad54268c8cf59 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { dontUseCmakeConfigure = true; - buildInputs = lib.optional stdenv.cc.isClang [ llvmPackages.openmp ]; + buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ]; propagatedBuildInputs = [ numpy scipy diff --git a/pkgs/development/python-modules/lxmf/default.nix b/pkgs/development/python-modules/lxmf/default.nix index d2605a0fdd6ca..8b9593857eebc 100644 --- a/pkgs/development/python-modules/lxmf/default.nix +++ b/pkgs/development/python-modules/lxmf/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "lxmf"; - version = "0.2.0"; + version = "0.2.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "markqvist"; repo = "lxmf"; rev = "refs/tags/${version}"; - hash = "sha256-5GQil5ReK0DEURPDgrGxfUhhIFHrRSSmtZ+l6xA9oA8="; + hash = "sha256-ULYo2eFzBoEc5OeuRW/o35P/9oeYob8lG4T++nDrnNg="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/markdown-it-py/default.nix b/pkgs/development/python-modules/markdown-it-py/default.nix index f4c83d5df3486..d408c00710037 100644 --- a/pkgs/development/python-modules/markdown-it-py/default.nix +++ b/pkgs/development/python-modules/markdown-it-py/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { attrs linkify-it-py mdurl - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index ad32c3db7eb60..6a507d01ef3b0 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -39,9 +39,9 @@ buildPythonPackage rec { buildInputs = [ which sphinx - ] ++ lib.optional enableGhostscript [ + ] ++ lib.optionals enableGhostscript [ ghostscript - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; diff --git a/pkgs/development/python-modules/mautrix/default.nix b/pkgs/development/python-modules/mautrix/default.nix index a17c2c9c079ac..8171688b01762 100644 --- a/pkgs/development/python-modules/mautrix/default.nix +++ b/pkgs/development/python-modules/mautrix/default.nix @@ -4,11 +4,11 @@ buildPythonPackage rec { pname = "mautrix"; - version = "0.17.8"; + version = "0.18.4"; src = fetchPypi { inherit pname version; - sha256 = "sha256-DFajAD5mnXLQmJGRv4j2mWhtIj77nZNSQhbesX4qMys="; + sha256 = "sha256-ymSnGgcy1sW7HlWsSbSRty+60MtChzpF56eH7wrdfh8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/mediafile/default.nix b/pkgs/development/python-modules/mediafile/default.nix index c15bb59f47382..c71bf3214b2c1 100644 --- a/pkgs/development/python-modules/mediafile/default.nix +++ b/pkgs/development/python-modules/mediafile/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "mediafile"; - version = "0.9.0"; + version = "0.10.0"; format = "flit"; disabled = pythonOlder "3.6"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "beetbox"; repo = pname; rev = "v${version}"; - sha256 = "sha256-S90BgjKXpE4kAR0mPXgacmr2A+0hrkGpHRMeuvyFNCg="; + hash = "sha256-Sdb5Hvm4Y344msZGie4PJ88ZmFtWfc0chABtmwnEN/Y="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/meshtastic/default.nix b/pkgs/development/python-modules/meshtastic/default.nix index 67bc42c03cf38..a98d3354ef2fb 100644 --- a/pkgs/development/python-modules/meshtastic/default.nix +++ b/pkgs/development/python-modules/meshtastic/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "meshtastic"; - version = "1.3.40"; + version = "1.3.42"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "meshtastic"; repo = "Meshtastic-python"; rev = version; - hash = "sha256-ft29c9I13gwduigIPERQQWJmQZs/j/e4leA66DbmEOQ="; + hash = "sha256-yQjUepoKHYsQg49hY3ABtRGBxAppqm/DODnCM4tBH5A="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/minimock/default.nix b/pkgs/development/python-modules/minimock/default.nix index faa836b71d7b7..5bd48301e8ec1 100644 --- a/pkgs/development/python-modules/minimock/default.nix +++ b/pkgs/development/python-modules/minimock/default.nix @@ -1,28 +1,39 @@ { lib , buildPythonPackage -, fetchurl -, nose +, fetchFromGitHub +, pythonOlder +, setuptools }: buildPythonPackage rec { - version = "1.2.8"; pname = "minimock"; + version = "1.3.0"; + format = "pyproject"; - src = fetchurl { - url = "https://bitbucket.org/jab/minimock/get/${version}.zip"; - sha256 = "c88fa8a7120623f23990a7f086a9657f6ced09025a55e3be8649a30b4945441a"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "lowks"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Ut3iKc7Sr28uGgWCV3K3CS+gBta2icvbUPMjjo4fflU="; }; - checkInputs = [ nose ]; + nativeBuildInputs = [ + setuptools + ]; + + # Module has no tests + doCheck = false; - checkPhase = '' - ./test - ''; + pythonImportsCheck = [ + "minimock" + ]; meta = with lib; { - description = "A minimalistic mocking library for python"; + description = "A minimalistic mocking library"; homepage = "https://pypi.python.org/pypi/MiniMock"; license = licenses.mit; + maintainers = with maintainers; [ drewrisinger ]; }; - } diff --git a/pkgs/development/python-modules/mkdocs-autorefs/default.nix b/pkgs/development/python-modules/mkdocs-autorefs/default.nix index ea1dffdf0db02..dd88bd332e0e8 100644 --- a/pkgs/development/python-modules/mkdocs-autorefs/default.nix +++ b/pkgs/development/python-modules/mkdocs-autorefs/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , markdown , mkdocs @@ -8,7 +8,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocs-autorefs"; version = "0.4.1"; format = "pyproject"; diff --git a/pkgs/development/python-modules/mkdocs-material/default.nix b/pkgs/development/python-modules/mkdocs-material/default.nix index f58bbf2e69d63..d82c1a654362e 100644 --- a/pkgs/development/python-modules/mkdocs-material/default.nix +++ b/pkgs/development/python-modules/mkdocs-material/default.nix @@ -1,6 +1,6 @@ { lib , callPackage -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , jinja2 , markdown @@ -11,7 +11,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocs-material"; version = "8.4.3"; format = "setuptools"; diff --git a/pkgs/development/python-modules/mkdocs-minify/default.nix b/pkgs/development/python-modules/mkdocs-minify/default.nix index 0beeb51641600..ee6765d31751d 100644 --- a/pkgs/development/python-modules/mkdocs-minify/default.nix +++ b/pkgs/development/python-modules/mkdocs-minify/default.nix @@ -1,14 +1,15 @@ { lib , callPackage -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , mkdocs , csscompressor , htmlmin , jsmin +, pytestCheckHook }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocs-minify"; version = "0.5.0"; @@ -26,6 +27,11 @@ buildPythonApplication rec { mkdocs ]; + checkInputs = [ + mkdocs + pytestCheckHook + ]; + pythonImportsCheck = [ "mkdocs" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/mkdocs-redirects/default.nix b/pkgs/development/python-modules/mkdocs-redirects/default.nix index 94bf504a76b67..9394692fc5cfe 100644 --- a/pkgs/development/python-modules/mkdocs-redirects/default.nix +++ b/pkgs/development/python-modules/mkdocs-redirects/default.nix @@ -1,11 +1,12 @@ { lib , callPackage -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , mkdocs +, pytestCheckHook }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocs-redirects"; version = "1.2.0"; @@ -20,7 +21,13 @@ buildPythonApplication rec { mkdocs ]; - pythonImportsCheck = [ "mkdocs" ]; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "mkdocs_redirects" + ]; meta = with lib; { description = "Open source plugin for Mkdocs page redirects"; diff --git a/pkgs/development/python-modules/mkdocstrings-python/default.nix b/pkgs/development/python-modules/mkdocstrings-python/default.nix index 4e10c4287d8cb..58ead57744960 100644 --- a/pkgs/development/python-modules/mkdocstrings-python/default.nix +++ b/pkgs/development/python-modules/mkdocstrings-python/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , griffe , mkdocs-material @@ -9,7 +9,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocstrings-python"; version = "0.7.1"; format = "pyproject"; diff --git a/pkgs/development/python-modules/mkdocstrings/default.nix b/pkgs/development/python-modules/mkdocstrings/default.nix index b151727a8fbd3..5d20ea1a6e97b 100644 --- a/pkgs/development/python-modules/mkdocstrings/default.nix +++ b/pkgs/development/python-modules/mkdocstrings/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , jinja2 , markdown @@ -12,7 +12,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocstrings"; version = "0.19.0"; format = "pyproject"; diff --git a/pkgs/development/python-modules/mlflow/default.nix b/pkgs/development/python-modules/mlflow/default.nix index c196ef3f7b6bb..cc5abbdd3d2f4 100644 --- a/pkgs/development/python-modules/mlflow/default.nix +++ b/pkgs/development/python-modules/mlflow/default.nix @@ -32,14 +32,14 @@ buildPythonPackage rec { pname = "mlflow"; - version = "1.29.0"; + version = "1.30.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-+tUYYA9RW8gcv3cFPVBrdpRBIpEFtqS/hXX+qmOgDak="; + hash = "sha256-Ln1R9uLcbMIxbnLc9BNSF8WByPTx+d3hBmqrqeCyLHo="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/mocket/default.nix b/pkgs/development/python-modules/mocket/default.nix index b79673e2b240a..7e5d62454c6b1 100644 --- a/pkgs/development/python-modules/mocket/default.nix +++ b/pkgs/development/python-modules/mocket/default.nix @@ -71,6 +71,7 @@ buildPythonPackage rec { "test_truesendall_after_mocket_session" "test_real_request_session" "test_asyncio_record_replay" + "test_gethostbyname" ]; pythonImportsCheck = [ "mocket" ]; diff --git a/pkgs/development/python-modules/mutmut/default.nix b/pkgs/development/python-modules/mutmut/default.nix deleted file mode 100644 index 626c768f2a81c..0000000000000 --- a/pkgs/development/python-modules/mutmut/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib -, fetchFromGitHub -, buildPythonApplication -, click -, glob2 -, parso -, pony -, junit-xml -, pythonOlder -, testers -}: - -let self = buildPythonApplication rec { - pname = "mutmut"; - version = "2.2.0"; - - src = fetchFromGitHub { - repo = pname; - owner = "boxed"; - rev = version; - hash = "sha256-G+OL/9km2iUeZ1QCpU73CIWVWMexcs3r9RdCnAsESnY="; - }; - - postPatch = '' - substituteInPlace requirements.txt --replace 'junit-xml==1.8' 'junit-xml==1.9' - ''; - - disabled = pythonOlder "3.7"; - - doCheck = false; - - propagatedBuildInputs = [ click glob2 parso pony junit-xml ]; - - passthru.tests.version = testers.testVersion { package = self; }; - - meta = with lib; { - description = "mutation testing system for Python, with a strong focus on ease of use"; - homepage = "https://github.com/boxed/mutmut"; - changelog = "https://github.com/boxed/mutmut/blob/${version}/HISTORY.rst"; - license = licenses.bsd3; - maintainers = with maintainers; [ synthetica ]; - }; -}; -in self diff --git a/pkgs/development/python-modules/mypy-protobuf/default.nix b/pkgs/development/python-modules/mypy-protobuf/default.nix index 007fd2fd015f2..c63910abc56c0 100644 --- a/pkgs/development/python-modules/mypy-protobuf/default.nix +++ b/pkgs/development/python-modules/mypy-protobuf/default.nix @@ -1,6 +1,14 @@ -{ lib, fetchPypi, buildPythonApplication, protobuf, types-protobuf, grpcio-tools, pythonOlder }: +{ lib +, fetchPypi +, buildPythonPackage +, protobuf +, types-protobuf +, grpcio-tools +, pytestCheckHook +, pythonOlder +}: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mypy-protobuf"; version = "3.3.0"; format = "pyproject"; @@ -12,7 +20,21 @@ buildPythonApplication rec { sha256 = "sha256-JPOwrssGZW6YP1jgfHMqkFd7nXrz4QZvwrZju/A3Akg="; }; - propagatedBuildInputs = [ protobuf types-protobuf grpcio-tools ]; + propagatedBuildInputs = [ + protobuf + types-protobuf + grpcio-tools + ]; + + doCheck = false; # ModuleNotFoundError: No module named 'testproto' + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "mypy_protobuf" + ]; meta = with lib; { description = "Generate mypy stub files from protobuf specs"; diff --git a/pkgs/development/python-modules/nipy/default.nix b/pkgs/development/python-modules/nipy/default.nix index 5bdf6fdcd4436..d5e399701dc86 100644 --- a/pkgs/development/python-modules/nipy/default.nix +++ b/pkgs/development/python-modules/nipy/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "a8a2c97ce854fece4aced5a6394b9fdca5846150ad6d2a36b86590924af3c848"; }; - buildInputs = lib.optional doCheck [ nose ]; + buildInputs = lib.optionals doCheck [ nose ]; propagatedBuildInputs = [ matplotlib nibabel numpy scipy sympy ]; checkPhase = '' # wants to be run in a different directory diff --git a/pkgs/development/python-modules/nomadnet/default.nix b/pkgs/development/python-modules/nomadnet/default.nix index 28e6da843dafe..1a3d745dfd0d9 100644 --- a/pkgs/development/python-modules/nomadnet/default.nix +++ b/pkgs/development/python-modules/nomadnet/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "nomadnet"; - version = "0.2.4"; + version = "0.2.5"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "markqvist"; repo = "NomadNet"; rev = version; - hash = "sha256-SfKIbgt+F4CPA5r5NHjgPXOiq3+3UtvzEQfXkmN1VR0="; + hash = "sha256-iPgdXii3SZWxSTpILBLIWY6vpBTnrpGnEosD/ttN/Yk="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index 4efaaf3f9ec94..fdb599466ff2b 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { "sock_server" "test_list_formats" # tries to find python MIME type "KernelCullingTest" # has a race condition failing on slower hardware - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ "test_delete" "test_checkpoints_follow_file" ]; diff --git a/pkgs/development/python-modules/notifications-python-client/default.nix b/pkgs/development/python-modules/notifications-python-client/default.nix index 3f79613685132..3ed0d05e93bad 100644 --- a/pkgs/development/python-modules/notifications-python-client/default.nix +++ b/pkgs/development/python-modules/notifications-python-client/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "notifications-python-client"; - version = "6.4.0"; + version = "6.4.1"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "alphagov"; repo = pname; rev = version; - sha256 = "sha256-9HK7N35XqTl9VsRmwxalfdOuaBWiB5j05R8CSMwSHH0="; + sha256 = "sha256-HEHerdwplsPAld23Al8sUARu4T5IJLmY5kucAz2791c="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/notifymuch/default.nix b/pkgs/development/python-modules/notifymuch/default.nix deleted file mode 100644 index bc1610e2ca94e..0000000000000 --- a/pkgs/development/python-modules/notifymuch/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ lib -, buildPythonApplication -, isPy3k -, fetchFromGitHub -, notmuch -, pygobject3 -, gobject-introspection -, libnotify -, wrapGAppsHook -, gtk3 -}: - -buildPythonApplication rec { - pname = "notifymuch"; - version = "0.1"; - disabled = !isPy3k; - - src = fetchFromGitHub { - owner = "kspi"; - repo = "notifymuch"; - # https://github.com/kspi/notifymuch/issues/11 - rev = "9d4aaf54599282ce80643b38195ff501120807f0"; - sha256 = "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"; - }; - - propagatedBuildInputs = [ - notmuch - pygobject3 - libnotify - gtk3 - ]; - - nativeBuildInputs = [ - gobject-introspection - wrapGAppsHook - ]; - - dontWrapGApps = true; - - preFixup = '' - makeWrapperArgs+=("''${gappsWrapperArgs[@]}") - ''; - - strictDeps = false; - - meta = with lib; { - description = "Display desktop notifications for unread mail in a notmuch database"; - homepage = "https://github.com/kspi/notifymuch"; - maintainers = with maintainers; [ arjan-s ]; - license = licenses.gpl3; - }; -} diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index 2ca0e08ba5b1a..965130658c444 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -40,7 +40,7 @@ in buildPythonPackage rec { NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; - nativeBuildInputs = lib.optional cudaSupport [ + nativeBuildInputs = lib.optionals cudaSupport [ addOpenGLRunpath ]; diff --git a/pkgs/development/python-modules/onnx/default.nix b/pkgs/development/python-modules/onnx/default.nix index d5db23bc2b0b8..a266fb4e6b44d 100644 --- a/pkgs/development/python-modules/onnx/default.nix +++ b/pkgs/development/python-modules/onnx/default.nix @@ -11,6 +11,8 @@ , six , tabulate , typing-extensions +, pythonRelaxDepsHook +, pytest-runner }: buildPythonPackage rec { @@ -27,8 +29,11 @@ buildPythonPackage rec { nativeBuildInputs = [ cmake + pythonRelaxDepsHook ]; + pythonRelaxDeps = [ "protobuf" ]; + propagatedBuildInputs = [ protobuf numpy @@ -39,6 +44,7 @@ buildPythonPackage rec { checkInputs = [ nbval pytestCheckHook + pytest-runner tabulate ]; @@ -47,8 +53,6 @@ buildPythonPackage rec { patchShebangs tools/protoc-gen-mypy.py substituteInPlace tools/protoc-gen-mypy.sh.in \ --replace "/bin/bash" "${bash}/bin/bash" - - sed -i '/pytest-runner/d' setup.py ''; preBuild = '' diff --git a/pkgs/development/python-modules/openai/default.nix b/pkgs/development/python-modules/openai/default.nix index b6c539150ccd3..3f8883b479898 100644 --- a/pkgs/development/python-modules/openai/default.nix +++ b/pkgs/development/python-modules/openai/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "openai"; - version = "0.23.1"; + version = "0.24.0"; format = "setuptools"; disabled = pythonOlder "3.7.1"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "openai"; repo = "openai-python"; rev = "v${version}"; - hash = "sha256-4RdER6ecvHGXTLZ1GnBNI1hIETI8O/t+kuOXiQhMigs="; + hash = "sha256-0bXJoEq8FHRNaFMjncIwDbJROtFz/IJ4gD+LfvmtFUg="; }; propagatedBuildInputs = [ @@ -72,7 +72,9 @@ buildPythonPackage rec { disabledTestPaths = [ # Requires a real API key "openai/tests/test_endpoints.py" + # openai: command not found "openai/tests/test_file_cli.py" + "openai/tests/test_long_examples_validator.py" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/opencensus/default.nix b/pkgs/development/python-modules/opencensus/default.nix new file mode 100644 index 0000000000000..0690da3d7ba9d --- /dev/null +++ b/pkgs/development/python-modules/opencensus/default.nix @@ -0,0 +1,55 @@ +{ buildPythonPackage +, fetchPypi +, lib +, python +, unittestCheckHook +, google-api-core +}: + +let + opencensus-context = buildPythonPackage rec { + pname = "opencensus-context"; + version = "0.1.3"; + + checkInputs = [ unittestCheckHook ]; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-oDEIw8ENjIC7Xd9cih8DMWH6YZcqmRf5ubOhhRfwCIw="; + }; + }; +in +buildPythonPackage rec { + pname = "opencensus"; + version = "0.11.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-AmIWq6uJ2U2FBJLz3GWVAFXsT4QRX6bHvq/7pEo0bkI="; + }; + + buildInputs = [ + # opencensus-context is embedded in opencensus + opencensus-context + ]; + + propagatedBuildInputs = [ + google-api-core + ]; + + postInstall = '' + ln -sf ${opencensus-context}/${python.sitePackages}/opencensus/common/runtime_context \ + $out/${python.sitePackages}/opencensus/common/ + ''; + + checkInputs = [ unittestCheckHook ]; + + pythonImportsCheck = [ "opencensus" ]; + + meta = with lib; { + description = "A stats collection and distributed tracing framework"; + homepage = "https://github.com/census-instrumentation/opencensus-python"; + license = licenses.asl20; + maintainers = with maintainers; [ billhuang ]; + }; +} diff --git a/pkgs/development/python-modules/opentimestamps/default.nix b/pkgs/development/python-modules/opentimestamps/default.nix index f132614d1ca00..b34c883d685cf 100644 --- a/pkgs/development/python-modules/opentimestamps/default.nix +++ b/pkgs/development/python-modules/opentimestamps/default.nix @@ -1,26 +1,37 @@ -{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, isPy3k -, bitcoinlib, GitPython, pysha3, git }: +{ lib +, bitcoinlib +, buildPythonPackage +, fetchFromGitHub +, git +, GitPython +, pysha3 +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "opentimestamps"; - version = "0.4.1"; - disabled = (!isPy3k); + version = "0.4.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; - # We can't use the pypi source because it doesn't include README.md which is - # needed in setup.py src = fetchFromGitHub { owner = "opentimestamps"; repo = "python-opentimestamps"; rev = "python-opentimestamps-v${version}"; - sha256 = "0c45ij8absfgwizq6dfgg81siq3y8605sgg184vazp292w8nqmqr"; + hash = "sha256-RRCAxDYWySmnG1sEQWurUDQsu+vPx9Npbr6BaoNGm1U="; }; - patches = [ - # build against bitcoinlib-0.11 - (fetchpatch { - url = "https://patch-diff.githubusercontent.com/raw/opentimestamps/python-opentimestamps/pull/43.patch"; - sha256 = "0bxzk4pzpqk7zrk2x7vn2bj2n3pc5whf8ijbd225s6674q450zbg"; - }) + propagatedBuildInputs = [ + bitcoinlib + GitPython + pysha3 + ]; + + checkInputs = [ + git + pytestCheckHook ]; # Remove a failing test which expects the test source file to reside in the @@ -29,12 +40,14 @@ buildPythonPackage rec { rm opentimestamps/tests/core/test_git.py ''; - checkInputs = [ git ]; - propagatedBuildInputs = [ bitcoinlib GitPython pysha3 ]; + pythonImportsCheck = [ + "opentimestamps" + ]; - meta = { + meta = with lib; { description = "Create and verify OpenTimestamps proofs"; homepage = "https://github.com/opentimestamps/python-opentimestamps"; - license = lib.licenses.lgpl3; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/ormar/default.nix b/pkgs/development/python-modules/ormar/default.nix index c08340e756469..873fe5b072612 100644 --- a/pkgs/development/python-modules/ormar/default.nix +++ b/pkgs/development/python-modules/ormar/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "ormar"; - version = "0.11.3"; + version = "0.12.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -33,7 +33,7 @@ buildPythonPackage rec { owner = "collerek"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-4tGwhgHLZmvsbaDjmmQ3tXBwUBIxb5EpQrT8VIu/XwY="; + hash = "sha256-B6dC9+t/pe7vsPb7rkGAbJWLfCAF7lIElFvt1pUu5yA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/paho-mqtt/default.nix b/pkgs/development/python-modules/paho-mqtt/default.nix index fb249acf63333..e25f54748685a 100644 --- a/pkgs/development/python-modules/paho-mqtt/default.nix +++ b/pkgs/development/python-modules/paho-mqtt/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook six - ] ++ lib.optional (!isPy3k) [ + ] ++ lib.optionals (!isPy3k) [ mock ]; diff --git a/pkgs/development/python-modules/pandas-stubs/default.nix b/pkgs/development/python-modules/pandas-stubs/default.nix index a719f98e9d1d6..9719b918b6eb6 100644 --- a/pkgs/development/python-modules/pandas-stubs/default.nix +++ b/pkgs/development/python-modules/pandas-stubs/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , jinja2 @@ -101,6 +102,8 @@ buildPythonPackage rec { "test_dummies" "test_from_dummies_args" "test_rolling_step_method" + ] ++ lib.optionals stdenv.isDarwin [ + "test_plotting" # Fatal Python error: Illegal instruction ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/passlib/default.nix b/pkgs/development/python-modules/passlib/default.nix index 0ced7c057545f..72892a109539c 100644 --- a/pkgs/development/python-modules/passlib/default.nix +++ b/pkgs/development/python-modules/passlib/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchPypi , argon2-cffi @@ -25,12 +26,16 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.argon2 - ++ passthru.optional-dependencies.bcrypt - ++ passthru.optional-dependencies.totp; + ++ passthru.optional-dependencies.bcrypt + ++ passthru.optional-dependencies.totp; disabledTests = [ # timming sensitive "test_dummy_verify" + ] + # These tests fail because they don't expect support for algorithms provided through libxcrypt + ++ lib.optionals stdenv.isDarwin [ + "test_82_crypt_support" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/peaqevcore/default.nix b/pkgs/development/python-modules/peaqevcore/default.nix index dc8bd7e433b04..8ca7b10fb5619 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 = "7.0.8"; + version = "7.0.10"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-B6N9JLjbezYMO1119OR58cDhKY1ry7FKf+Q9wpHGiBE="; + hash = "sha256-97Evn/FT1SCQaiSNKBi0akajc7LkywqzJQEaqxm6s+U="; }; postPatch = '' diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix index 0afb0dab52ee3..089088a09bd34 100644 --- a/pkgs/development/python-modules/peewee/default.nix +++ b/pkgs/development/python-modules/peewee/default.nix @@ -34,9 +34,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ apsw - ] ++ lib.optional withPostgres [ + ] ++ lib.optionals withPostgres [ psycopg2 - ] ++ lib.optional withMysql [ + ] ++ lib.optionals withMysql [ mysql-connector ]; diff --git a/pkgs/development/python-modules/pex/default.nix b/pkgs/development/python-modules/pex/default.nix index a5321f9a3ecb8..0984dd3e04929 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.111"; + version = "2.1.112"; format = "flit"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-C7ihItw9tRXzaaD3WBZT2HnifnZS///pAODmxmp/sVw="; + hash = "sha256-Mwns3l0cUylbMxC55wIZyYklVtqcPEQ02+5oxNd5SbQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/phonemizer/default.nix b/pkgs/development/python-modules/phonemizer/default.nix index 550a4fefd25a5..38e5f8533eb32 100644 --- a/pkgs/development/python-modules/phonemizer/default.nix +++ b/pkgs/development/python-modules/phonemizer/default.nix @@ -1,7 +1,7 @@ { lib , stdenv , substituteAll -, buildPythonApplication +, buildPythonPackage , fetchPypi , joblib , segments @@ -13,17 +13,18 @@ , pytest-cov }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "phonemizer"; version = "3.2.1"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-Bo+F+FqKmtxjijeHrqyvcaU+R1eLEtdzwJdDNQDNiSs="; + hash = "sha256-Bo+F+FqKmtxjijeHrqyvcaU+R1eLEtdzwJdDNQDNiSs="; }; postPatch = '' - sed -i -e '/\'pytest-runner\'/d setup.py + sed -i '/pytest-runner/d setup.py ''; patches = [ diff --git a/pkgs/development/python-modules/pillow-simd/default.nix b/pkgs/development/python-modules/pillow-simd/default.nix index e856c2f578528..b39a86a7fbfcc 100644 --- a/pkgs/development/python-modules/pillow-simd/default.nix +++ b/pkgs/development/python-modules/pillow-simd/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, buildPythonPackage, fetchFromGitHub, isPyPy, isPy3k -, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2 +, olefile, freetype, libjpeg, zlib, libtiff, libwebp, libxcrypt, tcl, lcms2 , libxcb, tk, libX11, openjpeg, libimagequant, pyroma, numpy, defusedxml , pytestCheckHook }@args: diff --git a/pkgs/development/python-modules/pillow/default.nix b/pkgs/development/python-modules/pillow/default.nix index 017069a7dd2d4..6e50be53f99d0 100644 --- a/pkgs/development/python-modules/pillow/default.nix +++ b/pkgs/development/python-modules/pillow/default.nix @@ -4,7 +4,7 @@ , pythonOlder , fetchPypi , isPyPy -, defusedxml, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11 +, defusedxml, olefile, freetype, libjpeg, zlib, libtiff, libwebp, libxcrypt, tcl, lcms2, tk, libX11 , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook # for passthru.tests , imageio, matplotlib, pilkit, pydicom, reportlab diff --git a/pkgs/development/python-modules/pillow/generic.nix b/pkgs/development/python-modules/pillow/generic.nix index ec4f052638206..54f730751076e 100644 --- a/pkgs/development/python-modules/pillow/generic.nix +++ b/pkgs/development/python-modules/pillow/generic.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook pyroma numpy ]; - buildInputs = [ freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ] + buildInputs = [ freetype libjpeg openjpeg libimagequant zlib libtiff libwebp libxcrypt tcl lcms2 ] ++ lib.optionals (lib.versionAtLeast version "7.1.0") [ libxcb ] ++ lib.optionals (isPyPy) [ tk libX11 ]; diff --git a/pkgs/development/python-modules/playwright/default.nix b/pkgs/development/python-modules/playwright/default.nix index cea762819573e..d9adb09e0db13 100644 --- a/pkgs/development/python-modules/playwright/default.nix +++ b/pkgs/development/python-modules/playwright/default.nix @@ -43,7 +43,7 @@ let sha256 = { x86_64-linux = "0x71b4kb8hlyacixipgfbgjgrbmhckxpbmrs2xk8iis7n5kg7539"; aarch64-linux = "125lih7g2gj91k7j196wy5a5746wyfr8idj3ng369yh5wl7lfcfv"; - x86_64-darwin = "0z2kww4iby1izkwn6z2ai94y87bkjvwak8awdmjm8sgg00pa9l1a"; + x86_64-darwin = "sha256-TzprR95KHYBu9SruI4BgwCaqI7KKe3HuzgCO1A5YFiM="; aarch64-darwin = "0qajh4ac5lr1sznb2c471r5c5g2r0dk2pyqz8vhvnbk36r524h1h"; }.${system} or throwSystem; }; @@ -114,7 +114,7 @@ let jq ]; } ('' - BROWSERS_JSON=${driver}/share/playwright-driver/package/browsers.json + BROWSERS_JSON=${driver}/package/browsers.json '' + lib.optionalString withChromium '' CHROMIUM_REVISION=$(jq -r '.browsers[] | select(.name == "chromium").revision' $BROWSERS_JSON) mkdir -p $out/chromium-$CHROMIUM_REVISION/chrome-linux @@ -200,7 +200,7 @@ buildPythonPackage rec { "playwright" ]; - passthru = { + passthru = rec { inherit driver; browsers = { x86_64-linux = browsers-linux { }; @@ -210,6 +210,10 @@ buildPythonPackage rec { }.${system} or throwSystem; browsers-chromium = browsers-linux { withFirefox = false; }; browsers-firefox = browsers-linux { withChromium = false; }; + + tests = { + inherit driver browsers; + }; }; meta = with lib; { diff --git a/pkgs/development/python-modules/plugwise/default.nix b/pkgs/development/python-modules/plugwise/default.nix index 8852462761f95..9a938bdaa0ea8 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.25.3"; + version = "0.25.4"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = pname; repo = "python-plugwise"; rev = "refs/tags/v${version}"; - sha256 = "sha256-vfdU0jzbfKJbIN343CWIwCK+tYt3ScgPhjq0+9NSiL8="; + sha256 = "sha256-avriroWSgBn80PzGEuvp/5yad9Q4onSxWLaLlpXDReo="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/poetry-core/default.nix b/pkgs/development/python-modules/poetry-core/default.nix index 737985ece249f..e90529dac6d0b 100644 --- a/pkgs/development/python-modules/poetry-core/default.nix +++ b/pkgs/development/python-modules/poetry-core/default.nix @@ -15,15 +15,16 @@ buildPythonPackage rec { pname = "poetry-core"; - version = "1.1.0"; + version = "1.3.2"; format = "pyproject"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "python-poetry"; repo = pname; rev = version; - sha256 = "sha256-WUgBrO9h1E7N2SVFD47UPv39DMx1yQviV5tcNPmR+/g="; + hash = "sha256-3Ryfq0MwrL/mKP8DmkhLOyFlulf3c73z9fFIzMuqOrg="; }; propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ @@ -41,13 +42,20 @@ buildPythonPackage rec { virtualenv ]; - # requires git history to work correctly - disabledTests = [ "default_with_excluded_data" "default_src_with_excluded_data" ]; + # Requires git history to work correctly + disabledTests = [ + "default_with_excluded_data" + "default_src_with_excluded_data" + ]; - pythonImportsCheck = [ "poetry.core" ]; + pythonImportsCheck = [ + "poetry.core" + ]; - # allow for package to use pep420's native namespaces - pythonNamespaces = [ "poetry" ]; + # Allow for package to use pep420's native namespaces + pythonNamespaces = [ + "poetry" + ]; meta = with lib; { description = "Core utilities for Poetry"; diff --git a/pkgs/development/python-modules/poetry-plugin-export/default.nix b/pkgs/development/python-modules/poetry-plugin-export/default.nix index bd953fb612782..bbf6013e4fd33 100644 --- a/pkgs/development/python-modules/poetry-plugin-export/default.nix +++ b/pkgs/development/python-modules/poetry-plugin-export/default.nix @@ -6,14 +6,14 @@ buildPythonPackage rec { pname = "poetry-plugin-export"; - version = "1.0.6"; + version = "1.1.2"; format = "pyproject"; src = fetchFromGitHub { owner = "python-poetry"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-wZbXIAGKTvbcYN1Sx9MCPVIiHxHzdpbLOVShHBEWUVU="; + hash = "sha256-+BDBQwYaiddq3OQDHKmLap3ehWJe+Gh5D3TwuNXycjg="; }; postPatch = '' diff --git a/pkgs/development/python-modules/poetry/default.nix b/pkgs/development/python-modules/poetry/default.nix index 3105187c98a71..a76bb773a84a3 100644 --- a/pkgs/development/python-modules/poetry/default.nix +++ b/pkgs/development/python-modules/poetry/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { pname = "poetry"; - version = "1.2.0"; + version = "1.2.2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -50,7 +50,7 @@ buildPythonPackage rec { owner = "python-poetry"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-+Nsg7oPh9tAHEKt1R9C+nY9UPy+9vbf/+A6vQWgTi+4="; + hash = "sha256-huIjLv1T42HEmePCQNJpKnNxJKdyD9MlEtc2WRPOjRE="; }; postPatch = '' @@ -106,8 +106,15 @@ buildPythonPackage rec { pytest-xdist ]; - preCheck = '' + preCheck = ('' export HOME=$TMPDIR + '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + # https://github.com/python/cpython/issues/74570#issuecomment-1093748531 + export no_proxy='*'; + ''); + + postCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + unset no_proxy ''; disabledTests = [ diff --git a/pkgs/development/python-modules/poetry2conda/default.nix b/pkgs/development/python-modules/poetry2conda/default.nix deleted file mode 100644 index 7f5268a23dc46..0000000000000 --- a/pkgs/development/python-modules/poetry2conda/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib -, buildPythonApplication -, fetchFromGitHub -, pytest-mock -, pytestCheckHook -, toml -, poetry -, poetry-semver -, pyyaml -}: - -buildPythonApplication rec { - pname = "poetry2conda"; - version = "0.3.0"; - - format = "pyproject"; - - src = fetchFromGitHub { - owner = "dojeda"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-UqNoEGgStvqtxhYwExk7wO4SvATaM2kGaFbB5ViJa7U="; - }; - - nativeBuildInputs = [ poetry ]; - - propagatedBuildInputs = [ - poetry-semver - toml - ]; - - checkInputs = [ - pytest-mock - pytestCheckHook - pyyaml - ]; - - meta = with lib; { - description = "A script to convert a Python project declared on a pyproject.toml to a conda environment"; - homepage = "https://github.com/dojeda/poetry2conda"; - license = licenses.mit; - maintainers = with maintainers; [ cpcloud ]; - }; -} diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix index 241953cda3ed2..e97db8beefe0b 100644 --- a/pkgs/development/python-modules/pybind11/default.nix +++ b/pkgs/development/python-modules/pybind11/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , buildPythonPackage +, pythonOlder , fetchFromGitHub , cmake , boost @@ -9,6 +10,7 @@ , catch , numpy , pytestCheckHook +, libxcrypt }: buildPythonPackage rec { @@ -27,6 +29,7 @@ buildPythonPackage rec { ''; nativeBuildInputs = [ cmake ]; + buildInputs = lib.optionals (pythonOlder "3.9") [ libxcrypt ]; dontUseCmakeBuildDir = true; diff --git a/pkgs/development/python-modules/pycotap/default.nix b/pkgs/development/python-modules/pycotap/default.nix new file mode 100644 index 0000000000000..df7591459e2d3 --- /dev/null +++ b/pkgs/development/python-modules/pycotap/default.nix @@ -0,0 +1,18 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "pycotap"; + version = "1.2.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-+Tjs1JMczRnZWY+2M9Xqu3k48IuEcXMV5SUmqmJ3yew="; + }; + + meta = with lib; { + description = "Test runner for unittest that outputs TAP results to stdout"; + homepage = "https://el-tramo.be/pycotap"; + license = licenses.mit; + maintainers = with maintainers; [ mwolfe ]; + }; +} diff --git a/pkgs/development/python-modules/pygit2/default.nix b/pkgs/development/python-modules/pygit2/default.nix index 565cd6d67ec9d..413b79c562b1b 100644 --- a/pkgs/development/python-modules/pygit2/default.nix +++ b/pkgs/development/python-modules/pygit2/default.nix @@ -35,11 +35,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ cached-property pycparser - ] ++ lib.optional (!isPyPy) [ + ] ++ lib.optionals (!isPyPy) [ cffi ]; - propagatedNativeBuildInputs = lib.optional (!isPyPy) [ + propagatedNativeBuildInputs = lib.optionals (!isPyPy) [ cffi ]; diff --git a/pkgs/development/python-modules/pylitterbot/default.nix b/pkgs/development/python-modules/pylitterbot/default.nix index 5c56150e8f535..e84374e4f744f 100644 --- a/pkgs/development/python-modules/pylitterbot/default.nix +++ b/pkgs/development/python-modules/pylitterbot/default.nix @@ -43,6 +43,12 @@ buildPythonPackage rec { pytestCheckHook ]; + postPatch = '' + # https://github.com/natekspencer/pylitterbot/issues/73 + substituteInPlace pyproject.toml \ + --replace 'deepdiff = "^5.8.1"' 'deepdiff = ">=5.8.1"' + ''; + pytestFlagsArray = [ "--asyncio-mode=legacy" ]; diff --git a/pkgs/development/python-modules/pyls-mypy/default.nix b/pkgs/development/python-modules/pyls-mypy/default.nix index acce4469eed4d..ad387106e8854 100644 --- a/pkgs/development/python-modules/pyls-mypy/default.nix +++ b/pkgs/development/python-modules/pyls-mypy/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ mypy python-language-server configparser - ] ++ lib.optional (isPy27) [ + ] ++ lib.optionals (isPy27) [ future ]; diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix index dccf14a2d4cd1..8d361ccb6ec83 100644 --- a/pkgs/development/python-modules/pyopencl/default.nix +++ b/pkgs/development/python-modules/pyopencl/default.nix @@ -22,7 +22,7 @@ let if stdenv.isDarwin then [ mesa_drivers.dev ] else [ ocl-icd ]; in buildPythonPackage rec { pname = "pyopencl"; - version = "2022.2.3"; + version = "2022.2.4"; checkInputs = [ pytest ]; buildInputs = [ opencl-headers pybind11 ] ++ os-specific-buildInputs; @@ -40,7 +40,7 @@ in buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "sha256-IdpfCKq7wrL9yBRm/6rAfB25Sx9HqVvFf2M7VVkMy6I="; + sha256 = "sha256-tXye+L2ObbB+iRBvMJG6I2sk+Vo4/UDfsX0u1/9r5K0="; }; # py.test is not needed during runtime, so remove it from `install_requires` diff --git a/pkgs/development/python-modules/pypass/default.nix b/pkgs/development/python-modules/pypass/default.nix index 85d6c9d49bb0a..f70e40029992e 100644 --- a/pkgs/development/python-modules/pypass/default.nix +++ b/pkgs/development/python-modules/pypass/default.nix @@ -18,10 +18,8 @@ , xclip }: -# NOTE: pypass can also be used as an application, but probably the most -# important usecase is as a library. So, let's use buildPythonPackage and -# support any Python version instead of defining it as an application with -# buildPythonApplication. +# Use the `pypass` top-level attribute, if you're interested in the +# application buildPythonPackage rec { pname = "pypass"; version = "0.2.1"; diff --git a/pkgs/development/python-modules/pypdf2/default.nix b/pkgs/development/python-modules/pypdf2/default.nix index 3bee9f61780b4..8980a9ff592ba 100644 --- a/pkgs/development/python-modules/pypdf2/default.nix +++ b/pkgs/development/python-modules/pypdf2/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { meta = with lib; { description = "A Pure-Python library built as a PDF toolkit"; - homepage = "https://github.com/py-pdf/PyPDF2"; + homepage = "https://pypdf2.readthedocs.io/"; changelog = "https://github.com/py-pdf/PyPDF2/raw/${version}/CHANGELOG.md"; license = licenses.bsd3; maintainers = with maintainers; [ desiderius vrthra ]; diff --git a/pkgs/development/python-modules/pyprusalink/default.nix b/pkgs/development/python-modules/pyprusalink/default.nix new file mode 100644 index 0000000000000..7336dafe88dfb --- /dev/null +++ b/pkgs/development/python-modules/pyprusalink/default.nix @@ -0,0 +1,44 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "pyprusalink"; + version = "1.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "home-assistant-libs"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-XRtbb7kceiqi8pioTWStRo0drCtQfy1t62jCMihlIec="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + # Module doesn't have tests + doCheck = false; + + pythonImportsCheck = [ + "pyprusalink" + ]; + + meta = with lib; { + description = "Library to communicate with PrusaLink "; + homepage = "https://github.com/home-assistant-libs/pyprusalink"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pyreadstat/default.nix b/pkgs/development/python-modules/pyreadstat/default.nix index 4992d260471c4..c6197fcd74489 100644 --- a/pkgs/development/python-modules/pyreadstat/default.nix +++ b/pkgs/development/python-modules/pyreadstat/default.nix @@ -1,7 +1,9 @@ { lib +, stdenv , buildPythonPackage , cython , fetchFromGitHub +, libiconv , pandas , python , pythonOlder @@ -29,6 +31,8 @@ buildPythonPackage rec { buildInputs = [ zlib + ] ++ lib.optionals stdenv.isDarwin [ + libiconv ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pysol-cards/default.nix b/pkgs/development/python-modules/pysol-cards/default.nix new file mode 100644 index 0000000000000..7be154a315c99 --- /dev/null +++ b/pkgs/development/python-modules/pysol-cards/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, fetchPypi, six, random2 }: + +buildPythonPackage rec { + pname = "pysol-cards"; + version = "0.14.2"; + + src = fetchPypi { + inherit version; + pname = "pysol_cards"; + sha256 = "sha256-wI3oV1d7w+7JcMOt08RbNlMWzChErNYIO7Vuox1A6vA="; + }; + + propagatedBuildInputs = [ six random2 ]; + + meta = with lib; { + description = "Generates Solitaire deals"; + homepage = "https://github.com/shlomif/pysol_cards"; + license = licenses.mit; + maintainers = with maintainers; [ mwolfe ]; + }; +} diff --git a/pkgs/development/python-modules/pytest-xdist/setup-hook.sh b/pkgs/development/python-modules/pytest-xdist/setup-hook.sh index 5523a7f360f5f..61d0f64d1a4da 100644 --- a/pkgs/development/python-modules/pytest-xdist/setup-hook.sh +++ b/pkgs/development/python-modules/pytest-xdist/setup-hook.sh @@ -3,6 +3,14 @@ pytestXdistHook() { "--numprocesses=$NIX_BUILD_CORES" "--forked" ) + + # Using --forked on darwin leads to crashes when fork safety is + # enabled. This often happens when urllib tries to request proxy + # settings on MacOS through `urllib.request.getproxies()` + # - https://github.com/python/cpython/issues/77906 + if [[ "$OSTYPE" == "darwin"* ]]; then + export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES + fi } # the flags should be added before pytestCheckHook runs so diff --git a/pkgs/development/python-modules/python-csxcad/default.nix b/pkgs/development/python-modules/python-csxcad/default.nix index e6f22d37b55dd..66c1939c7edc1 100644 --- a/pkgs/development/python-modules/python-csxcad/default.nix +++ b/pkgs/development/python-modules/python-csxcad/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { matplotlib ]; - setupPyBuildFlags = "-I${openems}/include -L${openems}/lib -R${openems}/lib"; + setupPyBuildFlags = [ "-I${openems}/include" "-L${openems}/lib" "-R${openems}/lib" ]; meta = with lib; { description = "Python interface to CSXCAD"; diff --git a/pkgs/development/python-modules/python-glanceclient/default.nix b/pkgs/development/python-modules/python-glanceclient/default.nix index 4f63cca8a8b10..390aad8b55cd5 100644 --- a/pkgs/development/python-modules/python-glanceclient/default.nix +++ b/pkgs/development/python-modules/python-glanceclient/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , coreutils , pbr @@ -18,7 +18,7 @@ , requests-mock }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-glanceclient"; version = "4.1.0"; format = "setuptools"; diff --git a/pkgs/development/python-modules/python-heatclient/default.nix b/pkgs/development/python-modules/python-heatclient/default.nix index c51c222dd6fa9..df1fc0dc45970 100644 --- a/pkgs/development/python-modules/python-heatclient/default.nix +++ b/pkgs/development/python-modules/python-heatclient/default.nix @@ -1,6 +1,6 @@ { lib , babel -, buildPythonApplication +, buildPythonPackage , cliff , fetchPypi , iso8601 @@ -20,7 +20,7 @@ , testscenarios }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-heatclient"; version = "3.1.0"; format = "setuptools"; diff --git a/pkgs/development/python-modules/python-ironicclient/default.nix b/pkgs/development/python-modules/python-ironicclient/default.nix index 5f0f1d8dea532..bf41e95739e9c 100644 --- a/pkgs/development/python-modules/python-ironicclient/default.nix +++ b/pkgs/development/python-modules/python-ironicclient/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , pbr , appdirs @@ -18,7 +18,7 @@ , oslotest }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-ironicclient"; version = "5.0.1"; diff --git a/pkgs/development/python-modules/python-manilaclient/default.nix b/pkgs/development/python-modules/python-manilaclient/default.nix index 9a9e01ff4be75..301ce42f0c776 100644 --- a/pkgs/development/python-modules/python-manilaclient/default.nix +++ b/pkgs/development/python-modules/python-manilaclient/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , installShellFiles , pbr @@ -21,7 +21,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-manilaclient"; version = "4.1.0"; format = "setuptools"; diff --git a/pkgs/development/python-modules/python-miio/default.nix b/pkgs/development/python-modules/python-miio/default.nix index d1497c43bcb73..32d5d542c30ae 100644 --- a/pkgs/development/python-modules/python-miio/default.nix +++ b/pkgs/development/python-modules/python-miio/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pyyaml tqdm zeroconf - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; diff --git a/pkgs/development/python-modules/python-openems/default.nix b/pkgs/development/python-modules/python-openems/default.nix index dd669cf547545..348f10b3aeede 100644 --- a/pkgs/development/python-modules/python-openems/default.nix +++ b/pkgs/development/python-modules/python-openems/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { h5py ]; - setupPyBuildFlags = "-I${openems}/include -L${openems}/lib -R${openems}/lib"; + setupPyBuildFlags = [ "-I${openems}/include" "-L${openems}/lib" "-R${openems}/lib" ]; pythonImportsCheck = [ "openEMS" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/python-swiftclient/default.nix b/pkgs/development/python-modules/python-swiftclient/default.nix index 3329753d63342..f5a15a34f0ca5 100644 --- a/pkgs/development/python-modules/python-swiftclient/default.nix +++ b/pkgs/development/python-modules/python-swiftclient/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , installShellFiles , mock @@ -10,7 +10,7 @@ , stestr }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-swiftclient"; version = "4.1.0"; format = "setuptools"; diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix index 677322fc50d12..47d716d1c8685 100644 --- a/pkgs/development/python-modules/python-telegram-bot/default.nix +++ b/pkgs/development/python-modules/python-telegram-bot/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { --replace "tornado==6.1" "tornado" ''; - setupPyGlobalFlags = "--with-upstream-urllib3"; + setupPyGlobalFlags = [ "--with-upstream-urllib3" ]; # tests not included with release doCheck = false; diff --git a/pkgs/development/python-modules/pytz-deprecation-shim/default.nix b/pkgs/development/python-modules/pytz-deprecation-shim/default.nix index e438936f7e496..6ea1c2c8f2e03 100644 --- a/pkgs/development/python-modules/pytz-deprecation-shim/default.nix +++ b/pkgs/development/python-modules/pytz-deprecation-shim/default.nix @@ -43,6 +43,10 @@ buildPythonPackage rec { # https://github.com/pganssle/pytz-deprecation-shim/issues/27 doCheck = pythonAtLeast "3.9"; + disabledTests = [ + "test_localize_explicit_is_dst" + ]; + meta = with lib; { description = "Shims to make deprecation of pytz easier"; homepage = "https://github.com/pganssle/pytz-deprecation-shim"; diff --git a/pkgs/development/python-modules/qingping-ble/default.nix b/pkgs/development/python-modules/qingping-ble/default.nix index 3256d67b17d73..fa1c4ca4cb508 100644 --- a/pkgs/development/python-modules/qingping-ble/default.nix +++ b/pkgs/development/python-modules/qingping-ble/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "qingping-ble"; - version = "0.8.0"; + version = "0.8.2"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "bluetooth-devices"; repo = pname; rev = "v${version}"; - hash = "sha256-oUmehWOeweHSqhFmr+SQg2I6Au/6pYfl2s069yWMymo="; + hash = "sha256-vfezalq3x9KAMtwixUkIVQIwBO2zd+BDl+JwdRqBn7w="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/qutip/default.nix b/pkgs/development/python-modules/qutip/default.nix index e99deef489f32..519cb9957bcc8 100644 --- a/pkgs/development/python-modules/qutip/default.nix +++ b/pkgs/development/python-modules/qutip/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { ] ++ passthru.optional-dependencies.graphics; # Disabling OpenMP support on Darwin. - setupPyGlobalFlags = lib.optional (!stdenv.isDarwin) [ + setupPyGlobalFlags = lib.optionals (!stdenv.isDarwin) [ "--with-openmp" ]; diff --git a/pkgs/development/python-modules/ray/binary-hashes.nix b/pkgs/development/python-modules/ray/binary-hashes.nix new file mode 100644 index 0000000000000..28f9e2103334e --- /dev/null +++ b/pkgs/development/python-modules/ray/binary-hashes.nix @@ -0,0 +1,11 @@ +{ + cp38 = { + sha256 = "da8adfa33ff54bc61cfe80334a0ee889e0060918db6ff9215aebe32e98b1f939"; + }; + cp39 = { + sha256 = "cab13346650f88171b3f348ed352f04695b96d1ab1090ed3b80bdc93e897dbd4"; + }; + cp310 = { + sha256 = "bcf3bff9517d77ea6c98592fa16e1cfb8bc0cfa345d3be69729bfa9c5bd78a7c"; + }; +} diff --git a/pkgs/development/python-modules/ray/default.nix b/pkgs/development/python-modules/ray/default.nix new file mode 100644 index 0000000000000..c6b764181875a --- /dev/null +++ b/pkgs/development/python-modules/ray/default.nix @@ -0,0 +1,166 @@ +{ aiohttp +, aiohttp-cors +, aiorwlock +, aiosignal +, attrs +, autoPatchelfHook +, buildBazelPackage +, buildPythonPackage +, fetchPypi +, click +, cloudpickle +, colorama +, colorful +, cython +, dm-tree +, fastapi +, filelock +, frozenlist +, fsspec +, gpustat +, grpc +, grpcio +, gym +, jsonschema +, lib +, lz4 +, matplotlib +, msgpack +, numpy +, opencensus +, packaging +, pandas +, py-spy +, prometheus-client +, protobuf3_20 +, psutil +, pyarrow +, pydantic +, python +, pythonAtLeast +, pythonOlder +, pythonRelaxDepsHook +, pyyaml +, redis +, requests +, scikitimage +, scipy +, setproctitle +, smart-open +, starlette +, stdenv +, tabulate +, tensorboardx +, uvicorn +, virtualenv +}: + +let + pname = "ray"; + version = "2.0.0"; +in +buildPythonPackage rec { + inherit pname version; + format = "wheel"; + + disabled = pythonOlder "3.8" || pythonAtLeast "3.11"; + + src = + let + pyShortVersion = "cp${builtins.replaceStrings ["."] [""] python.pythonVersion}"; + binary-hash = (import ./binary-hashes.nix)."${pyShortVersion}"; + in + fetchPypi ({ + inherit pname version format; + dist = pyShortVersion; + python = pyShortVersion; + abi = pyShortVersion; + platform = "manylinux2014_x86_64"; + } // binary-hash); + + passthru.optional-dependencies = rec { + data-deps = [ + pandas + pyarrow + fsspec + ]; + + serve-deps = [ + aiorwlock + fastapi + pandas + starlette + uvicorn + ]; + + tune-deps = [ + tabulate + tensorboardx + ]; + + rllib-deps = tune-deps ++ [ + dm-tree + gym + lz4 + matplotlib + scikitimage + pyyaml + scipy + ]; + + air-deps = data-deps ++ serve-deps ++ tune-deps ++ rllib-deps; + }; + + nativeBuildInputs = [ + autoPatchelfHook + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ "grpcio" "click" "protobuf" ]; + + propagatedBuildInputs = [ + attrs + aiohttp + aiohttp-cors + aiosignal + click + cloudpickle + colorama + colorful + cython + filelock + frozenlist + gpustat + grpcio + jsonschema + msgpack + numpy + opencensus + packaging + py-spy + prometheus-client + protobuf3_20 + psutil + pydantic + pyyaml + requests + setproctitle + smart-open + virtualenv + ]; + + postInstall = '' + chmod +x $out/${python.sitePackages}/ray/core/src/ray/{gcs/gcs_server,raylet/raylet} + ln -sf ${redis}/bin/redis-server $out/${python.sitePackages}/ray/core/src/ray/thirdparty/redis/src/redis-server + ''; + + pythonImportsCheck = [ "ray" ]; + + meta = with lib; { + description = "A unified framework for scaling AI and Python applications"; + homepage = "https://github.com/ray-project/ray"; + license = licenses.asl20; + maintainers = with maintainers; [ billhuang ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/development/python-modules/rdflib/default.nix b/pkgs/development/python-modules/rdflib/default.nix index 1aa995d85d772..27356390cfdab 100644 --- a/pkgs/development/python-modules/rdflib/default.nix +++ b/pkgs/development/python-modules/rdflib/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { # Requires network access "test_service" "testGuessFormatForParse" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # Require loopback network access "TestGraphHTTP" ]; diff --git a/pkgs/development/python-modules/remarshal/default.nix b/pkgs/development/python-modules/remarshal/default.nix index 99c868eb0b804..2b7a20a2dd004 100644 --- a/pkgs/development/python-modules/remarshal/default.nix +++ b/pkgs/development/python-modules/remarshal/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub # build deps @@ -16,7 +16,7 @@ , pytestCheckHook }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "remarshal"; version = "0.14.0"; format = "pyproject"; diff --git a/pkgs/development/python-modules/rfc-bibtex/default.nix b/pkgs/development/python-modules/rfc-bibtex/default.nix deleted file mode 100644 index b9b7cdb76c4f3..0000000000000 --- a/pkgs/development/python-modules/rfc-bibtex/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, buildPythonApplication, fetchPypi, isPy3k }: - -buildPythonApplication rec { - pname = "rfc-bibtex"; - version = "0.3.2"; - - src = fetchPypi { - inherit pname version; - sha256 = "60419a2043ef37ac2438f3eae7a3207d0a4cb2dd56ab21697f874a35ee52927f"; - }; - - disabled = !isPy3k; - - meta = with lib; { - homepage = "https://github.com/iluxonchik/rfc-bibtex/"; - description = "Generate Bibtex entries for IETF RFCs and Internet-Drafts"; - license = licenses.mit; - maintainers = with maintainers; [ teto ]; - }; -} diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix index 36e7ca24fbdb1..c2cd935c651f0 100644 --- a/pkgs/development/python-modules/rich/default.nix +++ b/pkgs/development/python-modules/rich/default.nix @@ -35,9 +35,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ CommonMark pygments - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ dataclasses - ] ++ lib.optional (pythonOlder "3.9") [ + ] ++ lib.optionals (pythonOlder "3.9") [ typing-extensions ]; diff --git a/pkgs/development/python-modules/rns/default.nix b/pkgs/development/python-modules/rns/default.nix index b0d16afd5c280..825919dc10e8b 100644 --- a/pkgs/development/python-modules/rns/default.nix +++ b/pkgs/development/python-modules/rns/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "rns"; - version = "0.3.14"; + version = "0.3.16"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "markqvist"; repo = "Reticulum"; rev = "refs/tags/${version}"; - hash = "sha256-W5zQiGzuBHzEebVZjnVUO7Htx2/hnpeBHWoBfeXuaOQ="; + hash = "sha256-+TXIxyLLIWK0lLUyh4irTYHXZLAv8zFYUGKAbA7D9qA="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/roombapy/default.nix b/pkgs/development/python-modules/roombapy/default.nix index dff19589dcc43..beb72d8878268 100644 --- a/pkgs/development/python-modules/roombapy/default.nix +++ b/pkgs/development/python-modules/roombapy/default.nix @@ -61,6 +61,6 @@ buildPythonPackage rec { description = "Python program and library to control Wi-Fi enabled iRobot Roombas"; homepage = "https://github.com/pschmitt/roombapy"; license = licenses.mit; - maintainers = with maintainers; [ justinas ]; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index aa578d21d257e..e791454b9018f 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -54,6 +54,7 @@ buildPythonPackage rec { checkPhase = '' runHook preCheck pushd "$out" + export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 )) ${python.interpreter} -c "import scipy; scipy.test('fast', verbose=10, parallel=$NIX_BUILD_CORES)" popd runHook postCheck diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index 0657b91b8786d..988c0bf28c03d 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -12,6 +12,7 @@ , itemloaders , jmespath , lxml +, packaging , parsel , protego , pydispatcher @@ -30,7 +31,7 @@ buildPythonPackage rec { pname = "scrapy"; - version = "2.6.3"; + version = "2.7.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -38,7 +39,7 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "Scrapy"; - hash = "sha256-vf8arzVHwuVAQ206uGgLIQOTJ71dOi74nDQWWZLT5fM="; + hash = "sha256-Ssvg8fX7XqkTU1EriVjtMEvCX2373ig5oNh6SUNRWLk="; }; nativeBuildInputs = [ @@ -51,6 +52,7 @@ buildPythonPackage rec { itemadapter itemloaders lxml + packaging parsel protego pydispatcher @@ -103,6 +105,9 @@ buildPythonPackage rec { "FileFeedStoragePreFeedOptionsTest" # https://github.com/scrapy/scrapy/issues/5157 "test_timeout_download_from_spider_nodata_rcvd" "test_timeout_download_from_spider_server_hangs" + # Depends on uvloop + "test_asyncio_enabled_reactor_different_loop" + "test_asyncio_enabled_reactor_same_loop" # Fails with AssertionError "test_peek_fifo" "test_peek_one_element" diff --git a/pkgs/development/python-modules/screeninfo/default.nix b/pkgs/development/python-modules/screeninfo/default.nix index f67d68b0ddddf..574d3159494ac 100644 --- a/pkgs/development/python-modules/screeninfo/default.nix +++ b/pkgs/development/python-modules/screeninfo/default.nix @@ -1,6 +1,6 @@ { stdenv , lib -, buildPythonApplication +, buildPythonPackage , dataclasses , fetchFromGitHub , libX11 @@ -11,7 +11,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "screeninfo"; version = "0.8.1"; format = "pyproject"; diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix index c52cdeef956d5..894a60cee4a45 100644 --- a/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/pkgs/development/python-modules/sentry-sdk/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { pname = "sentry-sdk"; - version = "1.9.10"; + version = "1.10.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -55,7 +55,7 @@ buildPythonPackage rec { owner = "getsentry"; repo = "sentry-python"; rev = version; - hash = "sha256-ZrteALD+HsqUwkFDPih8adxNP5TO5JqdPFI8oMBphY4="; + hash = "sha256-la+MgVulQS6k6zux2mC7AiXqZWEU2LG/fGUUMFrBI6k="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/simple-di/default.nix b/pkgs/development/python-modules/simple-di/default.nix index c79b58f8a6296..150eb52f8d4ed 100644 --- a/pkgs/development/python-modules/simple-di/default.nix +++ b/pkgs/development/python-modules/simple-di/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ setuptools typing-extensions - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ dataclasses ]; diff --git a/pkgs/development/python-modules/skl2onnx/default.nix b/pkgs/development/python-modules/skl2onnx/default.nix index 4e8f95863119d..96511df4f83c2 100644 --- a/pkgs/development/python-modules/skl2onnx/default.nix +++ b/pkgs/development/python-modules/skl2onnx/default.nix @@ -10,6 +10,7 @@ , onnxruntime , pandas , unittestCheckHook +, pythonRelaxDepsHook }: buildPythonPackage rec { @@ -30,6 +31,12 @@ buildPythonPackage rec { onnxconverter-common ]; + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ "scikit-learn" ]; + checkInputs = [ onnxruntime pandas diff --git a/pkgs/development/python-modules/skrl/default.nix b/pkgs/development/python-modules/skrl/default.nix new file mode 100644 index 0000000000000..9747218157a54 --- /dev/null +++ b/pkgs/development/python-modules/skrl/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, gym +, torch +, tensorboard +, tqdm +, packaging +}: + +buildPythonPackage rec { + pname = "skrl"; + version = "0.8.0"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "Toni-SM"; + repo = pname; + rev = version; + hash = "sha256-NfKgQyD7PkPOTnkIua3fOfH7tHNGQEOVZ2HtvIg5HzA="; + }; + + propagatedBuildInputs = [ + gym + torch + tensorboard + tqdm + packaging + ]; + + checkInputs = [ pytestCheckHook ]; + doCheck = torch.cudaSupport; + + pythonImportsCheck = [ + "skrl" + "skrl.agents" + "skrl.agents.torch" + "skrl.envs" + "skrl.envs.torch" + "skrl.models" + "skrl.models.torch" + "skrl.resources" + "skrl.resources.noises" + "skrl.resources.noises.torch" + "skrl.resources.schedulers" + "skrl.resources.schedulers.torch" + "skrl.trainers" + "skrl.trainers.torch" + "skrl.utils" + "skrl.utils.model_instantiators" + ]; + + meta = with lib; { + description = "Reinforcement learning library using PyTorch focusing on readability and simplicity"; + homepage = "https://skrl.readthedocs.io"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/development/python-modules/snapcast/default.nix b/pkgs/development/python-modules/snapcast/default.nix index 0acf9cfd22c49..b076a391b1c9f 100644 --- a/pkgs/development/python-modules/snapcast/default.nix +++ b/pkgs/development/python-modules/snapcast/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "snapcast"; - version = "2.2.0"; + version = "2.3.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "happyleavesaoc"; repo = "python-snapcast"; rev = "refs/tags/${version}"; - hash = "sha256-H41X5bfRRu+uE7eUsmUkONm6hugNs43+O7MvVPH0e+8="; + hash = "sha256-De/dxZLNTJT6DuTa/piavNsLhr6lsPKqR5rQNrvwXGQ="; }; propagatedBuildInputs = [ @@ -34,6 +34,12 @@ buildPythonPackage rec { "snapcast" ]; + disabledTests = [ + # AssertionError and TypeError + "test_stream_setmeta" + "est_stream_setproperty" + ]; + meta = with lib; { description = "Control Snapcast, a multi-room synchronous audio solution"; homepage = "https://github.com/happyleavesaoc/python-snapcast/"; diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix index cc1c01adf288e..f197b1080fb3e 100644 --- a/pkgs/development/python-modules/spacy/default.nix +++ b/pkgs/development/python-modules/spacy/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { tqdm typer wasabi - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix index 0983fb7e7a738..5a27f04bd0ee0 100644 --- a/pkgs/development/python-modules/sphinx/default.nix +++ b/pkgs/development/python-modules/sphinx/default.nix @@ -107,7 +107,7 @@ buildPythonPackage rec { # requires imagemagick (increases build closure size), doesn't # test anything substantial "test_ext_imgconverter" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # Due to lack of network sandboxing can't guarantee port 7777 isn't bound "test_inspect_main_url" "test_auth_header_uses_first_match" diff --git a/pkgs/development/python-modules/starlette/default.nix b/pkgs/development/python-modules/starlette/default.nix index d1e8f789fc38c..78a428a2a724c 100644 --- a/pkgs/development/python-modules/starlette/default.nix +++ b/pkgs/development/python-modules/starlette/default.nix @@ -50,7 +50,7 @@ buildPythonPackage rec { typing-extensions ] ++ lib.optionals (pythonOlder "3.7") [ contextlib2 - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ ApplicationServices ]; diff --git a/pkgs/development/python-modules/sybil/default.nix b/pkgs/development/python-modules/sybil/default.nix index 41baf697fff36..2667f0af54647 100644 --- a/pkgs/development/python-modules/sybil/default.nix +++ b/pkgs/development/python-modules/sybil/default.nix @@ -1,11 +1,11 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , pytestCheckHook , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "sybil"; version = "3.0.1"; format = "setuptools"; diff --git a/pkgs/development/python-modules/tempest/default.nix b/pkgs/development/python-modules/tempest/default.nix index 7f50fc8f30231..654c8a9e2ab0b 100644 --- a/pkgs/development/python-modules/tempest/default.nix +++ b/pkgs/development/python-modules/tempest/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , pbr , cliff @@ -26,7 +26,7 @@ , python }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "tempest"; version = "32.0.0"; diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index b266f837f8499..ca3c818d34afa 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -82,7 +82,7 @@ in buildPythonPackage { ++ lib.optionals (pythonOlder "3.4") [ backports_weakref ]; # remove patchelfUnstable once patchelf 0.14 with https://github.com/NixOS/patchelf/pull/256 becomes the default - nativeBuildInputs = [ wheel ] ++ lib.optional cudaSupport [ addOpenGLRunpath patchelfUnstable ]; + nativeBuildInputs = [ wheel ] ++ lib.optionals cudaSupport [ addOpenGLRunpath patchelfUnstable ]; preConfigure = '' unset SOURCE_DATE_EPOCH diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 31fff4832052e..c8308b2f80ac1 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -483,7 +483,7 @@ in buildPythonPackage { ]; # remove patchelfUnstable once patchelf 0.14 with https://github.com/NixOS/patchelf/pull/256 becomes the default - nativeBuildInputs = lib.optional cudaSupport [ addOpenGLRunpath patchelfUnstable ]; + nativeBuildInputs = lib.optionals cudaSupport [ addOpenGLRunpath patchelfUnstable ]; postFixup = lib.optionalString cudaSupport '' find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 51ee2803f3cfd..6da1ae8944508 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -66,9 +66,9 @@ buildPythonPackage rec { tqdm pydantic wasabi - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ contextvars dataclasses ]; diff --git a/pkgs/development/python-modules/threadpoolctl/default.nix b/pkgs/development/python-modules/threadpoolctl/default.nix index 3a0b523784a36..c55bb1085309a 100644 --- a/pkgs/development/python-modules/threadpoolctl/default.nix +++ b/pkgs/development/python-modules/threadpoolctl/default.nix @@ -22,11 +22,25 @@ buildPythonPackage rec { sha256 = "sha256-/qt7cgFbvpc1BLZC7a4S0RToqSggKXAqF1Xr6xOqzw8="; }; - checkInputs = [ pytestCheckHook numpy scipy ]; + checkInputs = [ + pytestCheckHook + numpy + scipy + ]; + disabledTests = [ # accepts a limited set of cpu models based on project # developers' hardware "test_architecture" + # https://github.com/joblib/threadpoolctl/issues/128 + "test_threadpool_limits_by_prefix" + "test_controller_info_actualized" + "test_command_line_command_flag" + "test_command_line_import_flag" + ]; + + pythonImportsCheck = [ + "threadpoolctl" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index 672fcf75d3316..2c619f46ac375 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -25,6 +25,8 @@ # ninja (https://ninja-build.org) must be available to run C++ extensions tests, ninja, + linuxHeaders_5_19, + # dependencies for torch.utils.tensorboard pillow, six, future, tensorboard, protobuf, @@ -224,6 +226,7 @@ in buildPythonPackage rec { ] ++ lib.optionals cudaSupport [ cudatoolkit_joined ]; buildInputs = [ blas blas.provider pybind11 ] + ++ [ linuxHeaders_5_19 ] # TMP: avoid "flexible array member" errors for now ++ lib.optionals cudaSupport [ cudnn magma nccl ] ++ lib.optionals stdenv.isLinux [ numactl ] ++ lib.optionals stdenv.isDarwin [ CoreServices libobjc ]; diff --git a/pkgs/development/python-modules/transformers/default.nix b/pkgs/development/python-modules/transformers/default.nix index 3e66d95af993d..0acebc45bd6cd 100644 --- a/pkgs/development/python-modules/transformers/default.nix +++ b/pkgs/development/python-modules/transformers/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "transformers"; - version = "4.22.2"; + version = "4.23.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -33,7 +33,7 @@ buildPythonPackage rec { owner = "huggingface"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-7TM06YS/8U1Y7qtrraV+Iw+ASIWUAFi/lcfFGp1nEJ0="; + hash = "sha256-Ziye3lop91VICMVEC42ulE7CU6PfHot8Ij8YZxIS3J0="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index fa6c4726222c9..fae5ef8cf1039 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -97,6 +97,9 @@ buildPythonPackage rec { echo 'MulticastTests.test_multicast.skip = "Reactor was unclean"'>> src/twisted/test/test_udp.py echo 'MulticastTests.test_multiListen.skip = "No such device"'>> src/twisted/test/test_udp.py + # fails since migrating to libxcrypt + echo 'HelperTests.test_refuteCryptedPassword.skip = "OSError: Invalid argument"' >> src/twisted/conch/test/test_checkers.py + # not packaged substituteInPlace src/twisted/test/test_failure.py \ --replace "from cython_test_exception_raiser import raiser # type: ignore[import]" "raiser = None" diff --git a/pkgs/development/python-modules/tzdata/default.nix b/pkgs/development/python-modules/tzdata/default.nix index c701d3683cdb5..d1fed0b21fa96 100644 --- a/pkgs/development/python-modules/tzdata/default.nix +++ b/pkgs/development/python-modules/tzdata/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook pytest-subtests - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ importlib-resources ]; diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index b1ad380f04b96..40f07f62ce164 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -23,7 +23,6 @@ , pytest-mock , pytest-xdist , pytestCheckHook -, python-dateutil , pythonOlder , pythonRelaxDepsHook , torch @@ -40,16 +39,16 @@ buildPythonPackage rec { pname = "wandb"; - version = "0.12.21"; + version = "0.13.4"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = pname; - repo = "client"; + repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-jKb2pNmCW4MYz6ncsMNg7o5giCI2bpKER/kb8lfJekI="; + hash = "sha256-+3fLExLQChXKx1LCnNvPLNTUzopP+D+6tOikFrjdysY="; }; patches = [ @@ -73,7 +72,6 @@ buildPythonPackage rec { promise protobuf psutil - python-dateutil pyyaml requests sentry-sdk @@ -109,11 +107,26 @@ buildPythonPackage rec { disabledTestPaths = [ # Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment. - "tests/unit_tests/integrations/test_keras.py" - "tests/unit_tests/integrations/test_torch.py" + "tests/unit_tests_old/test_cli.py" + "tests/unit_tests_old/test_data_types.py" + "tests/unit_tests_old/test_file_stream.py" + "tests/unit_tests_old/test_file_upload.py" + "tests/unit_tests_old/test_footer.py" + "tests/unit_tests_old/test_internal_api.py" + "tests/unit_tests_old/test_keras.py" + "tests/unit_tests_old/test_metric_internal.py" + "tests/unit_tests_old/test_public_api.py" + "tests/unit_tests_old/test_report_api.py" + "tests/unit_tests_old/test_runtime.py" + "tests/unit_tests_old/test_sender.py" + "tests/unit_tests_old/test_tb_watcher.py" + "tests/unit_tests_old/test_time_resolution.py" + "tests/unit_tests_old/test_wandb_agent.py" + "tests/unit_tests_old/test_wandb_artifacts.py" + "tests/unit_tests_old/test_wandb_integration.py" + "tests/unit_tests_old/test_wandb_run.py" "tests/unit_tests/test_cli.py" "tests/unit_tests/test_data_types.py" - "tests/unit_tests/test_file_stream.py" "tests/unit_tests/test_file_upload.py" "tests/unit_tests/test_footer.py" "tests/unit_tests/test_internal_api.py" @@ -125,31 +138,15 @@ buildPythonPackage rec { "tests/unit_tests/test_mode_disabled.py" "tests/unit_tests/test_model_workflows.py" "tests/unit_tests/test_mp_full.py" + "tests/unit_tests/test_plots.py" "tests/unit_tests/test_public_api.py" - "tests/unit_tests/test_redir.py" "tests/unit_tests/test_runtime.py" "tests/unit_tests/test_sender.py" "tests/unit_tests/test_start_method.py" "tests/unit_tests/test_tb_watcher.py" "tests/unit_tests/test_telemetry_full.py" - "tests/unit_tests/test_util.py" - "tests/unit_tests/wandb_agent_test.py" - "tests/unit_tests/wandb_artifacts_test.py" - "tests/unit_tests/wandb_integration_test.py" - "tests/unit_tests/wandb_run_test.py" - "tests/unit_tests/wandb_settings_test.py" - "tests/unit_tests/wandb_sweep_test.py" - "tests/unit_tests/wandb_tensorflow_test.py" - "tests/unit_tests/wandb_verify_test.py" "tests/unit_tests/test_tpu.py" - "tests/unit_tests/test_plots.py" - "tests/unit_tests/test_report_api.py" - - # Requires metaflow, which is not yet packaged. - "tests/unit_tests/integrations/test_metaflow.py" - - # Fails and borks the pytest runner as well. - "tests/unit_tests/wandb_test.py" + "tests/unit_tests/test_util.py" # Tries to access /homeless-shelter "tests/unit_tests/test_tables.py" @@ -157,7 +154,7 @@ buildPythonPackage rec { # Disable test that fails on darwin due to issue with python3Packages.psutil: # https://github.com/giampaolo/psutil/issues/1219 - disabledTests = lib.optional stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.isDarwin [ "test_tpu_system_stats" ]; diff --git a/pkgs/development/python-modules/wandb/hardcode-git-path.patch b/pkgs/development/python-modules/wandb/hardcode-git-path.patch index 23097c535e067..ff1a4f2567fa3 100644 --- a/pkgs/development/python-modules/wandb/hardcode-git-path.patch +++ b/pkgs/development/python-modules/wandb/hardcode-git-path.patch @@ -10,12 +10,12 @@ index 82fadfe1..25c1454c 100644 + s, o = subprocess.getstatusoutput("@git@ rev-parse HEAD") if s: return - wandb_local = f"git+https://github.com/wandb/client.git@{o}#egg=wandb" + wandb_local = f"git+https://github.com/wandb/wandb.git@{o}#egg=wandb" diff --git a/wandb/cli/cli.py b/wandb/cli/cli.py index 5767e61c..56009fec 100644 --- a/wandb/cli/cli.py +++ b/wandb/cli/cli.py -@@ -1745,7 +1745,7 @@ def restore(ctx, run, no_git, branch, project, entity): +@@ -1917,7 +1917,7 @@ def restore(ctx, run, no_git, branch, project, entity): commit, json_config, patch_content, metadata = api.run_config( project, run=run, entity=entity ) @@ -24,8 +24,8 @@ index 5767e61c..56009fec 100644 image = metadata.get("docker") restore_message = ( """`wandb restore` needs to be run from the same git repository as the original run. -@@ -1764,7 +1764,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" - +@@ -1936,7 +1936,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" + if commit and api.git.enabled: wandb.termlog(f"Fetching origin and finding commit: {commit}") - subprocess.check_call(["git", "fetch", "--all"]) @@ -33,7 +33,7 @@ index 5767e61c..56009fec 100644 try: api.git.repo.commit(commit) except ValueError: -@@ -1818,7 +1818,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" +@@ -1990,7 +1990,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" # --reject is necessary or else this fails any time a binary file # occurs in the diff exit_code = subprocess.call( @@ -42,19 +42,6 @@ index 5767e61c..56009fec 100644 ) if exit_code == 0: wandb.termlog("Applied patch") -diff --git a/wandb/sdk/internal/internal_api.py b/wandb/sdk/internal/internal_api.py -index 612220b9..b761bfbd 100644 ---- a/wandb/sdk/internal/internal_api.py -+++ b/wandb/sdk/internal/internal_api.py -@@ -660,7 +660,7 @@ class Api: - ) - patch = BytesIO() - if self.git.dirty: -- self.git.repo.git.execute(["git", "diff"], output_stream=patch) -+ self.git.repo.git.execute(["@git@", "diff"], output_stream=patch) - patch.seek(0) - cwd = "." - if self.git.enabled: diff --git a/wandb/sdk/internal/meta.py b/wandb/sdk/internal/meta.py index 6c53f750..c385951a 100644 --- a/wandb/sdk/internal/meta.py @@ -67,7 +54,7 @@ index 6c53f750..c385951a 100644 + diff_args = ["@git@", "diff"] if self._git.has_submodule_diff: diff_args.append("--submodule=diff") - + diff --git a/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py b/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py index 614df9f5..38db460b 100644 --- a/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py diff --git a/pkgs/development/python-modules/web3/default.nix b/pkgs/development/python-modules/web3/default.nix index b07bc9cee9d75..8515ccda36254 100644 --- a/pkgs/development/python-modules/web3/default.nix +++ b/pkgs/development/python-modules/web3/default.nix @@ -56,7 +56,7 @@ buildPythonPackage rec { protobuf requests websockets - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ] ++ eth-hash.optional-dependencies.pycryptodome; diff --git a/pkgs/development/python-modules/yamllint/default.nix b/pkgs/development/python-modules/yamllint/default.nix index 58d47d1fff9ca..ca092cef8c72e 100644 --- a/pkgs/development/python-modules/yamllint/default.nix +++ b/pkgs/development/python-modules/yamllint/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { disabledTests = [ # test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373 "test_find_files_recursively" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # locale tests are broken on BSDs; see https://github.com/adrienverge/yamllint/issues/307 "test_locale_accents" "test_locale_case" diff --git a/pkgs/development/python-modules/yolk/default.nix b/pkgs/development/python-modules/yolk/default.nix deleted file mode 100644 index d241e3f8edc03..0000000000000 --- a/pkgs/development/python-modules/yolk/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, fetchurl, buildPythonApplication, pythonPackages }: - -with lib; - -buildPythonApplication rec { - pname = "yolk"; - version = "0.4.3"; - - src = fetchurl { - url = "mirror://pypi/y/yolk/yolk-${version}.tar.gz"; - sha256 = "1f6xwx210jnl5nq0m3agh2p1cxmaizawaf3fwq43q4yw050fn1qw"; - }; - - buildInputs = with pythonPackages; [ nose ]; - - meta = { - description = "Command-line tool for querying PyPI and Python packages installed on your system"; - homepage = "https://github.com/cakebread/yolk"; - maintainers = with maintainers; []; - license = licenses.bsd3; - }; -} - diff --git a/pkgs/development/python-modules/zha-quirks/default.nix b/pkgs/development/python-modules/zha-quirks/default.nix index 0f5601bd4851a..b48804ed86709 100644 --- a/pkgs/development/python-modules/zha-quirks/default.nix +++ b/pkgs/development/python-modules/zha-quirks/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "zha-quirks"; - version = "0.0.82"; + version = "0.0.83"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "zigpy"; repo = "zha-device-handlers"; rev = "refs/tags/${version}"; - hash = "sha256-2pm0fLPw/ROjYwvaL1wyZ39ZAbAjwc1TPsbYsO0+vcI="; + hash = "sha256-N+DSaPohwkMJ+YjbnUi7k8GQ+YFd6Ng8n0yesEnOnRA="; }; propagatedBuildInputs = [ |