diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index 3e89fe0a4dc2..7fb26476d8ae 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -1,5 +1,4 @@ { lib, fetchgit, buildPythonPackage -, python , buildGoModule , srht, redis, celery, pyyaml, markdown }: diff --git a/pkgs/applications/version-management/sourcehut/dispatch.nix b/pkgs/applications/version-management/sourcehut/dispatch.nix index ea3f58e38906..5ce140273ebd 100644 --- a/pkgs/applications/version-management/sourcehut/dispatch.nix +++ b/pkgs/applications/version-management/sourcehut/dispatch.nix @@ -1,5 +1,4 @@ { lib, fetchgit, buildPythonPackage -, python , srht, pyyaml, PyGithub }: buildPythonPackage rec { diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index 8966cbe08001..a25a14f610c1 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -1,5 +1,4 @@ { lib, fetchgit, buildPythonPackage -, python , buildGoModule , srht, minio, pygit2, scmsrht }: diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix index fae311831f2f..c8fa64c8b4d9 100644 --- a/pkgs/applications/version-management/sourcehut/hg.nix +++ b/pkgs/applications/version-management/sourcehut/hg.nix @@ -1,5 +1,4 @@ { lib, fetchhg, buildPythonPackage -, python , srht, hglib, scmsrht, unidiff }: buildPythonPackage rec { diff --git a/pkgs/applications/version-management/sourcehut/hub.nix b/pkgs/applications/version-management/sourcehut/hub.nix index 99b5663a9b89..8b6d92019976 100644 --- a/pkgs/applications/version-management/sourcehut/hub.nix +++ b/pkgs/applications/version-management/sourcehut/hub.nix @@ -1,5 +1,4 @@ { lib, fetchgit, buildPythonPackage -, python , srht }: buildPythonPackage rec { diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix index 25d22dede359..98191f564e96 100644 --- a/pkgs/applications/version-management/sourcehut/lists.nix +++ b/pkgs/applications/version-management/sourcehut/lists.nix @@ -1,5 +1,4 @@ { lib, fetchgit, buildPythonPackage -, python , srht, asyncpg, aiosmtpd, pygit2, emailthreads }: buildPythonPackage rec { diff --git a/pkgs/applications/version-management/sourcehut/man.nix b/pkgs/applications/version-management/sourcehut/man.nix index 24a31a3ef17f..e3751a6d5c8b 100644 --- a/pkgs/applications/version-management/sourcehut/man.nix +++ b/pkgs/applications/version-management/sourcehut/man.nix @@ -1,5 +1,4 @@ { lib, fetchgit, buildPythonPackage -, python , srht, pygit2 }: buildPythonPackage rec { diff --git a/pkgs/applications/version-management/sourcehut/meta.nix b/pkgs/applications/version-management/sourcehut/meta.nix index d07bd29357ac..b5b15520d253 100644 --- a/pkgs/applications/version-management/sourcehut/meta.nix +++ b/pkgs/applications/version-management/sourcehut/meta.nix @@ -1,5 +1,4 @@ { lib, fetchgit, buildPythonPackage -, python , buildGoModule , pgpy, srht, redis, bcrypt, qrcode, stripe, zxcvbn, alembic, pystache , sshpubkeys, weasyprint }: diff --git a/pkgs/applications/version-management/sourcehut/paste.nix b/pkgs/applications/version-management/sourcehut/paste.nix index 12747f981032..dab518e70aee 100644 --- a/pkgs/applications/version-management/sourcehut/paste.nix +++ b/pkgs/applications/version-management/sourcehut/paste.nix @@ -1,5 +1,4 @@ { lib, fetchgit, buildPythonPackage -, python , srht, pyyaml }: buildPythonPackage rec { diff --git a/pkgs/applications/version-management/sourcehut/todo.nix b/pkgs/applications/version-management/sourcehut/todo.nix index 85ae3b2cf146..5e75efb08864 100644 --- a/pkgs/applications/version-management/sourcehut/todo.nix +++ b/pkgs/applications/version-management/sourcehut/todo.nix @@ -1,7 +1,6 @@ { lib, fetchgit, buildPythonPackage -, python , srht, redis, alembic, pystache -, pytest, factory_boy, writeText }: +, pytest, factory_boy }: buildPythonPackage rec { pname = "todosrht"; diff --git a/pkgs/development/interpreters/clojure/babashka.nix b/pkgs/development/interpreters/clojure/babashka.nix index 55ccb32191a7..774e83311b11 100644 --- a/pkgs/development/interpreters/clojure/babashka.nix +++ b/pkgs/development/interpreters/clojure/babashka.nix @@ -1,6 +1,5 @@ { lib, stdenv, fetchurl, graalvm11-ce, glibcLocales }: -with lib; stdenv.mkDerivation rec { pname = "babashka"; version = "0.2.10"; @@ -25,7 +24,7 @@ stdenv.mkDerivation rec { native-image \ -jar ${src} \ -H:Name=bb \ - ${optionalString stdenv.isDarwin ''-H:-CheckToolchain''} \ + ${lib.optionalString stdenv.isDarwin ''-H:-CheckToolchain''} \ -H:+ReportExceptionStackTraces \ -J-Dclojure.spec.skip-macros=true \ -J-Dclojure.compiler.direct-linking=true \ diff --git a/pkgs/development/libraries/muparserx/default.nix b/pkgs/development/libraries/muparserx/default.nix index ef6b254b8a37..4d3036d4cfbb 100644 --- a/pkgs/development/libraries/muparserx/default.nix +++ b/pkgs/development/libraries/muparserx/default.nix @@ -38,5 +38,7 @@ stdenv.mkDerivation rec { homepage = "https://beltoforion.de/en/muparserx/"; license = licenses.bsd2; maintainers = with maintainers; [ drewrisinger ]; + # selftest fails + broken = stdenv.isDarwin; }; } diff --git a/pkgs/development/python-modules/cirq/default.nix b/pkgs/development/python-modules/cirq/default.nix index ebc0eb51df43..16c61f2e895f 100644 --- a/pkgs/development/python-modules/cirq/default.nix +++ b/pkgs/development/python-modules/cirq/default.nix @@ -3,7 +3,6 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub -, fetchpatch , freezegun , google-api-core , matplotlib diff --git a/pkgs/development/python-modules/clifford/default.nix b/pkgs/development/python-modules/clifford/default.nix index 85ed160413e7..3226e3854c74 100644 --- a/pkgs/development/python-modules/clifford/default.nix +++ b/pkgs/development/python-modules/clifford/default.nix @@ -46,11 +46,6 @@ buildPythonPackage rec { ipython ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "'numba==0.43'" "'numba'" - ''; - # avoid collecting local files preCheck = '' cd clifford/test diff --git a/pkgs/development/python-modules/cnvkit/default.nix b/pkgs/development/python-modules/cnvkit/default.nix index 92af67fa183a..5baa28e4bd7f 100644 --- a/pkgs/development/python-modules/cnvkit/default.nix +++ b/pkgs/development/python-modules/cnvkit/default.nix @@ -2,7 +2,6 @@ , fetchFromGitHub , fetchpatch , rPackages -, rWrapper , buildPythonPackage , biopython , numpy @@ -55,11 +54,6 @@ buildPythonPackage rec { rPackages.DNAcopy ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "pandas >= 0.20.1, < 0.25.0" "pandas" - ''; - checkInputs = [ R ]; checkPhase = '' diff --git a/pkgs/development/python-modules/csvs-to-sqlite/default.nix b/pkgs/development/python-modules/csvs-to-sqlite/default.nix index 4105d981386d..ea32471f09c5 100644 --- a/pkgs/development/python-modules/csvs-to-sqlite/default.nix +++ b/pkgs/development/python-modules/csvs-to-sqlite/default.nix @@ -2,13 +2,12 @@ , buildPythonPackage , fetchFromGitHub , isPy3k -, pytestrunner , click , dateparser , pandas , py-lru-cache , six -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -23,11 +22,6 @@ buildPythonPackage rec { sha256 = "0p99cg76d3s7jxvigh5ad04dzhmr6g62qzzh4i6h7x9aiyvdhvk4"; }; - postPatch = '' - substituteInPlace setup.py \ - --replace pandas~=0.25.0 pandas - ''; - propagatedBuildInputs = [ click dateparser @@ -37,13 +31,9 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook ]; - checkPhase = '' - pytest - ''; - meta = with lib; { description = "Convert CSV files into a SQLite database"; homepage = "https://github.com/simonw/csvs-to-sqlite"; diff --git a/pkgs/development/python-modules/cufflinks/default.nix b/pkgs/development/python-modules/cufflinks/default.nix index 4c2db1f52146..42f1d77b12b9 100644 --- a/pkgs/development/python-modules/cufflinks/default.nix +++ b/pkgs/development/python-modules/cufflinks/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, fetchpatch +{ lib, buildPythonPackage, fetchPypi , chart-studio , colorlover , ipython diff --git a/pkgs/development/python-modules/dask-image/default.nix b/pkgs/development/python-modules/dask-image/default.nix index a3cc7b6afda0..a68c86538ee1 100644 --- a/pkgs/development/python-modules/dask-image/default.nix +++ b/pkgs/development/python-modules/dask-image/default.nix @@ -1,7 +1,6 @@ { lib , buildPythonPackage , fetchPypi -, fetchpatch , dask , numpy, toolz # dask[array] , scipy @@ -38,6 +37,7 @@ buildPythonPackage rec { checkPhase = '' pytest --ignore=tests/test_dask_image/ ''; + pythonImportsCheck = [ "dask_image" ]; meta = with lib; { homepage = "https://github.com/dask/dask-image"; diff --git a/pkgs/development/python-modules/dask-ml/default.nix b/pkgs/development/python-modules/dask-ml/default.nix index 737def7b9ac3..4f4b7b705c4e 100644 --- a/pkgs/development/python-modules/dask-ml/default.nix +++ b/pkgs/development/python-modules/dask-ml/default.nix @@ -12,10 +12,6 @@ , six , multipledispatch , packaging -, pytest -, xgboost -, tensorflow -, joblib , distributed }: diff --git a/pkgs/development/python-modules/dask-mpi/default.nix b/pkgs/development/python-modules/dask-mpi/default.nix index 1bec4c828728..d656b055d119 100644 --- a/pkgs/development/python-modules/dask-mpi/default.nix +++ b/pkgs/development/python-modules/dask-mpi/default.nix @@ -4,8 +4,6 @@ , dask , distributed , mpi4py -, pytest -, requests }: buildPythonPackage rec { @@ -17,15 +15,11 @@ buildPythonPackage rec { sha256 = "76e153fc8c58047d898970b33ede0ab1990bd4e69cc130c6627a96f11b12a1a7"; }; - checkInputs = [ pytest requests ]; propagatedBuildInputs = [ dask distributed mpi4py ]; - checkPhase = '' - py.test dask_mpi - ''; - # hardcoded mpirun path in tests doCheck = false; + pythonImportsCheck = [ "dask_mpi" ]; meta = with lib; { homepage = "https://github.com/dask/dask-mpi"; diff --git a/pkgs/development/python-modules/dask-xgboost/default.nix b/pkgs/development/python-modules/dask-xgboost/default.nix index 4e64b8c9f0c5..eb18ac31fd03 100644 --- a/pkgs/development/python-modules/dask-xgboost/default.nix +++ b/pkgs/development/python-modules/dask-xgboost/default.nix @@ -4,8 +4,6 @@ , xgboost , dask , distributed -, pytest -, scikitlearn }: buildPythonPackage rec { @@ -17,19 +15,17 @@ buildPythonPackage rec { sha256 = "3fbe1bf4344dc74edfbe9f928c7e3e6acc26dc57cefd8da8ae56a15469c6941c"; }; - checkInputs = [ pytest scikitlearn ]; propagatedBuildInputs = [ xgboost dask distributed ]; - checkPhase = '' - py.test dask_xgboost/tests/test_core.py - ''; - doCheck = false; + pythonImportsCheck = [ "dask_xdgboost" ]; meta = with lib; { homepage = "https://github.com/dask/dask-xgboost"; description = "Interactions between Dask and XGBoost"; license = licenses.bsd3; maintainers = [ maintainers.costrouc ]; + # TypeError: __init__() got an unexpected keyword argument 'iid' + broken = true; }; } diff --git a/pkgs/development/python-modules/datashader/default.nix b/pkgs/development/python-modules/datashader/default.nix index 534cc816def7..2b11b1ea2737 100644 --- a/pkgs/development/python-modules/datashader/default.nix +++ b/pkgs/development/python-modules/datashader/default.nix @@ -78,7 +78,7 @@ buildPythonPackage rec { # dask doesn't do well with large core counts checkPhase = '' - pytest -n $NIX_BUILD_CORES datashader -k 'not dask.array' + pytest -n $NIX_BUILD_CORES datashader -k 'not dask.array and not test_simple_nested' ''; meta = with lib; { diff --git a/pkgs/development/python-modules/dftfit/default.nix b/pkgs/development/python-modules/dftfit/default.nix index 0f0563e3baf5..73791bdaa9a6 100644 --- a/pkgs/development/python-modules/dftfit/default.nix +++ b/pkgs/development/python-modules/dftfit/default.nix @@ -12,11 +12,7 @@ , lammps-cython , pymatgen-lammps , pytestrunner -, pytest -, pytestcov -, pytest-benchmark , isPy3k -, openssh }: buildPythonPackage rec { @@ -25,18 +21,27 @@ buildPythonPackage rec { disabled = (!isPy3k); src = fetchPypi { - inherit pname version; - sha256 = "4dcbde48948835dcf2d49d6628c9df5747a8ec505d517e374b8d6c7fe95892df"; + inherit pname version; + sha256 = "4dcbde48948835dcf2d49d6628c9df5747a8ec505d517e374b8d6c7fe95892df"; }; buildInputs = [ pytestrunner ]; - checkInputs = [ pytest pytestcov pytest-benchmark openssh ]; - propagatedBuildInputs = [ pymatgen marshmallow pyyaml pygmo - pandas scipy numpy scikitlearn - lammps-cython pymatgen-lammps ]; + propagatedBuildInputs = [ + pymatgen + marshmallow + pyyaml + pygmo + pandas + scipy + numpy + scikitlearn + lammps-cython + pymatgen-lammps + ]; # tests require git lfs download. and is quite large so skip tests doCheck = false; + pythonImportsCheck = [ "dftfit" ]; meta = { description = "Ab-Initio Molecular Dynamics Potential Development"; diff --git a/pkgs/development/python-modules/distributed/default.nix b/pkgs/development/python-modules/distributed/default.nix index f4be407fade2..372b931bca27 100644 --- a/pkgs/development/python-modules/distributed/default.nix +++ b/pkgs/development/python-modules/distributed/default.nix @@ -1,11 +1,6 @@ { lib , buildPythonPackage , fetchPypi -, pytest -, pytest-repeat -, pytest-timeout -, mock -, joblib , click , cloudpickle , dask @@ -18,9 +13,6 @@ , tornado , zict , pyyaml -, isPy3k -, futures -, singledispatch , mpi4py , bokeh , pythonOlder @@ -29,6 +21,7 @@ buildPythonPackage rec { pname = "distributed"; version = "2.30.1"; + disabled = pythonOlder "3.6"; # get full repository need conftest.py to run tests src = fetchPypi { @@ -36,23 +29,14 @@ buildPythonPackage rec { sha256 = "1421d3b84a0885aeb2c4bdc9e8896729c0f053a9375596c9de8864e055e2ac8e"; }; - disabled = pythonOlder "3.6"; - - checkInputs = [ pytest pytest-repeat pytest-timeout mock joblib ]; propagatedBuildInputs = [ click cloudpickle dask msgpack psutil six sortedcontainers tblib toolz tornado zict pyyaml mpi4py bokeh ]; - # tests take about 10-15 minutes - # ignore 5 cli tests out of 1000 total tests that fail due to subprocesses - # these tests are not critical to the library (only the cli) - checkPhase = '' - py.test distributed -m "not avoid-travis" -r s --timeout-method=thread --timeout=0 --durations=20 --ignore="distributed/cli/tests" - ''; - # when tested random tests would fail and not repeatably doCheck = false; + pythonImportsCheck = [ "distributed" ]; meta = { description = "Distributed computation in Python."; diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix index ea6dfe32fda9..56fb450b3e5d 100644 --- a/pkgs/development/python-modules/duckdb/default.nix +++ b/pkgs/development/python-modules/duckdb/default.nix @@ -6,7 +6,7 @@ , pybind11 , setuptools_scm , pytestrunner -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -31,18 +31,10 @@ buildPythonPackage rec { pytestrunner ]; - checkInputs = [ - pytest - ]; + propagatedBuildInputs = [ numpy pandas ]; - propagatedBuildInputs = [ - numpy - pandas - ]; - - checkPhase = '' - pytest - ''; + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "duckdb" ]; meta = with lib; { description = "DuckDB is an embeddable SQL OLAP Database Management System"; diff --git a/pkgs/development/python-modules/fastparquet/default.nix b/pkgs/development/python-modules/fastparquet/default.nix index 07922ee19efa..dc25759afe39 100644 --- a/pkgs/development/python-modules/fastparquet/default.nix +++ b/pkgs/development/python-modules/fastparquet/default.nix @@ -1,5 +1,5 @@ -{ lib, buildPythonPackage, fetchFromGitHub, numba, numpy, pandas, pytestrunner, -thrift, pytest, python-snappy, lz4, zstd }: +{ lib, buildPythonPackage, fetchFromGitHub, numba, numpy, pandas, pytestrunner +, thrift, pytestCheckHook, python-snappy, lz4, zstandard, zstd }: buildPythonPackage rec { pname = "fastparquet"; @@ -12,15 +12,13 @@ buildPythonPackage rec { sha256 = "17i091kky34m2xivk29fqsyxxxa7v4352n79w01n7ni93za6wana"; }; - postPatch = '' - # FIXME: package zstandard - # removing the test dependency for now - substituteInPlace setup.py --replace "'zstandard'," "" - ''; - nativeBuildInputs = [ pytestrunner ]; propagatedBuildInputs = [ numba numpy pandas thrift ]; - checkInputs = [ pytest python-snappy lz4 zstd ]; + checkInputs = [ pytestCheckHook python-snappy lz4 zstandard zstd ]; + + # E ModuleNotFoundError: No module named 'fastparquet.speedups' + doCheck = false; + pythonImportsCheck = [ "fastparquet" ]; meta = with lib; { description = "A python implementation of the parquet format"; diff --git a/pkgs/development/python-modules/flammkuchen/default.nix b/pkgs/development/python-modules/flammkuchen/default.nix index a5525d97f604..1349e10c5397 100644 --- a/pkgs/development/python-modules/flammkuchen/default.nix +++ b/pkgs/development/python-modules/flammkuchen/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, buildPythonPackage, fetchPypi, isPy27 +{ lib, buildPythonPackage, fetchPypi, isPy27 , numpy , scipy , tables diff --git a/pkgs/development/python-modules/glymur/default.nix b/pkgs/development/python-modules/glymur/default.nix index 50ed257f57e0..9a0b1b09db68 100644 --- a/pkgs/development/python-modules/glymur/default.nix +++ b/pkgs/development/python-modules/glymur/default.nix @@ -2,7 +2,6 @@ , buildPythonPackage , fetchFromGitHub , numpy -, setuptools , python , scikitimage , openjpeg diff --git a/pkgs/development/python-modules/graspologic/default.nix b/pkgs/development/python-modules/graspologic/default.nix index 4fd6ccf19c57..b4e8803784b5 100644 --- a/pkgs/development/python-modules/graspologic/default.nix +++ b/pkgs/development/python-modules/graspologic/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { ]; checkInputs = [ pytestCheckHook pytestcov ]; - pytestFlagsArray = [ "tests" "--ignore=docs" ]; + pytestFlagsArray = [ "tests" "--ignore=docs" "--ignore=tests/test_sklearn.py" ]; disabledTests = [ "gridplot_outputs" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/image-match/default.nix b/pkgs/development/python-modules/image-match/default.nix index 7464f3c89972..ed5179d6db5f 100644 --- a/pkgs/development/python-modules/image-match/default.nix +++ b/pkgs/development/python-modules/image-match/default.nix @@ -24,6 +24,7 @@ buildPythonPackage { # tests cannot work without elasticsearch doCheck = false; + pythonImportsCheck = [ "image_match" ]; meta = with lib; { homepage = "https://github.com/ascribe/image-match"; diff --git a/pkgs/development/python-modules/imagecorruptions/default.nix b/pkgs/development/python-modules/imagecorruptions/default.nix index 8d2b7fd8da88..ee1df820a401 100644 --- a/pkgs/development/python-modules/imagecorruptions/default.nix +++ b/pkgs/development/python-modules/imagecorruptions/default.nix @@ -26,6 +26,9 @@ buildPythonPackage rec { opencv3 ]; + doCheck = false; + pythonImportsCheck = [ "imagecorruptions" ]; + meta = with lib; { homepage = "https://github.com/bethgelab/imagecorruptions"; description = "This package provides a set of image corruptions"; diff --git a/pkgs/development/python-modules/imbalanced-learn/default.nix b/pkgs/development/python-modules/imbalanced-learn/default.nix index e0c2adb8e8bb..d40774b86b66 100644 --- a/pkgs/development/python-modules/imbalanced-learn/default.nix +++ b/pkgs/development/python-modules/imbalanced-learn/default.nix @@ -3,7 +3,6 @@ , pandas , pytestCheckHook , scikitlearn -, tensorflow }: buildPythonPackage rec { diff --git a/pkgs/development/python-modules/lammps-cython/default.nix b/pkgs/development/python-modules/lammps-cython/default.nix index 4c16010f4af8..609d7a410c17 100644 --- a/pkgs/development/python-modules/lammps-cython/default.nix +++ b/pkgs/development/python-modules/lammps-cython/default.nix @@ -9,10 +9,7 @@ , pymatgen , ase , pytestrunner -, pytest_4 -, pytestcov , isPy3k -, openssh }: buildPythonPackage rec { @@ -26,7 +23,6 @@ buildPythonPackage rec { }; buildInputs = [ cython pytestrunner ]; - checkInputs = [ pytest_4 pytestcov openssh ]; propagatedBuildInputs = [ mpi4py pymatgen ase numpy ]; preBuild = '' @@ -44,6 +40,8 @@ buildPythonPackage rec { EOF ''; + pythonImportsCheck = [ "lammps" ]; + meta = { description = "Pythonic Wrapper to LAMMPS using cython"; homepage = "https://gitlab.com/costrouc/lammps-cython"; diff --git a/pkgs/development/python-modules/nbsmoke/default.nix b/pkgs/development/python-modules/nbsmoke/default.nix index b7ddf35caec6..86c5afd8c4a7 100644 --- a/pkgs/development/python-modules/nbsmoke/default.nix +++ b/pkgs/development/python-modules/nbsmoke/default.nix @@ -35,6 +35,7 @@ buildPythonPackage rec { # tests not included with pypi release doCheck = false; + pythonImportsCheck = [ "nbsmoke" ]; meta = with lib; { description = "Basic notebook checks and linting"; diff --git a/pkgs/development/python-modules/osmnx/default.nix b/pkgs/development/python-modules/osmnx/default.nix index e1c22ddbfa3c..3cd420c7491f 100755 --- a/pkgs/development/python-modules/osmnx/default.nix +++ b/pkgs/development/python-modules/osmnx/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub, geopandas, descartes, matplotlib, networkx, numpy -, pandas, requests, Rtree, shapely, pytest, coverage, coveralls, folium, scikitlearn, scipy}: +, pandas, requests, Rtree, shapely, folium, scikitlearn, scipy}: buildPythonPackage rec { pname = "osmnx"; @@ -14,14 +14,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ geopandas descartes matplotlib networkx numpy pandas requests Rtree shapely folium scikitlearn scipy ]; - checkInputs = [ coverage pytest coveralls ]; - #Fails when using sandboxing as it requires internet connection, works fine without it + # requires network doCheck = false; - - #Check phase for the record - #checkPhase = '' - # coverage run --source osmnx -m pytest --verbose - #''; + pythonImportsCheck = [ "osmnx" ]; meta = with lib; { description = "A package to easily download, construct, project, visualize, and analyze complex street networks from OpenStreetMap with NetworkX."; diff --git a/pkgs/development/python-modules/pandas-datareader/default.nix b/pkgs/development/python-modules/pandas-datareader/default.nix index ea0ba44e99da..d4aa1551bedc 100644 --- a/pkgs/development/python-modules/pandas-datareader/default.nix +++ b/pkgs/development/python-modules/pandas-datareader/default.nix @@ -1,7 +1,6 @@ { lib , buildPythonPackage , fetchPypi -, pytestCheckHook , isPy27 , pandas , lxml diff --git a/pkgs/development/python-modules/pims/default.nix b/pkgs/development/python-modules/pims/default.nix index bfe4e2b9ea03..2f9fbdccd550 100644 --- a/pkgs/development/python-modules/pims/default.nix +++ b/pkgs/development/python-modules/pims/default.nix @@ -23,6 +23,7 @@ buildPythonPackage rec { # not everything packaged with pypi release doCheck = false; + pythonImportsCheck = [ "pims" ]; meta = with lib; { homepage = "https://github.com/soft-matter/pims"; diff --git a/pkgs/development/python-modules/pyarrow/default.nix b/pkgs/development/python-modules/pyarrow/default.nix index b9c84c484dfe..a38d5df50ddf 100644 --- a/pkgs/development/python-modules/pyarrow/default.nix +++ b/pkgs/development/python-modules/pyarrow/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, python, isPy3k, arrow-cpp, cmake, cython, futures, hypothesis, numpy, pandas, pytestCheckHook, pytest-lazy-fixture, pkg-config, setuptools_scm, six }: +{ lib, buildPythonPackage, python, isPy3k, arrow-cpp, cmake, cython, hypothesis, numpy, pandas, pytestCheckHook, pytest-lazy-fixture, pkg-config, setuptools_scm, six }: let _arrow-cpp = arrow-cpp.override { python3 = python; }; diff --git a/pkgs/development/python-modules/pybids/default.nix b/pkgs/development/python-modules/pybids/default.nix index 9cca6cf57efc..034bdb6363a0 100644 --- a/pkgs/development/python-modules/pybids/default.nix +++ b/pkgs/development/python-modules/pybids/default.nix @@ -1,7 +1,6 @@ { buildPythonPackage , lib , fetchPypi -, isPy27 , click , num2words , numpy @@ -11,8 +10,7 @@ , patsy , bids-validator , sqlalchemy -, pytest -, pathlib +, pytestCheckHook }: buildPythonPackage rec { @@ -36,11 +34,8 @@ buildPythonPackage rec { sqlalchemy ]; - checkInputs = [ pytest ] ++ lib.optionals isPy27 [ pathlib ]; - - checkPhase = '' - pytest - ''; + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "bids" ]; meta = with lib; { description = "Python tools for querying and manipulating BIDS datasets"; diff --git a/pkgs/development/python-modules/pyfftw/default.nix b/pkgs/development/python-modules/pyfftw/default.nix index 155254a6af35..96e807f8eba3 100644 --- a/pkgs/development/python-modules/pyfftw/default.nix +++ b/pkgs/development/python-modules/pyfftw/default.nix @@ -10,20 +10,18 @@ buildPythonPackage rec { sha256 = "60988e823ca75808a26fd79d88dbae1de3699e72a293f812aa4534f8a0a58cb0"; }; + preConfigure = '' + export LDFLAGS="-L${fftw.out}/lib -L${fftwFloat.out}/lib -L${fftwLongDouble.out}/lib" + export CFLAGS="-I${fftw.dev}/include -I${fftwFloat.dev}/include -I${fftwLongDouble.dev}/include" + ''; + buildInputs = [ fftw fftwFloat fftwLongDouble]; propagatedBuildInputs = [ numpy scipy cython dask ]; # Tests cannot import pyfftw. pyfftw works fine though. doCheck = false; - - preConfigure = '' - export LDFLAGS="-L${fftw.out}/lib -L${fftwFloat.out}/lib -L${fftwLongDouble.out}/lib" - export CFLAGS="-I${fftw.dev}/include -I${fftwFloat.dev}/include -I${fftwLongDouble.dev}/include" - ''; - #+ optionalString isDarwin '' - # export DYLD_LIBRARY_PATH="${pkgs.fftw.out}/lib" - #''; + pythonImportsCheck = [ "pyfftw" ]; meta = with lib; { description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; diff --git a/pkgs/development/python-modules/pymatgen-lammps/default.nix b/pkgs/development/python-modules/pymatgen-lammps/default.nix index c80472a6730a..72f362f85c45 100644 --- a/pkgs/development/python-modules/pymatgen-lammps/default.nix +++ b/pkgs/development/python-modules/pymatgen-lammps/default.nix @@ -3,14 +3,14 @@ , buildPythonPackage , pymatgen , pytestrunner -, pytest +, pytestCheckHook , isPy3k }: buildPythonPackage rec { pname = "pymatgen-lammps"; version = "0.4.5"; - disabled = (!isPy3k); + disabled = !isPy3k; src = fetchurl { url = "https://gitlab.com/costrouc/${pname}/-/archive/v${version}/${pname}-v${version}.tar.gz"; @@ -18,13 +18,17 @@ buildPythonPackage rec { }; buildInputs = [ pytestrunner ]; - checkInputs = [ pytest ]; + checkInputs = [ pytestCheckHook ]; propagatedBuildInputs = [ pymatgen ]; + pythonImportsCheck = [ "pmg_lammps" ]; + meta = { description = "A LAMMPS wrapper using pymatgen"; homepage = "https://gitlab.com/costrouc/pymatgen-lammps"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ costrouc ]; + # not compatible with recent versions of pymatgen + broken = true; }; } diff --git a/pkgs/development/python-modules/pymatgen/default.nix b/pkgs/development/python-modules/pymatgen/default.nix index bae7a5613239..448b4c3c338a 100644 --- a/pkgs/development/python-modules/pymatgen/default.nix +++ b/pkgs/development/python-modules/pymatgen/default.nix @@ -52,6 +52,7 @@ buildPythonPackage rec { # No tests in pypi tarball. doCheck = false; + pythonImportsCheck = [ "pymatgen" ]; meta = with lib; { description = "A robust materials analysis code that defines core object representations for structures and molecules"; diff --git a/pkgs/development/python-modules/pytrends/default.nix b/pkgs/development/python-modules/pytrends/default.nix index 3ce1e70e8239..20dbe0ba31c9 100644 --- a/pkgs/development/python-modules/pytrends/default.nix +++ b/pkgs/development/python-modules/pytrends/default.nix @@ -17,10 +17,11 @@ buildPythonPackage rec { sha256 = "8ccb06c57c31fa157b978a0d810de7718ee46583d28cf818250d45f36abd2faa"; }; - doCheck = false; - propagatedBuildInputs = [ requests lxml pandas ]; + doCheck = false; + pythonImportsCheck = [ "pytrends" ]; + meta = with lib; { description = "Pseudo API for Google Trends"; homepage = "https://github.com/GeneralMills/pytrends"; diff --git a/pkgs/development/python-modules/qiskit-aer/default.nix b/pkgs/development/python-modules/qiskit-aer/default.nix index e5eb877b6b2b..dd7043e8568c 100644 --- a/pkgs/development/python-modules/qiskit-aer/default.nix +++ b/pkgs/development/python-modules/qiskit-aer/default.nix @@ -2,7 +2,6 @@ , pythonOlder , buildPythonPackage , fetchFromGitHub -, fetchpatch # C Inputs , blas , catch2 diff --git a/pkgs/development/python-modules/qiskit-ignis/default.nix b/pkgs/development/python-modules/qiskit-ignis/default.nix index b5295dbd0411..2362a819ca76 100644 --- a/pkgs/development/python-modules/qiskit-ignis/default.nix +++ b/pkgs/development/python-modules/qiskit-ignis/default.nix @@ -2,7 +2,6 @@ , pythonOlder , buildPythonPackage , fetchFromGitHub -, fetchpatch , python , numpy , qiskit-terra diff --git a/pkgs/development/python-modules/quandl/default.nix b/pkgs/development/python-modules/quandl/default.nix index 56b80a4676b8..0247d20ec7d6 100644 --- a/pkgs/development/python-modules/quandl/default.nix +++ b/pkgs/development/python-modules/quandl/default.nix @@ -46,6 +46,8 @@ buildPythonPackage rec { importlib-metadata ]; + pythonImportsCheck = [ "quandl" ]; + meta = with lib; { description = "Quandl Python client library"; homepage = "https://github.com/quandl/quandl-python"; diff --git a/pkgs/development/python-modules/rpy2/default.nix b/pkgs/development/python-modules/rpy2/default.nix index 0b042288fb75..cae84f8cbe91 100644 --- a/pkgs/development/python-modules/rpy2/default.nix +++ b/pkgs/development/python-modules/rpy2/default.nix @@ -1,8 +1,6 @@ { stdenv , lib -, python , buildPythonPackage -, fetchpatch , fetchPypi , isPyPy , R diff --git a/pkgs/development/python-modules/scikit-bio/default.nix b/pkgs/development/python-modules/scikit-bio/default.nix index f14c4d82f428..f13fecc08551 100644 --- a/pkgs/development/python-modules/scikit-bio/default.nix +++ b/pkgs/development/python-modules/scikit-bio/default.nix @@ -32,12 +32,6 @@ buildPythonPackage rec { checkInputs = [ coverage ]; propagatedBuildInputs = [ lockfile cachecontrol decorator ipython matplotlib natsort numpy pandas scipy hdmedians scikitlearn ]; - # remove on when version > 0.5.4 - postPatch = '' - sed -i "s/numpy >= 1.9.2, < 1.14.0/numpy/" setup.py - sed -i "s/pandas >= 0.19.2, < 0.23.0/pandas/" setup.py - ''; - # cython package not included for tests doCheck = false; @@ -45,6 +39,8 @@ buildPythonPackage rec { ${python.interpreter} -m skbio.test ''; + pythonImportsCheck = [ "skbio" ]; + meta = with lib; { homepage = "http://scikit-bio.org/"; description = "Data structures, algorithms and educational resources for bioinformatics"; diff --git a/pkgs/development/python-modules/seaborn/default.nix b/pkgs/development/python-modules/seaborn/default.nix index b3bf8fce0fca..8c771ea286cb 100644 --- a/pkgs/development/python-modules/seaborn/default.nix +++ b/pkgs/development/python-modules/seaborn/default.nix @@ -26,6 +26,7 @@ buildPythonPackage rec { # Computationally very demanding tests doCheck = false; + pythonImportsCheck= [ "seaborn" ]; meta = { description = "Statisitical data visualization"; diff --git a/pkgs/development/python-modules/skorch/default.nix b/pkgs/development/python-modules/skorch/default.nix index bb41f61517fc..7ea4604ff377 100644 --- a/pkgs/development/python-modules/skorch/default.nix +++ b/pkgs/development/python-modules/skorch/default.nix @@ -26,10 +26,13 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy pytorch scikitlearn scipy tabulate tqdm ]; checkInputs = [ pytest pytestcov flaky pandas pytestCheckHook ]; - # on CPU, these expect artifacts from previous GPU run disabledTests = [ + # on CPU, these expect artifacts from previous GPU run "test_load_cuda_params_to_cpu" + # failing tests "test_pickle_load" + "test_grid_search_with_slds_" + "test_grid_search_with_dict_works" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/streamz/default.nix b/pkgs/development/python-modules/streamz/default.nix index d17aed6ae43a..3a62dd4ecf1f 100644 --- a/pkgs/development/python-modules/streamz/default.nix +++ b/pkgs/development/python-modules/streamz/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, fetchpatch +{ lib, buildPythonPackage, fetchPypi , confluent-kafka , distributed , flaky diff --git a/pkgs/development/python-modules/stytra/default.nix b/pkgs/development/python-modules/stytra/default.nix index 88adbe4f7d94..80eefc0a639e 100644 --- a/pkgs/development/python-modules/stytra/default.nix +++ b/pkgs/development/python-modules/stytra/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, buildPythonPackage, fetchPypi, isPy3k, callPackage +{ lib, buildPythonPackage, fetchPypi, isPy3k , opencv3 , pyqt5 , pyqtgraph @@ -19,7 +19,7 @@ , imageio-ffmpeg , av , nose -, pytest +, pytestCheckHook , pyserial , arrayqueues , colorspacious @@ -37,14 +37,18 @@ buildPythonPackage rec { inherit pname version; sha256 = "aab9d07575ef599a9c0ae505656e3c03ec753462df3c15742f1f768f2b578f0a"; }; - doCheck = false; + + # crashes python + preCheck = '' + rm stytra/tests/test_z_experiments.py + ''; + checkInputs = [ nose - pytest + pytestCheckHook pyserial ]; - propagatedBuildInputs = [ opencv3 pyqt5 diff --git a/pkgs/development/python-modules/torchgpipe/default.nix b/pkgs/development/python-modules/torchgpipe/default.nix index 6e621ee8b688..dbfad336d0f3 100644 --- a/pkgs/development/python-modules/torchgpipe/default.nix +++ b/pkgs/development/python-modules/torchgpipe/default.nix @@ -2,7 +2,6 @@ , buildPythonPackage , fetchFromGitHub , isPy27 -, pytest , pytestrunner , pytestCheckHook , pytorch @@ -23,12 +22,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ pytorch ]; - checkInputs = [ pytest pytestrunner pytestCheckHook ]; - disabledTests = [ "test_inplace_on_requires_grad" ]; - # seems like a harmless failure: - ## AssertionError: - ## Pattern 'a leaf Variable that requires grad has been used in an in-place operation.' - ## does not match 'a leaf Variable that requires grad is being used in an in-place operation.' + checkInputs = [ pytestrunner pytestCheckHook ]; + disabledTests = [ + "test_inplace_on_requires_grad" + "test_input_requiring_grad" + ]; meta = with lib; { description = "GPipe implemented in Pytorch and optimized for CUDA rather than TPU"; diff --git a/pkgs/development/python-modules/traittypes/default.nix b/pkgs/development/python-modules/traittypes/default.nix index 2c8f6dd80312..290892672e59 100644 --- a/pkgs/development/python-modules/traittypes/default.nix +++ b/pkgs/development/python-modules/traittypes/default.nix @@ -3,10 +3,9 @@ , fetchFromGitHub , fetchpatch , isPy27 -, pytest +, pytestCheckHook , nose , numpy -, scipy , pandas , xarray , traitlets @@ -35,7 +34,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ traitlets ]; - checkInputs = [ numpy pandas xarray nose pytest ]; + checkInputs = [ numpy pandas xarray nose pytestCheckHook ]; + pythonImportsCheck = [ "traittypes" ]; meta = with lib; { description = "Trait types for NumPy, SciPy, XArray, and Pandas"; diff --git a/pkgs/development/python-modules/uproot3-methods/default.nix b/pkgs/development/python-modules/uproot3-methods/default.nix index 21fe31630de6..aca6095d333f 100644 --- a/pkgs/development/python-modules/uproot3-methods/default.nix +++ b/pkgs/development/python-modules/uproot3-methods/default.nix @@ -20,6 +20,7 @@ buildPythonPackage rec { # No tests on PyPi doCheck = false; + pythonImportsCheck = [ "uproot3_methods" ]; meta = with lib; { homepage = "https://github.com/scikit-hep/uproot3-methods"; diff --git a/pkgs/development/python-modules/vega/default.nix b/pkgs/development/python-modules/vega/default.nix index 083aa6302098..04c38838a433 100644 --- a/pkgs/development/python-modules/vega/default.nix +++ b/pkgs/development/python-modules/vega/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage , fetchPypi, pythonOlder -, pytest, jupyter_core, pandas, ipywidgets, jupyter, altair }: +, jupyter_core, pandas, ipywidgets, jupyter }: buildPythonPackage rec { pname = "vega"; @@ -11,12 +11,11 @@ buildPythonPackage rec { sha256 = "f343ceb11add58d24cd320d69e410b111a56c98c9069ebb4ef89c608c4c1950d"; }; - buildInputs = [ pytest ]; propagatedBuildInputs = [ jupyter jupyter_core pandas ipywidgets ]; # currently, recommonmark is broken on python3 doCheck = false; - checkInputs = [ altair ]; + pythonImportsCheck = [ "vega" ]; meta = with lib; { description = "An IPython/Jupyter widget for Vega and Vega-Lite"; diff --git a/pkgs/development/python-modules/vidstab/default.nix b/pkgs/development/python-modules/vidstab/default.nix index 4119b26259d7..7137205b3508 100644 --- a/pkgs/development/python-modules/vidstab/default.nix +++ b/pkgs/development/python-modules/vidstab/default.nix @@ -6,7 +6,6 @@ , imutils , progress , matplotlib -, pytest }: buildPythonPackage rec { @@ -18,11 +17,11 @@ buildPythonPackage rec { sha256 = "649a77a0c1b670d13a1bf411451945d7da439364dc0c33ee3636a23f1d82b456"; }; - checkInputs = [ pytest ]; propagatedBuildInputs = [ numpy pandas imutils progress matplotlib ]; # tests not packaged with pypi doCheck = false; + pythonImportsCheck = [ "vidstab" ]; meta = with lib; { homepage = "https://github.com/AdamSpannbauer/python_video_stab"; diff --git a/pkgs/os-specific/linux/criu/default.nix b/pkgs/os-specific/linux/criu/default.nix index 369ba13a0f5c..af7726458248 100644 --- a/pkgs/os-specific/linux/criu/default.nix +++ b/pkgs/os-specific/linux/criu/default.nix @@ -17,9 +17,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = with python3.pkgs; [ python python3.pkgs.protobuf ]; postPatch = '' - substituteInPlace ./Documentation/Makefile --replace "2>/dev/null" "" - substituteInPlace ./Documentation/Makefile --replace "-m custom.xsl" "-m custom.xsl --skip-validation -x ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl" - substituteInPlace ./criu/Makefile --replace "-I/usr/include/libnl3" "-I${libnl.dev}/include/libnl3" + substituteInPlace ./Documentation/Makefile \ + --replace "2>/dev/null" "" \ + --replace "-m custom.xsl" "-m custom.xsl --skip-validation -x ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl" substituteInPlace ./Makefile --replace "head-name := \$(shell git tag -l v\$(CRIU_VERSION))" "head-name = ${version}.0" ln -sf ${protobuf}/include/google/protobuf/descriptor.proto ./images/google/protobuf/descriptor.proto ''; diff --git a/pkgs/tools/backup/btrbk/default.nix b/pkgs/tools/backup/btrbk/default.nix index cd91d51d9606..63808d485128 100644 --- a/pkgs/tools/backup/btrbk/default.nix +++ b/pkgs/tools/backup/btrbk/default.nix @@ -24,12 +24,6 @@ stdenv.mkDerivation rec { # Tainted Mode disables PERL5LIB substituteInPlace btrbk --replace "perl -T" "perl" - # Fix btrbk-mail - substituteInPlace contrib/cron/btrbk-mail \ - --replace "/bin/date" "${coreutils}/bin/date" \ - --replace "/bin/echo" "${coreutils}/bin/echo" \ - --replace '$btrbk' 'btrbk' - # Fix SSH filter script sed -i '/^export PATH/d' ssh_filter_btrbk.sh substituteInPlace ssh_filter_btrbk.sh --replace logger ${util-linux}/bin/logger diff --git a/pkgs/tools/misc/kak-lsp/default.nix b/pkgs/tools/misc/kak-lsp/default.nix index 1c2d7ab6717b..343f2d0527ec 100644 --- a/pkgs/tools/misc/kak-lsp/default.nix +++ b/pkgs/tools/misc/kak-lsp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, darwin, fetchFromGitHub, rustPlatform }: +{ stdenv, lib, fetchFromGitHub, rustPlatform, Security }: rustPlatform.buildRustPackage rec { pname = "kak-lsp"; @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "174qy50m9487vv151vm8q6sby79dq3gbqjbz6h4326jwsc9wwi8c"; - buildInputs = lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optional stdenv.isDarwin [ Security ]; meta = with lib; { description = "Kakoune Language Server Protocol Client"; diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix index a89de032abd7..20a963111765 100644 --- a/pkgs/tools/system/pciutils/default.nix +++ b/pkgs/tools/system/pciutils/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, pkg-config, zlib, kmod, which , static ? stdenv.hostPlatform.isStatic -, darwin ? null +, IOKit }: stdenv.mkDerivation rec { @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ zlib kmod which ] ++ - lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.IOKit; + lib.optional stdenv.hostPlatform.isDarwin IOKit; preConfigure = if stdenv.cc.isGNU then null else '' substituteInPlace Makefile --replace 'CC=$(CROSS_COMPILE)gcc' "" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 187ee4197227..f5e35f4937a8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5505,7 +5505,9 @@ in plugins = [ ]; # override with the list of desired plugins }; - kak-lsp = callPackage ../tools/misc/kak-lsp { }; + kak-lsp = callPackage ../tools/misc/kak-lsp { + inherit (darwin.apple_sdk.frameworks) Security; + }; kbdd = callPackage ../applications/window-managers/kbdd { }; @@ -7009,7 +7011,9 @@ in pcimem = callPackage ../os-specific/linux/pcimem { }; - pciutils = callPackage ../tools/system/pciutils { }; + pciutils = callPackage ../tools/system/pciutils { + inherit (darwin.apple_sdk.frameworks) IOKit; + }; pcsclite = callPackage ../tools/security/pcsclite { inherit (darwin.apple_sdk.frameworks) IOKit;