diff --git a/pkgs/development/python-modules/hydrus-api/default.nix b/pkgs/development/python-modules/hydrus-api/default.nix index 0ce083570536..9d62af64cea7 100644 --- a/pkgs/development/python-modules/hydrus-api/default.nix +++ b/pkgs/development/python-modules/hydrus-api/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "hydrus-api"; version = "5.0.1"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; @@ -20,15 +20,9 @@ buildPythonPackage rec { hash = "sha256-3Roeab9/woGF/aZYm9nbqrcyYN8CKA1k66cTRxx6jM4="; }; - postPatch = '' - substituteInPlace pyproject.toml --replace \ - "poetry.masonry.api" \ - "poetry.core.masonry.api" - ''; + build-system = [ poetry-core ]; - nativeBuildInputs = [ poetry-core ]; - - propagatedBuildInputs = [ requests ]; + dependencies = [ requests ]; pythonImportsCheck = [ "hydrus_api" ]; diff --git a/pkgs/development/python-modules/imagecorruptions/default.nix b/pkgs/development/python-modules/imagecorruptions/default.nix index 37a7e1e7056b..fa92484160e1 100644 --- a/pkgs/development/python-modules/imagecorruptions/default.nix +++ b/pkgs/development/python-modules/imagecorruptions/default.nix @@ -1,6 +1,7 @@ { buildPythonPackage, fetchPypi, + setuptools, numpy, scikit-image, lib, @@ -10,19 +11,18 @@ buildPythonPackage rec { pname = "imagecorruptions"; version = "1.1.2"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "044e173f24d5934899bdbf3596bfbec917e8083e507eed583ab217abebbe084d"; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "'opencv-python >= 3.4.5'," "" - ''; + pythonRemoveDeps = [ "opencv-python" ]; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ numpy scikit-image opencv4 diff --git a/pkgs/development/python-modules/imantics/default.nix b/pkgs/development/python-modules/imantics/default.nix index 88e8e4835ce4..2204450bed74 100644 --- a/pkgs/development/python-modules/imantics/default.nix +++ b/pkgs/development/python-modules/imantics/default.nix @@ -2,6 +2,7 @@ buildPythonPackage, fetchFromGitHub, lib, + setuptools, numpy, opencv4, lxml, @@ -12,7 +13,7 @@ buildPythonPackage rec { pname = "imantics"; version = "0.1.12"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "jsbroks"; @@ -21,18 +22,17 @@ buildPythonPackage rec { sha256 = "1zv2gj8cbakhh2fyr2611cbqhfk37a56x973ny9n43y70n26pzm8"; }; - propagatedBuildInputs = [ + pythonRemoveDeps = [ "opencv-python" ]; + + build-system = [ setuptools ]; + + dependencies = [ numpy opencv4 lxml xmljson ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "'opencv-python>=3'," "" - ''; - nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "imantics" ]; diff --git a/pkgs/development/python-modules/jupyter-c-kernel/default.nix b/pkgs/development/python-modules/jupyter-c-kernel/default.nix index 77c3f6379f16..ba5b3ff85d40 100644 --- a/pkgs/development/python-modules/jupyter-c-kernel/default.nix +++ b/pkgs/development/python-modules/jupyter-c-kernel/default.nix @@ -1,6 +1,7 @@ { lib, buildPythonPackage, + setuptools, fetchPypi, ipykernel, gcc, @@ -9,7 +10,7 @@ buildPythonPackage rec { pname = "jupyter-c-kernel"; version = "1.2.2"; - format = "setuptools"; + pyproject = true; src = fetchPypi { pname = "jupyter_c_kernel"; @@ -19,10 +20,12 @@ buildPythonPackage rec { postPatch = '' substituteInPlace jupyter_c_kernel/kernel.py \ - --replace "'gcc'" "'${gcc}/bin/gcc'" + --replace-fail "'gcc'" "'${gcc}/bin/gcc'" ''; - propagatedBuildInputs = [ ipykernel ]; + build-system = [ setuptools ]; + + dependencies = [ ipykernel ]; # no tests in repository doCheck = false; diff --git a/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix b/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix index 216beb5fc5fe..c40866fd3d82 100644 --- a/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix +++ b/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix @@ -5,13 +5,14 @@ fetchFromGitHub, jupyterhub, pythonOlder, + setuptools, tornado, }: buildPythonPackage rec { pname = "jupyterhub-systemdspawner"; version = "1.0.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.8"; @@ -23,16 +24,13 @@ buildPythonPackage rec { }; postPatch = '' - substituteInPlace systemdspawner/systemd.py \ - --replace "/bin/bash" "${bash}/bin/bash" - substituteInPlace systemdspawner/systemdspawner.py \ - --replace "/bin/bash" "${bash}/bin/bash" + --replace-fail "/bin/bash" "${bash}/bin/bash" ''; - buildInputs = [ bash ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ jupyterhub tornado ]; diff --git a/pkgs/development/python-modules/jupyterlab-execute-time/default.nix b/pkgs/development/python-modules/jupyterlab-execute-time/default.nix index 8af2907fe092..f2efc2e7d5e8 100644 --- a/pkgs/development/python-modules/jupyterlab-execute-time/default.nix +++ b/pkgs/development/python-modules/jupyterlab-execute-time/default.nix @@ -1,8 +1,9 @@ -{ lib -, buildPythonPackage -, fetchPypi -, jupyterlab -, jupyter-packaging +{ + lib, + buildPythonPackage, + fetchPypi, + jupyterlab, + jupyter-packaging, }: buildPythonPackage rec { @@ -19,7 +20,7 @@ buildPythonPackage rec { # jupyterlab is required to build from source but we use the pre-build package postPatch = '' substituteInPlace pyproject.toml \ - --replace '"jupyterlab~=4.0.0"' "" + --replace-fail '"jupyterlab~=4.0.0"' "" ''; dependencies = [ diff --git a/pkgs/development/python-modules/karton-autoit-ripper/default.nix b/pkgs/development/python-modules/karton-autoit-ripper/default.nix index 7974ad57c49e..b71bd366ad41 100644 --- a/pkgs/development/python-modules/karton-autoit-ripper/default.nix +++ b/pkgs/development/python-modules/karton-autoit-ripper/default.nix @@ -3,6 +3,7 @@ autoit-ripper, buildPythonPackage, fetchFromGitHub, + setuptools, karton-core, malduck, pythonOlder, @@ -12,31 +13,32 @@ buildPythonPackage rec { pname = "karton-autoit-ripper"; version = "1.2.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "CERT-Polska"; - repo = pname; + repo = "karton-autoit-ripper"; rev = "refs/tags/v${version}"; hash = "sha256-D+M3JsIN8LUWg8GVweEzySHI7KaBb6cNHHn4pXoq55M="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + pythonRelaxDeps = [ + "autoit-ripper" + "malduck" + "regex" + ]; + + dependencies = [ autoit-ripper karton-core malduck regex ]; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "autoit-ripper==" "autoit-ripper>=" \ - --replace "malduck==" "malduck>=" \ - --replace "regex==" "regex>=" - ''; - # Module has no tests doCheck = false; diff --git a/pkgs/development/python-modules/karton-classifier/default.nix b/pkgs/development/python-modules/karton-classifier/default.nix index 21bd3f5679d8..8e98ab9d1d2b 100644 --- a/pkgs/development/python-modules/karton-classifier/default.nix +++ b/pkgs/development/python-modules/karton-classifier/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, chardet, fetchFromGitHub, + setuptools, karton-core, pytestCheckHook, python-magic, @@ -12,18 +13,25 @@ buildPythonPackage rec { pname = "karton-classifier"; version = "2.0.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "CERT-Polska"; - repo = pname; + repo = "karton-classifier"; rev = "refs/tags/v${version}"; hash = "sha256-DH8I4Lbbs2TVMvYlvh/P2I/7O4+VechP2JDDVHNsTSg="; }; - propagatedBuildInputs = [ + pythonRelaxDeps = [ + "chardet" + "python-magic" + ]; + + build-system = [ setuptools ]; + + dependencies = [ chardet karton-core python-magic @@ -31,12 +39,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "chardet==3.0.4" "chardet" \ - --replace "python-magic==0.4.18" "python-magic" - ''; - pythonImportsCheck = [ "karton.classifier" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/keyring-pass/default.nix b/pkgs/development/python-modules/keyring-pass/default.nix index bf618e9a136a..0409bd995c99 100644 --- a/pkgs/development/python-modules/keyring-pass/default.nix +++ b/pkgs/development/python-modules/keyring-pass/default.nix @@ -24,10 +24,10 @@ buildPythonPackage rec { postPatch = '' substituteInPlace keyring_pass/__init__.py \ - --replace 'pass_binary = "pass"' 'pass_binary = "${lib.getExe pass}"' + --replace-fail 'pass_binary = "pass"' 'pass_binary = "${lib.getExe pass}"' ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; nativeCheckInputs = [ keyring diff --git a/pkgs/development/python-modules/keyrings-cryptfile/default.nix b/pkgs/development/python-modules/keyrings-cryptfile/default.nix index d9cd3f4a0e04..4db10bd0ed5a 100644 --- a/pkgs/development/python-modules/keyrings-cryptfile/default.nix +++ b/pkgs/development/python-modules/keyrings-cryptfile/default.nix @@ -3,16 +3,18 @@ argon2-cffi, buildPythonPackage, fetchPypi, + setuptools, keyring, pycryptodome, pytestCheckHook, + pytest-cov-stub, pythonOlder, }: buildPythonPackage rec { pname = "keyrings-cryptfile"; version = "1.3.9"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.5"; @@ -22,12 +24,9 @@ buildPythonPackage rec { hash = "sha256-fCpFPKuZhUJrjCH3rVSlfkn/joGboY4INAvYgBrPAJE="; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "-s --cov=keyrings/cryptfile" "" - ''; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ argon2-cffi keyring pycryptodome @@ -35,7 +34,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "keyrings.cryptfile" ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + ]; disabledTests = [ # FileNotFoundError: [Errno 2] No such file or directory: '/build/... diff --git a/pkgs/development/python-modules/kneed/default.nix b/pkgs/development/python-modules/kneed/default.nix index 0852d12a7340..1148522ab5a8 100644 --- a/pkgs/development/python-modules/kneed/default.nix +++ b/pkgs/development/python-modules/kneed/default.nix @@ -7,12 +7,13 @@ scipy, matplotlib, pytestCheckHook, + pytest-cov-stub, }: buildPythonPackage rec { pname = "kneed"; version = "0.8.5"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "arvkevi"; @@ -21,20 +22,16 @@ buildPythonPackage rec { sha256 = "sha256-oakP6NkdvTzMZcoXS6cKNsRo//K+CoPLlhvbQLGij00="; }; - postPatch = '' - substituteInPlace pytest.ini \ - --replace "--cov=kneed" "" - ''; + build-system = [ hatchling ]; - nativeBuildInputs = [ hatchling ]; - - propagatedBuildInputs = [ + dependencies = [ numpy scipy ]; checkInputs = [ pytestCheckHook + pytest-cov-stub matplotlib ]; diff --git a/pkgs/development/python-modules/libais/default.nix b/pkgs/development/python-modules/libais/default.nix index b68c21f7c7cf..df31f4c53fec 100644 --- a/pkgs/development/python-modules/libais/default.nix +++ b/pkgs/development/python-modules/libais/default.nix @@ -4,13 +4,14 @@ fetchPypi, pytestCheckHook, pythonOlder, + setuptools, six, }: buildPythonPackage rec { pname = "libais"; version = "0.17"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -19,12 +20,9 @@ buildPythonPackage rec { hash = "sha256-6yrqIpjF6XaSfXSOTA0B4f3aLcHXkgA/3WBZBBNQ018="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "'pytest-runner'," "" - ''; + build-system = [ setuptools ]; - propagatedBuildInputs = [ six ]; + dependencies = [ six ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/libpurecool/default.nix b/pkgs/development/python-modules/libpurecool/default.nix index 26b857f0c0b9..5564bb1d22a7 100644 --- a/pkgs/development/python-modules/libpurecool/default.nix +++ b/pkgs/development/python-modules/libpurecool/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + setuptools, netifaces, paho-mqtt, pycryptodome, @@ -13,7 +14,7 @@ buildPythonPackage rec { pname = "libpurecool"; version = "0.6.4"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -24,10 +25,12 @@ buildPythonPackage rec { postPatch = '' rm libpurecool/zeroconf.py substituteInPlace libpurecool/dyson_pure_cool_link.py \ - --replace "from .zeroconf import ServiceBrowser, Zeroconf" "from zeroconf import ServiceBrowser, Zeroconf" + --replace-fail "from .zeroconf import ServiceBrowser, Zeroconf" "from zeroconf import ServiceBrowser, Zeroconf" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ netifaces paho-mqtt pycryptodome diff --git a/pkgs/development/python-modules/limnoria/default.nix b/pkgs/development/python-modules/limnoria/default.nix index edc94e07471c..4c19f6e772c9 100644 --- a/pkgs/development/python-modules/limnoria/default.nix +++ b/pkgs/development/python-modules/limnoria/default.nix @@ -1,6 +1,7 @@ { lib, buildPythonPackage, + setuptools, chardet, cryptography, feedparser, @@ -17,7 +18,7 @@ buildPythonPackage rec { pname = "limnoria"; version = "2024.5.30"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -26,7 +27,9 @@ buildPythonPackage rec { hash = "sha256-uKJMeC1dXhQp1CGbtdnqmELFO64VWblhABGfpKHGCZQ="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ chardet cryptography feedparser @@ -40,7 +43,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace "version=version" 'version="${version}"' + --replace-fail "version=version" 'version="${version}"' ''; checkPhase = '' diff --git a/pkgs/development/python-modules/markdown-macros/default.nix b/pkgs/development/python-modules/markdown-macros/default.nix index cc524efb5aa1..aad691159b69 100644 --- a/pkgs/development/python-modules/markdown-macros/default.nix +++ b/pkgs/development/python-modules/markdown-macros/default.nix @@ -3,13 +3,14 @@ buildPythonPackage, fetchPypi, fetchpatch, + setuptools, markdown, }: buildPythonPackage rec { pname = "markdown-macros"; version = "0.1.2"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -27,10 +28,12 @@ buildPythonPackage rec { ]; prePatch = '' - substituteInPlace setup.py --replace "distribute" "setuptools" + substituteInPlace setup.py --replace-fail "distribute" "setuptools" ''; - propagatedBuildInputs = [ markdown ]; + build-system = [ setuptools ]; + + dependencies = [ markdown ]; doCheck = false; diff --git a/pkgs/development/python-modules/marshmallow-polyfield/default.nix b/pkgs/development/python-modules/marshmallow-polyfield/default.nix index 0852091f4774..28fea8cedaf6 100644 --- a/pkgs/development/python-modules/marshmallow-polyfield/default.nix +++ b/pkgs/development/python-modules/marshmallow-polyfield/default.nix @@ -5,6 +5,7 @@ marshmallow, pythonOlder, pytestCheckHook, + pytest-cov-stub, setuptools, }: @@ -22,16 +23,14 @@ buildPythonPackage rec { hash = "sha256-jbpeyih2Ccw1Rk+QcXRO9AfN5B/DhZmxa/M6FzXHqqs="; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov=marshmallow_polyfield" "" - ''; + build-system = [ setuptools ]; - nativeBuildInputs = [ setuptools ]; + dependencies = [ marshmallow ]; - propagatedBuildInputs = [ marshmallow ]; - - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + ]; pythonImportsCheck = [ "marshmallow" ]; diff --git a/pkgs/development/python-modules/matplotlib-sixel/default.nix b/pkgs/development/python-modules/matplotlib-sixel/default.nix index ac1b1a256370..98da9405ad1b 100644 --- a/pkgs/development/python-modules/matplotlib-sixel/default.nix +++ b/pkgs/development/python-modules/matplotlib-sixel/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + setuptools, imagemagick, matplotlib, }: @@ -9,18 +10,20 @@ buildPythonPackage rec { pname = "matplotlib-sixel"; version = "0.0.2"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-JXOb1/IacJV8bhDvF+OPs2Yg1tgRDOqwiAQfiSKTlew="; }; - propagatedBuildInputs = [ matplotlib ]; + build-system = [ setuptools ]; + + dependencies = [ matplotlib ]; postPatch = '' substituteInPlace sixel/sixel.py \ - --replace 'Popen(["convert",' 'Popen(["${imagemagick}/bin/convert",' + --replace-fail 'Popen(["convert",' 'Popen(["${imagemagick}/bin/convert",' ''; pythonImportsCheck = [ "sixel" ]; diff --git a/pkgs/development/python-modules/mayim/default.nix b/pkgs/development/python-modules/mayim/default.nix index ee383cbb7ca9..49d4a23c80e1 100644 --- a/pkgs/development/python-modules/mayim/default.nix +++ b/pkgs/development/python-modules/mayim/default.nix @@ -11,6 +11,7 @@ # test pytest-asyncio, + pytest-cov-stub, pytestCheckHook, }: @@ -27,16 +28,11 @@ buildPythonPackage rec { hash = "sha256-nb0E9kMEJUihaCp8RnqGh0nSyDQo50eL1C4K5lBPlPQ="; }; - nativeBuildInputs = [ + build-system = [ setuptools wheel ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "--cov=src --cov-append --cov-report term-missing" "" - ''; - passthru.optional-dependencies = { postgres = [ psycopg ] ++ psycopg.optional-dependencies.pool; mysql = [ asyncmy ]; @@ -47,6 +43,7 @@ buildPythonPackage rec { [ pytestCheckHook pytest-asyncio + pytest-cov-stub ] ++ (with passthru.optional-dependencies; [ postgres diff --git a/pkgs/development/python-modules/mesonpep517/default.nix b/pkgs/development/python-modules/mesonpep517/default.nix index f47f40e0d1f9..4256dbe6ece4 100644 --- a/pkgs/development/python-modules/mesonpep517/default.nix +++ b/pkgs/development/python-modules/mesonpep517/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "mesonpep517"; version = "0.2"; - format = "pyproject"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -26,15 +26,15 @@ buildPythonPackage rec { # postPatch = '' substituteInPlace pyproject.toml \ - --replace 'backend-path = "."' 'backend-path = ["."]' + --replace-fail 'backend-path = "."' 'backend-path = ["."]' ''; - nativeBuildInputs = [ + build-system = [ setuptools wheel ]; - propagatedBuildInputs = [ toml ]; + dependencies = [ toml ]; propagatedNativeBuildInputs = [ meson diff --git a/pkgs/development/python-modules/mkdocs-jupyter/default.nix b/pkgs/development/python-modules/mkdocs-jupyter/default.nix index c64987e32a28..f50ed05a643f 100644 --- a/pkgs/development/python-modules/mkdocs-jupyter/default.nix +++ b/pkgs/development/python-modules/mkdocs-jupyter/default.nix @@ -10,13 +10,14 @@ nbconvert, pygments, pytestCheckHook, + pytest-cov-stub, pythonOlder, }: buildPythonPackage rec { pname = "mkdocs-jupyter"; version = "0.24.8"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -26,19 +27,11 @@ buildPythonPackage rec { hash = "sha256-Cadi9ITVQNnA6UTTSyjLU2oyhp4iS0YOL8eRsUP3aUA="; }; - postPatch = '' - sed -i "/--cov/d" pyproject.toml - substituteInPlace src/mkdocs_jupyter/tests/test_base_usage.py \ - --replace "[\"mkdocs\"," "[\"${mkdocs.out}/bin/mkdocs\"," - ''; - pythonRelaxDeps = [ "nbconvert" ]; - nativeBuildInputs = [ - hatchling - ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + dependencies = [ ipykernel jupytext mkdocs @@ -47,7 +40,10 @@ buildPythonPackage rec { pygments ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + ]; pythonImportsCheck = [ "mkdocs_jupyter" ]; diff --git a/pkgs/development/python-modules/mlrose/default.nix b/pkgs/development/python-modules/mlrose/default.nix index fa12508f522e..284222299cd3 100644 --- a/pkgs/development/python-modules/mlrose/default.nix +++ b/pkgs/development/python-modules/mlrose/default.nix @@ -4,6 +4,7 @@ buildPythonPackage, fetchFromGitHub, fetchpatch, + setuptools, scikit-learn, pytestCheckHook, pytest-randomly, @@ -12,7 +13,7 @@ buildPythonPackage rec { pname = "mlrose"; version = "1.3.0"; - format = "setuptools"; + pyproject = true; disabled = isPy27; src = fetchFromGitHub { @@ -30,14 +31,15 @@ buildPythonPackage rec { }) ]; - propagatedBuildInputs = [ scikit-learn ]; + build-system = [ setuptools ]; + dependencies = [ scikit-learn ]; nativeCheckInputs = [ pytest-randomly pytestCheckHook ]; postPatch = '' - substituteInPlace setup.py --replace sklearn scikit-learn + substituteInPlace setup.py --replace-fail sklearn scikit-learn ''; pythonImportsCheck = [ "mlrose" ]; diff --git a/pkgs/development/python-modules/monai-deploy/default.nix b/pkgs/development/python-modules/monai-deploy/default.nix index d5a1c315d495..f719b47cf8b3 100644 --- a/pkgs/development/python-modules/monai-deploy/default.nix +++ b/pkgs/development/python-modules/monai-deploy/default.nix @@ -31,15 +31,15 @@ buildPythonPackage rec { # Asked in https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/450 # if this patch can be incorporated upstream. substituteInPlace pyproject.toml \ - --replace 'versioneer-518' 'versioneer' + --replace-fail 'versioneer-518' 'versioneer' ''; - nativeBuildInputs = [ + build-system = [ versioneer setuptools ]; - propagatedBuildInputs = [ + dependencies = [ numpy networkx colorama diff --git a/pkgs/development/python-modules/nameko/default.nix b/pkgs/development/python-modules/nameko/default.nix index b5d445c33f44..11730ac66487 100644 --- a/pkgs/development/python-modules/nameko/default.nix +++ b/pkgs/development/python-modules/nameko/default.nix @@ -32,12 +32,12 @@ buildPythonPackage rec { }; postPatch = '' - substituteInPlace setup.py --replace "path.py" "path" + substituteInPlace setup.py --replace-fail "path.py" "path" ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ dnspython eventlet kombu diff --git a/pkgs/development/python-modules/niworkflows/default.nix b/pkgs/development/python-modules/niworkflows/default.nix index d6eb920d36d4..1816cdbd20a3 100644 --- a/pkgs/development/python-modules/niworkflows/default.nix +++ b/pkgs/development/python-modules/niworkflows/default.nix @@ -40,16 +40,14 @@ buildPythonPackage rec { hash = "sha256-29ZxLuKrvgCIOMMCUpi0HHhlNlgqUrUrSCiikwecmKw="; }; - postPatch = '' - substituteInPlace pyproject.toml --replace '"traits < 6.4"' '"traits"' - ''; + pythonRelaxDeps = [ "traits" ]; - nativeBuildInputs = [ + build-system = [ hatch-vcs hatchling ]; - propagatedBuildInputs = [ + dependencies = [ attrs importlib-resources jinja2 diff --git a/pkgs/development/python-modules/nix-kernel/default.nix b/pkgs/development/python-modules/nix-kernel/default.nix index 5c4b270d2e7a..a14a12b5b4f0 100644 --- a/pkgs/development/python-modules/nix-kernel/default.nix +++ b/pkgs/development/python-modules/nix-kernel/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + setuptools, isPy3k, pexpect, notebook, @@ -11,7 +12,7 @@ buildPythonPackage rec { pname = "nix-kernel"; version = "unstable-2020-04-26"; - format = "setuptools"; + pyproject = true; disabled = !isPy3k; @@ -24,14 +25,16 @@ buildPythonPackage rec { postPatch = '' substituteInPlace nix-kernel/kernel.py \ - --replace "'nix'" "'${nix}/bin/nix'" \ - --replace "'nix repl'" "'${nix}/bin/nix repl'" + --replace-fail "'nix'" "'${nix}/bin/nix'" \ + --replace-fail "'nix repl'" "'${nix}/bin/nix repl'" substituteInPlace setup.py \ - --replace "cmdclass={'install': install_with_kernelspec}," "" + --replace-fail "cmdclass={'install': install_with_kernelspec}," "" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ pexpect notebook ]; diff --git a/pkgs/development/python-modules/packet-python/default.nix b/pkgs/development/python-modules/packet-python/default.nix index bc50624aa03b..631248fe8bad 100644 --- a/pkgs/development/python-modules/packet-python/default.nix +++ b/pkgs/development/python-modules/packet-python/default.nix @@ -4,6 +4,7 @@ fetchPypi, pytestCheckHook, pythonOlder, + setuptools, requests, requests-mock, }: @@ -11,7 +12,7 @@ buildPythonPackage rec { pname = "packet-python"; version = "1.44.3"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -22,10 +23,12 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace "pytest-runner" "" + --replace-fail "pytest-runner" "" ''; - propagatedBuildInputs = [ requests ]; + build-system = [ setuptools ]; + + dependencies = [ requests ]; nativeCheckInputs = [ pytestCheckHook diff --git a/pkgs/development/python-modules/pglast/default.nix b/pkgs/development/python-modules/pglast/default.nix index edf70ea2cb9d..02a11e0f01a7 100644 --- a/pkgs/development/python-modules/pglast/default.nix +++ b/pkgs/development/python-modules/pglast/default.nix @@ -5,12 +5,13 @@ pythonOlder, setuptools, pytest, + pytest-cov-stub, }: buildPythonPackage rec { pname = "pglast"; version = "6.2"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -19,14 +20,14 @@ buildPythonPackage rec { hash = "sha256-mGP7o52Wun6AdE2jMAJBmLR10EmN50qzbMzB06BFXMg="; }; - propagatedBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov=pglast --cov-report term-missing" "" - ''; + dependencies = [ setuptools ]; - nativeCheckInputs = [ pytest ]; + nativeCheckInputs = [ + pytest + pytest-cov-stub + ]; # pytestCheckHook doesn't work # ImportError: cannot import name 'parse_sql' from 'pglast' diff --git a/pkgs/development/python-modules/pika-pool/default.nix b/pkgs/development/python-modules/pika-pool/default.nix index 42b52c525853..1a458de4076a 100644 --- a/pkgs/development/python-modules/pika-pool/default.nix +++ b/pkgs/development/python-modules/pika-pool/default.nix @@ -2,27 +2,28 @@ lib, buildPythonPackage, fetchPypi, + setuptools, pika, }: buildPythonPackage rec { pname = "pika-pool"; version = "0.1.3"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "f3985888cc2788cdbd293a68a8b5702a9c955db6f7b8b551aeac91e7f32da397"; }; - postPatch = '' - substituteInPlace setup.py --replace "pika >=0.9,<0.11" "pika" - ''; + pythonRelaxDeps = [ "pika" ]; + + build-system = [ setuptools ]; # Tests require database connections doCheck = false; - propagatedBuildInputs = [ pika ]; + dependencies = [ pika ]; meta = with lib; { homepage = "https://github.com/bninja/pika-pool"; license = licenses.bsdOriginal; diff --git a/pkgs/development/python-modules/podcats/default.nix b/pkgs/development/python-modules/podcats/default.nix index e8069792072b..f95fb719212f 100644 --- a/pkgs/development/python-modules/podcats/default.nix +++ b/pkgs/development/python-modules/podcats/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + setuptools, flask, mutagen, }: @@ -9,7 +10,7 @@ buildPythonPackage rec { pname = "podcats"; version = "0.5.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "jakubroztocil"; @@ -18,12 +19,14 @@ buildPythonPackage rec { sha256 = "0zjdgry5n209rv19kj9yaxy7c7zq5gxr488izrgs4sc75vdzz8xc"; }; - patchPhase = '' + postPatch = '' substituteInPlace podcats.py \ - --replace 'debug=True' 'debug=True, use_reloader=False' + --replace-fail 'debug=True' 'debug=True, use_reloader=False' ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ flask mutagen ];