Merge pull request #336899 from pbsds/migrate-replace-fail-1724449467

This commit is contained in:
Franz Pletz 2024-08-25 01:22:31 +02:00 committed by GitHub
commit 46cd2ed16b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
39 changed files with 211 additions and 162 deletions

View File

@ -4,6 +4,7 @@
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
fetchpatch2, fetchpatch2,
setuptools,
cython_0, cython_0,
zfs, zfs,
}: }:
@ -27,16 +28,16 @@ buildPythonPackage rec {
}) })
]; ];
nativeBuildInputs = [ cython_0 ]; build-system = [ cython_0 ];
buildInputs = [ zfs ]; buildInputs = [ zfs ];
# Passing CFLAGS in configureFlags does not work, see https://github.com/truenas/py-libzfs/issues/107 # Passing CFLAGS in configureFlags does not work, see https://github.com/truenas/py-libzfs/issues/107
postPatch = lib.optionalString stdenv.isLinux '' postPatch = lib.optionalString stdenv.isLinux ''
substituteInPlace configure \ substituteInPlace configure \
--replace \ --replace-fail \
'CFLAGS="-DCYTHON_FALLTHROUGH"' \ 'CFLAGS="-DCYTHON_FALLTHROUGH"' \
'CFLAGS="-DCYTHON_FALLTHROUGH -I${zfs.dev}/include/libzfs -I${zfs.dev}/include/libspl"' \ 'CFLAGS="-DCYTHON_FALLTHROUGH -I${zfs.dev}/include/libzfs -I${zfs.dev}/include/libspl"' \
--replace 'zof=false' 'zof=true' --replace-fail 'zof=false' 'zof=true'
''; '';
pythonImportsCheck = [ "libzfs" ]; pythonImportsCheck = [ "libzfs" ];

View File

@ -20,7 +20,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pygmt"; pname = "pygmt";
version = "0.11.0"; version = "0.11.0";
format = "pyproject"; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
hypothesis, hypothesis,
pythonOlder, pythonOlder,
pytestCheckHook, pytestCheckHook,
@ -11,15 +12,17 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyisbn"; pname = "pyisbn";
version = "1.3.1"; version = "1.3.1";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "06fm9rn31cb4b61hzy63cnwfjpppgyy517k8a04gzcv9g60n7xbh"; hash = "sha256-cPVjgXlps/8IUGieULx/917puGXD+A+DWWSxMGxO1Rk=";
}; };
build-system = [ setuptools ];
nativeCheckInputs = [ nativeCheckInputs = [
hypothesis hypothesis
pytestCheckHook pytestCheckHook

View File

@ -12,7 +12,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pymarshal"; pname = "pymarshal";
version = "2.2.0"; version = "2.2.0";
format = "setuptools"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "stargateaudio"; owner = "stargateaudio";
@ -23,12 +23,12 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "'pytest-runner'" "" --replace-fail "'pytest-runner'" ""
''; '';
nativeBuildInputs = [ setuptools ]; build-system = [ setuptools ];
propagatedBuildInputs = [ bson ]; dependencies = [ bson ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook

View File

@ -4,26 +4,29 @@
buildPythonPackage, buildPythonPackage,
isPy3k, isPy3k,
fetchPypi, fetchPypi,
setuptools,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pymetar"; pname = "pymetar";
version = "1.4"; version = "1.4";
format = "setuptools"; pyproject = true;
disabled = !isPy3k; disabled = !isPy3k;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "48dbe6c4929961021cb61e49bb9e0605b54c4b61b9fb9ade51076705a08ecd54"; hash = "sha256-SNvmxJKZYQIcth5Ju54GBbVMS2G5+5reUQdnBaCOzVQ=";
}; };
build-system = [ setuptools ];
checkPhase = '' checkPhase = ''
cd testing/smoketest cd testing/smoketest
tar xzf reports.tgz tar xzf reports.tgz
mkdir logs mkdir logs
patchShebangs runtests.sh patchShebangs runtests.sh
substituteInPlace runtests.sh --replace "break" "exit 1" # fail properly substituteInPlace runtests.sh --replace-fail "break" "exit 1" # fail properly
export PYTHONPATH="$PYTHONPATH:$out/${python.sitePackages}" export PYTHONPATH="$PYTHONPATH:$out/${python.sitePackages}"
./runtests.sh ./runtests.sh
''; '';

View File

@ -3,6 +3,7 @@
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
fetchpatch, fetchpatch,
setuptools,
pytestCheckHook, pytestCheckHook,
writeText, writeText,
autograd, autograd,
@ -21,7 +22,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pymoo"; pname = "pymoo";
version = "0.6.0.1"; version = "0.6.0.1";
format = "setuptools"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "anyoptimization"; owner = "anyoptimization";
@ -45,19 +46,21 @@ buildPythonPackage rec {
}) })
]; ];
postPatch = '' pythonRelaxDeps = [ "cma" ];
substituteInPlace setup.py \ pythonRemoveDeps = [ "alive-progress" ];
--replace "cma==3.2.2" "cma" \
--replace "'alive-progress'," ""
postPatch = ''
substituteInPlace pymoo/util/display/display.py \ substituteInPlace pymoo/util/display/display.py \
--replace "from pymoo.util.display.progress import ProgressBar" "" \ --replace-fail "from pymoo.util.display.progress import ProgressBar" "" \
--replace "ProgressBar() if progress else None" \ --replace-fail "ProgressBar() if progress else None" \
"print('Missing alive_progress needed for progress=True!') if progress else None" "print('Missing alive_progress needed for progress=True!') if progress else None"
''; '';
nativeBuildInputs = [ cython ]; build-system = [
propagatedBuildInputs = [ setuptools
cython
];
dependencies = [
autograd autograd
cma cma
deprecated deprecated
@ -70,7 +73,7 @@ buildPythonPackage rec {
doCheck = true; doCheck = true;
preCheck = '' preCheck = ''
substituteInPlace pymoo/config.py \ substituteInPlace pymoo/config.py \
--replace "https://raw.githubusercontent.com/anyoptimization/pymoo-data/main/" \ --replace-fail "https://raw.githubusercontent.com/anyoptimization/pymoo-data/main/" \
"file://$pymoo_data/" "file://$pymoo_data/"
''; '';
nativeCheckInputs = [ nativeCheckInputs = [

View File

@ -3,13 +3,14 @@
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
pythonOlder, pythonOlder,
setuptools,
requests, requests,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyosf"; pname = "pyosf";
version = "1.0.5"; version = "1.0.5";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -22,12 +23,14 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "'pytest-runner', " "" --replace-fail "'pytest-runner', " ""
''; '';
preBuild = "export HOME=$TMP"; preBuild = "export HOME=$TMP";
propagatedBuildInputs = [ requests ]; build-system = [ setuptools ];
dependencies = [ requests ];
# Tests require network access # Tests require network access
doCheck = false; doCheck = false;

View File

@ -25,18 +25,15 @@ buildPythonPackage rec {
hash = "sha256-7FLGmmndrFqSl4oC8QFIYNlFJPr+xbiZG5ZRt4vx8+s="; hash = "sha256-7FLGmmndrFqSl4oC8QFIYNlFJPr+xbiZG5ZRt4vx8+s=";
}; };
postPatch = '' # https://github.com/osohotwateriot/apyosohotwaterapi/pull/3
# https://github.com/osohotwateriot/apyosohotwaterapi/pull/3 pythonRemoveDeps = [ "pre-commit" ];
substituteInPlace requirements.txt \
--replace "pre-commit" ""
'';
nativeBuildInputs = [ build-system = [
setuptools setuptools
unasync unasync
]; ];
propagatedBuildInputs = [ dependencies = [
aiohttp aiohttp
loguru loguru
numpy numpy

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
numpy, numpy,
pythonOlder, pythonOlder,
pyyaml, pyyaml,
@ -10,7 +11,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pysrim"; pname = "pysrim";
version = "0.5.10"; version = "0.5.10";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -21,10 +22,12 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "'pytest-runner', " "" --replace-fail "'pytest-runner', " ""
''; '';
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
numpy numpy
pyyaml pyyaml
]; ];

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
requests, requests,
requests-cache, requests-cache,
beautifulsoup4, beautifulsoup4,
@ -10,6 +11,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pysychonaut"; pname = "pysychonaut";
version = "0.6.0"; version = "0.6.0";
pyproject = true;
src = fetchPypi { src = fetchPypi {
pname = "PySychonaut"; pname = "PySychonaut";
@ -18,10 +20,12 @@ buildPythonPackage rec {
}; };
preConfigure = '' preConfigure = ''
substituteInPlace setup.py --replace "bs4" "beautifulsoup4" substituteInPlace setup.py --replace-fail "bs4" "beautifulsoup4"
''; '';
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
requests requests
requests-cache requests-cache
beautifulsoup4 beautifulsoup4

View File

@ -29,18 +29,18 @@ buildPythonPackage rec {
}; };
postPatch = '' postPatch = ''
substituteInPlace tests/conftest.py inventory \ substituteInPlace inventory \
--replace '/usr/bin/env' '${coreutils}/bin/env' --replace-fail '/usr/bin/env' '${lib.getExe' coreutils "env"}'
''; '';
nativeBuildInputs = [ build-system = [
setuptools setuptools
setuptools-scm setuptools-scm
]; ];
buildInputs = [ pytest ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ dependencies = [
ansible-core ansible-core
ansible-compat ansible-compat
packaging packaging

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
pylint, pylint,
pytest, pytest,
pytestCheckHook, pytestCheckHook,
@ -12,7 +13,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pytest-pylint"; pname = "pytest-pylint";
version = "0.21.0"; version = "0.21.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -23,12 +24,14 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "pytest-runner" "" --replace-fail "pytest-runner" ""
''; '';
build-system = [ setuptools ];
buildInputs = [ pytest ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ dependencies = [
pylint pylint
toml toml
]; ];

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
py, py,
pytest, pytest,
}: }:
@ -9,24 +10,20 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pytest-raisesregexp"; pname = "pytest-raisesregexp";
version = "2.1"; version = "2.1";
format = "setuptools"; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "b54372494fc1f11388b1b9348aeb36b69609699eb8f46e0e010afc733d78236a"; hash = "sha256-tUNySU/B8ROIsbk0ius2tpYJaZ649G4OAQr8cz14I2o=";
}; };
build-system = [ setuptools ];
buildInputs = [ buildInputs = [
py py
pytest pytest
]; ];
# https://github.com/kissgyorgy/pytest-raisesregexp/pull/3
prePatch = ''
sed -i '3i\import io' setup.py
substituteInPlace setup.py --replace "long_description=open('README.rst').read()," "long_description=io.open('README.rst', encoding='utf-8').read(),"
'';
meta = with lib; { meta = with lib; {
description = "Simple pytest plugin to look for regex in Exceptions"; description = "Simple pytest plugin to look for regex in Exceptions";
homepage = "https://github.com/Walkman/pytest_raisesregexp"; homepage = "https://github.com/Walkman/pytest_raisesregexp";

View File

@ -31,7 +31,7 @@ buildPythonPackage rec {
# Fix django tests # Fix django tests
postPatch = '' postPatch = ''
substituteInPlace tests/test_project/settings.py \ substituteInPlace tests/test_project/settings.py \
--replace "USE_L10N = True" "" --replace-fail "USE_L10N = True" ""
''; '';
patches = [ patches = [

View File

@ -26,12 +26,12 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "version.get_git_version()" '"${version}"' --replace-fail "version.get_git_version()" '"${version}"'
''; '';
nativeBuildInputs = [ setuptools ]; build-system = [ setuptools ];
propagatedBuildInputs = [ six ]; dependencies = [ six ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook

View File

@ -53,7 +53,7 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "'pytest-runner'" "" --replace-fail "'pytest-runner'" ""
''; '';
disabledTests = [ disabledTests = [

View File

@ -3,6 +3,7 @@
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
pythonOlder, pythonOlder,
setuptools,
jinja2, jinja2,
ply, ply,
iverilog, iverilog,
@ -12,7 +13,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyverilog"; pname = "pyverilog";
version = "1.3.0"; version = "1.3.0";
format = "setuptools"; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
@ -24,10 +25,14 @@ buildPythonPackage rec {
patchPhase = '' patchPhase = ''
# The path to Icarus can still be overridden via an environment variable at runtime. # The path to Icarus can still be overridden via an environment variable at runtime.
substituteInPlace pyverilog/vparser/preprocessor.py \ substituteInPlace pyverilog/vparser/preprocessor.py \
--replace "iverilog = 'iverilog'" "iverilog = '${iverilog}/bin/iverilog'" --replace-fail \
"iverilog = 'iverilog'" \
"iverilog = '${lib.getExe' iverilog "iverilog"}'"
''; '';
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
jinja2 jinja2
ply ply
iverilog iverilog
@ -35,7 +40,7 @@ buildPythonPackage rec {
preCheck = '' preCheck = ''
substituteInPlace pytest.ini \ substituteInPlace pytest.ini \
--replace "python_paths" "pythonpath" --replace-fail "python_paths" "pythonpath"
''; '';
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];

View File

@ -10,7 +10,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyweatherflowrest"; pname = "pyweatherflowrest";
version = "1.0.11"; version = "1.0.11";
format = "pyproject"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -21,14 +21,9 @@ buildPythonPackage rec {
hash = "sha256-l1V3HgzqnnoY6sWHwfgBtcIR782RwKhekY2qOLrUMNY="; hash = "sha256-l1V3HgzqnnoY6sWHwfgBtcIR782RwKhekY2qOLrUMNY=";
}; };
nativeBuildInputs = [ setuptools ]; build-system = [ setuptools ];
propagatedBuildInputs = [ aiohttp ]; dependencies = [ aiohttp ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=pyweatherflowrest --cov-append" ""
'';
# Module has no tests. test.py is a demo script # Module has no tests. test.py is a demo script
doCheck = false; doCheck = false;

View File

@ -1,6 +1,7 @@
{ {
lib, lib,
buildPythonPackage, buildPythonPackage,
setuptools,
certifi, certifi,
charset-normalizer, charset-normalizer,
fetchFromGitHub, fetchFromGitHub,
@ -17,7 +18,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "qualysclient"; pname = "qualysclient";
version = "0.0.4.8.3"; version = "0.0.4.8.3";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
@ -30,10 +31,12 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "version=__version__," 'version="${version}",' --replace-fail "version=__version__," 'version="${version}",'
''; '';
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
certifi certifi
charset-normalizer charset-normalizer
idna idna

View File

@ -20,7 +20,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "quart-cors"; pname = "quart-cors";
version = "0.7.0"; version = "0.7.0";
format = "pyproject"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "pgjones"; owner = "pgjones";
@ -29,9 +29,9 @@ buildPythonPackage rec {
hash = "sha256-qUzs0CTZHf3fGADBXPkd3CjZ6dnz1t3cTxflMErvz/k="; hash = "sha256-qUzs0CTZHf3fGADBXPkd3CjZ6dnz1t3cTxflMErvz/k=";
}; };
nativeBuildInputs = [ poetry-core ]; build-system = [ poetry-core ];
propagatedBuildInputs = [ quart ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ]; dependencies = [ quart ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
pythonImportsCheck = [ "quart_cors" ]; pythonImportsCheck = [ "quart_cors" ];

View File

@ -3,6 +3,7 @@
fetchPypi, fetchPypi,
fetchFromGitHub, fetchFromGitHub,
buildPythonPackage, buildPythonPackage,
setuptools,
absl-py, absl-py,
nltk, nltk,
numpy, numpy,
@ -22,7 +23,7 @@ in
buildPythonPackage rec { buildPythonPackage rec {
pname = "rouge-score"; pname = "rouge-score";
version = "0.1.2"; version = "0.1.2";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
@ -35,10 +36,14 @@ buildPythonPackage rec {
# the tar file from pypi doesn't come with the test data # the tar file from pypi doesn't come with the test data
postPatch = '' postPatch = ''
substituteInPlace rouge_score/test_util.py \ substituteInPlace rouge_score/test_util.py \
--replace 'os.path.join(os.path.dirname(__file__), "testdata")' '"${testdata}/rouge/testdata/"' --replace-fail \
'os.path.join(os.path.dirname(__file__), "testdata")' \
'"${testdata}/rouge/testdata/"'
''; '';
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
absl-py absl-py
nltk nltk
numpy numpy

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
sanic, sanic,
sanic-testing, sanic-testing,
pytestCheckHook, pytestCheckHook,
@ -10,15 +11,17 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "sanic-auth"; pname = "sanic-auth";
version = "0.3.0"; version = "0.3.0";
format = "setuptools"; pyproject = true;
src = fetchPypi { src = fetchPypi {
pname = "Sanic-Auth"; pname = "Sanic-Auth";
inherit version; inherit version;
sha256 = "0dc24ynqjraqwgvyk0g9bj87zgpq4xnssl24hnsn7l5vlkmk8198"; hash = "sha256-KAU066S70GO1hURQrW0n+L5/kFzpgen341hlia0ngjU=";
}; };
propagatedBuildInputs = [ sanic ]; build-system = [ setuptools ];
dependencies = [ sanic ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook
@ -33,7 +36,7 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
# Support for httpx>=0.20.0 # Support for httpx>=0.20.0
substituteInPlace tests/test_auth.py \ substituteInPlace tests/test_auth.py \
--replace "allow_redirects=False" "follow_redirects=False" --replace-fail "allow_redirects=False" "follow_redirects=False"
''; '';
pythonImportsCheck = [ "sanic_auth" ]; pythonImportsCheck = [ "sanic_auth" ];

View File

@ -51,7 +51,7 @@ buildPythonPackage rec {
# Strip out references to unfree fonts from the test suite # Strip out references to unfree fonts from the test suite
postPatch = '' postPatch = ''
substituteInPlace test/test_styles.ipynb --replace "font='Times', " "" substituteInPlace test/test_backend.ipynb --replace-fail "(font='Times')" "()"
''; '';
preCheck = "rm test/test_pictorial.ipynb"; # Tries to download files preCheck = "rm test/test_pictorial.ipynb"; # Tries to download files

View File

@ -1,9 +1,11 @@
{ {
lib, lib,
buildPythonPackage, buildPythonPackage,
setuptools,
fake-useragent, fake-useragent,
faker, faker,
fetchFromGitHub, fetchFromGitHub,
pytest-cov-stub,
pytest-mock, pytest-mock,
pytestCheckHook, pytestCheckHook,
pythonOlder, pythonOlder,
@ -13,7 +15,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "scrapy-fake-useragent"; pname = "scrapy-fake-useragent";
version = "1.4.4"; version = "1.4.4";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -27,15 +29,18 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace pytest.ini \ substituteInPlace pytest.ini \
--replace " --cov=scrapy_fake_useragent --cov-report=term --cov-report=html --fulltrace" "" --replace-fail " --fulltrace" ""
''; '';
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
fake-useragent fake-useragent
faker faker
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
pytest-cov-stub
pytest-mock pytest-mock
pytestCheckHook pytestCheckHook
scrapy scrapy

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
python-dateutil, python-dateutil,
attrs, attrs,
anyio, anyio,
@ -10,18 +11,22 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "semaphore-bot"; pname = "semaphore-bot";
version = "0.17.0"; version = "0.17.0";
format = "setuptools"; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit version pname; inherit version pname;
hash = "sha256-3zb6+HdOB6+YrVRcmIHsokFKUOlFmKCoVNllvM+aOXQ="; hash = "sha256-3zb6+HdOB6+YrVRcmIHsokFKUOlFmKCoVNllvM+aOXQ=";
}; };
postPatch = '' pythonRelaxDeps = [
substituteInPlace setup.py --replace "anyio>=3.5.0,<=3.6.2" "anyio" "anyio"
''; "attrs"
"python-dateutil"
];
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
anyio anyio
attrs attrs
python-dateutil python-dateutil

View File

@ -3,6 +3,7 @@
buildPythonPackage, buildPythonPackage,
pythonOlder, pythonOlder,
fetchFromGitHub, fetchFromGitHub,
setuptools,
certifi, certifi,
numpy, numpy,
sgp4, sgp4,
@ -16,7 +17,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "skyfield"; pname = "skyfield";
version = "1.45"; version = "1.45";
format = "setuptools"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "skyfielders"; owner = "skyfielders";
@ -29,10 +30,12 @@ buildPythonPackage rec {
# https://github.com/skyfielders/python-skyfield/issues/582#issuecomment-822033858 # https://github.com/skyfielders/python-skyfield/issues/582#issuecomment-822033858
postPatch = '' postPatch = ''
substituteInPlace skyfield/tests/test_planetarylib.py \ substituteInPlace skyfield/tests/test_planetarylib.py \
--replace "if IS_32_BIT" "if True" --replace-fail "if IS_32_BIT" "if True"
''; '';
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
certifi certifi
numpy numpy
sgp4 sgp4

View File

@ -2,24 +2,27 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
protobuf, protobuf,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "snakebite"; pname = "snakebite";
version = "2.11.0"; version = "2.11.0";
format = "setuptools"; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "085238b4944cb9c658ee62d5794de936ac3d0c337c504b2cc86424a205ae978a"; hash = "sha256-CFI4tJRMucZY7mLVeU3pNqw9DDN8UEssyGQkogWul4o=";
}; };
propagatedBuildInputs = [ protobuf ]; build-system = [ setuptools ];
dependencies = [ protobuf ];
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "'argparse'" "" --replace-fail "'argparse'" ""
''; '';
# Tests require hadoop hdfs # Tests require hadoop hdfs

View File

@ -14,7 +14,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "snakemake-storage-plugin-s3"; pname = "snakemake-storage-plugin-s3";
version = "0.2.12"; version = "0.2.12";
format = "pyproject"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "snakemake"; owner = "snakemake";
@ -23,14 +23,9 @@ buildPythonPackage rec {
hash = "sha256-TKv/7b3+uhY18v7p1ZSya5KJEMUv4M1NkObP9vPzMxU="; hash = "sha256-TKv/7b3+uhY18v7p1ZSya5KJEMUv4M1NkObP9vPzMxU=";
}; };
postPatch = '' build-system = [ poetry-core ];
substituteInPlace pyproject.toml \
--replace ">=2.0,<2.2" "*"
'';
nativeBuildInputs = [ poetry-core ]; dependencies = [
propagatedBuildInputs = [
boto3 boto3
botocore botocore
snakemake-interface-storage-plugins snakemake-interface-storage-plugins

View File

@ -12,7 +12,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "snakemake-storage-plugin-xrootd"; pname = "snakemake-storage-plugin-xrootd";
version = "unstable-2023-12-16"; version = "unstable-2023-12-16";
format = "pyproject"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "snakemake"; owner = "snakemake";
@ -22,14 +22,11 @@ buildPythonPackage rec {
}; };
# xrootd<6.0.0,>=5.6.4 not satisfied by version 5.7rc20240303 # xrootd<6.0.0,>=5.6.4 not satisfied by version 5.7rc20240303
postPatch = '' pythonRelaxDeps = [ "xrootd" ];
substituteInPlace pyproject.toml \
--replace 'xrootd = "^5.6.4"' ""
'';
nativeBuildInputs = [ poetry-core ]; build-system = [ poetry-core ];
propagatedBuildInputs = [ dependencies = [
snakemake-interface-storage-plugins snakemake-interface-storage-plugins
snakemake-interface-common snakemake-interface-common
xrootd xrootd

View File

@ -34,18 +34,19 @@ buildPythonPackage rec {
}) })
]; ];
pythonRemoveDeps = [ "dataclasses" ];
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "'dataclasses~=0.6'," "" \ --replace-fail "dataclasses-json~=0.5.4" "dataclasses-json>=0.5.4" \
--replace "dataclasses-json~=0.5.4" "dataclasses-json>=0.5.4" \ --replace-fail "responses~=0.13.3" "responses>=0.13.3" \
--replace "responses~=0.13.3" "responses>=0.13.3" \ --replace-fail "limiter~=0.1.2" "limiter>=0.1.2" \
--replace "limiter~=0.1.2" "limiter>=0.1.2" \ --replace-fail "requests~=2.26.0" "requests>=2.26.0"
--replace "requests~=2.26.0" "requests>=2.26.0"
''; '';
nativeBuildInputs = [ setuptools ]; build-system = [ setuptools ];
propagatedBuildInputs = [ dependencies = [
requests requests
dataclasses-json dataclasses-json
responses responses

View File

@ -2,11 +2,13 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "testing.common.database"; pname = "testing.common.database";
version = "2.0.3"; version = "2.0.3";
pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
@ -15,9 +17,11 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace src/testing/common/database.py \ substituteInPlace src/testing/common/database.py \
--replace "collections.Callable" "collections.abc.Callable" --replace-fail "collections.Callable" "collections.abc.Callable"
''; '';
build-system = [ setuptools ];
# There are no unit tests # There are no unit tests
doCheck = false; doCheck = false;

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
setuptools,
pg8000, pg8000,
postgresql, postgresql,
psycopg2, psycopg2,
@ -15,7 +16,7 @@ buildPythonPackage rec {
pname = "testing-postgresql"; pname = "testing-postgresql";
# Version 1.3.0 isn't working so let's use the latest commit from GitHub # Version 1.3.0 isn't working so let's use the latest commit from GitHub
version = "unstable-2017-10-31"; version = "unstable-2017-10-31";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -26,7 +27,9 @@ buildPythonPackage rec {
hash = "sha256-A4tahAaa98X66ZYa3QxIQDZkwAwVB6ZDRObEhkbUWKs="; hash = "sha256-A4tahAaa98X66ZYa3QxIQDZkwAwVB6ZDRObEhkbUWKs=";
}; };
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
testing-common-database testing-common-database
pg8000 pg8000
]; ];
@ -40,12 +43,14 @@ buildPythonPackage rec {
# Add PostgreSQL to search path # Add PostgreSQL to search path
prePatch = '' prePatch = ''
substituteInPlace src/testing/postgresql.py \ substituteInPlace src/testing/postgresql.py \
--replace "/usr/local/pgsql" "${postgresql}" --replace-fail "/usr/local/pgsql" "${postgresql}"
''; '';
pythonRelaxDeps = [ "pg8000" ];
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "pg8000 >= 1.10" "pg8000" --replace-fail "pg8000 >= 1.10" "pg8000"
substituteInPlace tests/test_postgresql.py \ substituteInPlace tests/test_postgresql.py \
--replace-fail "self.assertRegexpMatches" "self.assertRegex" --replace-fail "self.assertRegexpMatches" "self.assertRegex"
''; '';

View File

@ -38,7 +38,7 @@ buildPythonPackage rec {
substituteInPlace requirements.txt \ substituteInPlace requirements.txt \
--replace-fail "==" ">=" --replace-fail "==" ">="
substituteInPlace pytest.ini \ substituteInPlace pytest.ini \
--replace ' -m "not premium"' "" --replace-fail ' -m "not premium"' ""
''; '';
build-system = [ build-system = [

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
requests, requests,
rx, rx,
pytestCheckHook, pytestCheckHook,
@ -12,7 +13,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "twitch-python"; pname = "twitch-python";
version = "0.0.20"; version = "0.0.20";
format = "setuptools"; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
@ -22,10 +23,12 @@ buildPythonPackage rec {
disabled = !isPy3k; disabled = !isPy3k;
postPatch = '' postPatch = ''
substituteInPlace setup.py --replace "'pipenv'," "" substituteInPlace setup.py --replace-fail "'pipenv'," ""
''; '';
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
requests requests
rx rx
]; ];

View File

@ -2,13 +2,14 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
setuptools,
git, git,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "versiontag"; pname = "versiontag";
version = "1.2.0"; version = "1.2.0";
format = "setuptools"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "thelabnyc"; owner = "thelabnyc";
@ -19,9 +20,11 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "get_version(pypi=True)" '"${version}"' --replace-fail "get_version(pypi=True)" '"${version}"'
''; '';
build-system = [ setuptools ];
nativeCheckInputs = [ git ]; nativeCheckInputs = [ git ];
pythonImportsCheck = [ "versiontag" ]; pythonImportsCheck = [ "versiontag" ];

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
setuptools,
levenshtein, levenshtein,
pytesseract, pytesseract,
opencv4, opencv4,
@ -11,14 +12,16 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "videocr"; pname = "videocr";
version = "0.1.6"; version = "0.1.6";
format = "setuptools"; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "1clifwczvhvbaw2spgxkkyqsbqh21vyfw3rh094pxfmq89ylyj63"; hash = "sha256-w0hPfUK4un5JAjAP7vwOAuKlsZ+zv6sFV2vD/Rl3kbI=";
}; };
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
levenshtein levenshtein
pytesseract pytesseract
opencv4 opencv4
@ -27,12 +30,12 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "python-Levenshtein" "Levenshtein" \ --replace-fail "python-Levenshtein" "Levenshtein" \
--replace "opencv-python" "opencv" --replace-fail "opencv-python" "opencv"
substituteInPlace videocr/constants.py \ substituteInPlace videocr/constants.py \
--replace "master" "main" --replace-fail "master" "main"
substituteInPlace videocr/video.py \ substituteInPlace videocr/video.py \
--replace '--tessdata-dir "{}"' '--tessdata-dir="{}"' --replace-fail '--tessdata-dir "{}"' '--tessdata-dir="{}"'
''; '';
# Project has no tests # Project has no tests

View File

@ -10,6 +10,7 @@
httpx, httpx,
pytest-xdist, pytest-xdist,
pytestCheckHook, pytestCheckHook,
pytest-cov-stub,
python-dateutil, python-dateutil,
pythonOlder, pythonOlder,
wsgidav, wsgidav,
@ -29,17 +30,12 @@ buildPythonPackage rec {
hash = "sha256-LgWYgERRuUODFzUnC08kDJTVRx9vanJ+OU8sREEMVwM="; hash = "sha256-LgWYgERRuUODFzUnC08kDJTVRx9vanJ+OU8sREEMVwM=";
}; };
postPatch = '' build-system = [
substituteInPlace pyproject.toml \
--replace " --cov" ""
'';
nativeBuildInputs = [
hatch-vcs hatch-vcs
hatchling hatchling
]; ];
propagatedBuildInputs = [ dependencies = [
httpx httpx
python-dateutil python-dateutil
]; ];
@ -49,6 +45,7 @@ buildPythonPackage rec {
colorama colorama
pytest-xdist pytest-xdist
pytestCheckHook pytestCheckHook
pytest-cov-stub
wsgidav wsgidav
] ++ passthru.optional-dependencies.fsspec; ] ++ passthru.optional-dependencies.fsspec;

View File

@ -4,6 +4,7 @@
pythonOlder, pythonOlder,
isPy3k, isPy3k,
fetchFromGitHub, fetchFromGitHub,
setuptools,
appdirs, appdirs,
consonance, consonance,
protobuf, protobuf,
@ -16,7 +17,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "yowsup"; pname = "yowsup";
version = "3.3.0"; version = "3.3.0";
format = "setuptools"; pyproject = true;
# The Python 2.x support of this package is incompatible with `six==1.11`: # The Python 2.x support of this package is incompatible with `six==1.11`:
# https://github.com/tgalal/yowsup/issues/2416#issuecomment-365113486 # https://github.com/tgalal/yowsup/issues/2416#issuecomment-365113486
@ -29,15 +30,14 @@ buildPythonPackage rec {
sha256 = "1pz0r1gif15lhzdsam8gg3jm6zsskiv2yiwlhaif5rl7lv3p0v7q"; sha256 = "1pz0r1gif15lhzdsam8gg3jm6zsskiv2yiwlhaif5rl7lv3p0v7q";
}; };
postPatch = '' pythonRelaxDeps = true;
substituteInPlace setup.py \ pythonRemoveDeps = [ "argparse" ];
--replace "argparse" "" \
--replace "==" ">=" \ build-system = [ setuptools ];
'';
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
propagatedBuildInputs = [ dependencies = [
appdirs appdirs
consonance consonance
protobuf protobuf

View File

@ -7,6 +7,7 @@
dos2unix, dos2unix,
httpx, httpx,
pytest-asyncio, pytest-asyncio,
pytest-cov-stub,
pytest-mock, pytest-mock,
pytestCheckHook, pytestCheckHook,
pythonOlder, pythonOlder,
@ -15,24 +16,25 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "zeversolarlocal"; pname = "zeversolarlocal";
version = "1.1.0"; version = "1.1.0";
format = "pyproject"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "ExZy5k5RE7k+D0lGmuIkGWrWQ+m24K2oqbUEg4BAVuY="; hash = "sha256-ExZy5k5RE7k+D0lGmuIkGWrWQ+m24K2oqbUEg4BAVuY=";
}; };
nativeBuildInputs = [ build-system = [
flit-core flit-core
dos2unix dos2unix
]; ];
propagatedBuildInputs = [ httpx ]; dependencies = [ httpx ];
nativeCheckInputs = [ nativeCheckInputs = [
pytest-asyncio pytest-asyncio
pytest-cov-stub
pytest-mock pytest-mock
pytestCheckHook pytestCheckHook
]; ];
@ -51,11 +53,6 @@ buildPythonPackage rec {
}) })
]; ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov zeversolarlocal --cov-report xml:cov.xml --cov-report term-missing -vv" ""
'';
disabledTests = [ disabledTests = [
# Test requires network access # Test requires network access
"test_httpx_timeout" "test_httpx_timeout"