diff --git a/pkgs/applications/office/pympress/default.nix b/pkgs/applications/office/pympress/default.nix index b4307eb286e..ebc93edba6e 100644 --- a/pkgs/applications/office/pympress/default.nix +++ b/pkgs/applications/office/pympress/default.nix @@ -1,13 +1,10 @@ { lib , python3Packages , wrapGAppsHook -, xvfb_run , gtk3 , gobject-introspection , libcanberra-gtk3 -, dbus , poppler_gi -, python3 }: python3Packages.buildPythonApplication rec { diff --git a/pkgs/development/python-modules/PyRMVtransport/default.nix b/pkgs/development/python-modules/PyRMVtransport/default.nix index 86fb75f1454..62ea5546ed1 100644 --- a/pkgs/development/python-modules/PyRMVtransport/default.nix +++ b/pkgs/development/python-modules/PyRMVtransport/default.nix @@ -1,8 +1,14 @@ -{ lib, buildPythonPackage, fetchFromGitHub -, flit -, lxml, httpx -, pytest, pytestcov, pytest-asyncio, pytest-mock, aresponses +{ lib +, buildPythonPackage +, fetchFromGitHub , pythonOlder +, flit +, async-timeout +, lxml +, httpx +, pytestCheckHook +, pytest-asyncio +, pytest-httpx }: buildPythonPackage rec { @@ -23,24 +29,18 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ + async-timeout httpx lxml ]; - # requires pytest-httpx - doCheck = false; + pythonImportsCheck = [ "RMVtransport" ]; checkInputs = [ - pytest - pytestcov + pytestCheckHook pytest-asyncio - pytest-mock - # pytest-httpx is missing - aresponses + pytest-httpx ]; - checkPhase = '' - pytest --cov=RMVtransport tests - ''; meta = with lib; { homepage = "https://github.com/cgtobi/PyRMVtransport"; diff --git a/pkgs/development/python-modules/aiorun/default.nix b/pkgs/development/python-modules/aiorun/default.nix index a0a3d74e578..9c677650555 100644 --- a/pkgs/development/python-modules/aiorun/default.nix +++ b/pkgs/development/python-modules/aiorun/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , isPy27 , pygments -, pytest +, pytestCheckHook , pytestcov , uvloop }: @@ -27,7 +27,7 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook pytestcov uvloop ]; @@ -37,9 +37,7 @@ buildPythonPackage rec { export HOME=$TMPDIR ''; - checkPhase = '' - pytest - ''; + pythonImportsCheck = [ "aiorun" ]; meta = with lib; { description = "Boilerplate for asyncio applications"; diff --git a/pkgs/development/python-modules/asyncpg/default.nix b/pkgs/development/python-modules/asyncpg/default.nix index 826ee6103fc..e2f2f242780 100644 --- a/pkgs/development/python-modules/asyncpg/default.nix +++ b/pkgs/development/python-modules/asyncpg/default.nix @@ -1,4 +1,4 @@ -{ lib, isPy3k, fetchPypi, fetchpatch, buildPythonPackage +{ lib, isPy3k, fetchPypi, buildPythonPackage , uvloop, postgresql }: buildPythonPackage rec { @@ -16,6 +16,8 @@ buildPythonPackage rec { postgresql ]; + pythonImportsCheck = [ "asyncpg" ]; + meta = with lib; { homepage = "https://github.com/MagicStack/asyncpg"; description = "An asyncio PosgtreSQL driver"; diff --git a/pkgs/development/python-modules/aws-adfs/default.nix b/pkgs/development/python-modules/aws-adfs/default.nix index ce4c6f78926..efe4780c0a4 100644 --- a/pkgs/development/python-modules/aws-adfs/default.nix +++ b/pkgs/development/python-modules/aws-adfs/default.nix @@ -26,6 +26,8 @@ buildPythonPackage rec { checkInputs = [ glibcLocales pytest pytestrunner pytestcov mock ]; propagatedBuildInputs = [ botocore lxml requests requests-kerberos click configparser fido2 ]; + pythonImportsCheck = [ "aws_adfs" ]; + meta = with lib; { description = "Command line tool to ease aws cli authentication against ADFS"; homepage = "https://github.com/venth/aws-adfs"; diff --git a/pkgs/development/python-modules/buildbot/default.nix b/pkgs/development/python-modules/buildbot/default.nix index f4c5bfb1622..6b27e8e5d42 100644 --- a/pkgs/development/python-modules/buildbot/default.nix +++ b/pkgs/development/python-modules/buildbot/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, buildPythonPackage, fetchPypi, makeWrapper, isPy3k, - python, twisted, jinja2, zope_interface, future, sqlalchemy, + python, twisted, jinja2, zope_interface, sqlalchemy, sqlalchemy_migrate, dateutil, txaio, autobahn, pyjwt, pyyaml, treq, txrequests, pypugjs, boto3, moto, mock, python-lz4, setuptoolsTrial, isort, pylint, flake8, buildbot-worker, buildbot-pkg, buildbot-plugins, diff --git a/pkgs/development/python-modules/cornice/default.nix b/pkgs/development/python-modules/cornice/default.nix index 6c488a271e2..fc470e012fb 100644 --- a/pkgs/development/python-modules/cornice/default.nix +++ b/pkgs/development/python-modules/cornice/default.nix @@ -20,6 +20,7 @@ buildPythonPackage rec { # tests not packaged with pypi release doCheck = false; + pythonImportsCheck = [ "cornice" ]; meta = with lib; { homepage = "https://github.com/mozilla-services/cornice"; @@ -27,5 +28,4 @@ buildPythonPackage rec { license = licenses.mpl20; maintainers = [ maintainers.costrouc ]; }; - } diff --git a/pkgs/development/python-modules/easywatch/default.nix b/pkgs/development/python-modules/easywatch/default.nix index a56ffb95281..36f3ea0de6e 100644 --- a/pkgs/development/python-modules/easywatch/default.nix +++ b/pkgs/development/python-modules/easywatch/default.nix @@ -17,6 +17,7 @@ buildPythonPackage rec { # There are no tests doCheck = false; + pythonImportsCheck = [ "easywatch" ]; meta = with lib; { description = "Dead-simple way to watch a directory"; diff --git a/pkgs/development/python-modules/fido2/default.nix b/pkgs/development/python-modules/fido2/default.nix index 96019f61cac..ac8e912ba3d 100644 --- a/pkgs/development/python-modules/fido2/default.nix +++ b/pkgs/development/python-modules/fido2/default.nix @@ -20,6 +20,8 @@ buildPythonPackage rec { checkInputs = [ mock pyfakefs ]; + pythonImportsCheck = [ "fido2" ]; + meta = with lib; { description = "Provides library functionality for FIDO 2.0, including communication with a device over USB."; homepage = "https://github.com/Yubico/python-fido2"; diff --git a/pkgs/development/python-modules/hupper/default.nix b/pkgs/development/python-modules/hupper/default.nix index 1fe5ab7153d..27e308ee447 100644 --- a/pkgs/development/python-modules/hupper/default.nix +++ b/pkgs/development/python-modules/hupper/default.nix @@ -1,5 +1,10 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi -, pytest, pytestcov, watchdog, mock +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pytest-cov +, watchdog }: buildPythonPackage rec { @@ -11,11 +16,14 @@ buildPythonPackage rec { sha256 = "3818f53dabc24da66f65cf4878c1c7a9b5df0c46b813e014abdd7c569eb9a02a"; }; - checkPhase = '' - py.test - ''; - # FIXME: watchdog dependency is disabled on Darwin because of #31865, which causes very silent # segfaults in the testsuite that end up failing the tests in a background thread (in myapp) - checkInputs = [ pytest pytestcov mock ] ++ lib.optional (!stdenv.isDarwin) watchdog; + checkInputs = [ pytestCheckHook pytest-cov ] ++ lib.optional (!stdenv.isDarwin) watchdog; + + meta = with lib; { + description = "in-process file monitor / reloader for reloading your code automatically during development"; + homepage = "https://github.com/Pylons/hupper"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; } diff --git a/pkgs/development/python-modules/lektor/default.nix b/pkgs/development/python-modules/lektor/default.nix index 844e28aa078..febb1b1f0b1 100644 --- a/pkgs/development/python-modules/lektor/default.nix +++ b/pkgs/development/python-modules/lektor/default.nix @@ -12,8 +12,8 @@ , flask , pyopenssl , ndg-httpsclient -, pytest -, pytestcov +, pytestCheckHook +, pytest-cov , pytest-mock , pytest-pylint , pytest-click @@ -39,13 +39,9 @@ buildPythonPackage rec { ] ++ lib.optionals isPy27 [ functools32 ]; checkInputs = [ - pytest pytestcov pytest-mock pytest-pylint pytest-click + pytestCheckHook pytest-cov pytest-mock pytest-pylint pytest-click ]; - checkPhase = '' - pytest - ''; - # many errors -- tests assume inside of git repo, linting errors 13/317 fail doCheck = false; diff --git a/pkgs/development/python-modules/pyfakefs/default.nix b/pkgs/development/python-modules/pyfakefs/default.nix index 8fac00e871e..8ba9b3fc46f 100644 --- a/pkgs/development/python-modules/pyfakefs/default.nix +++ b/pkgs/development/python-modules/pyfakefs/default.nix @@ -23,8 +23,6 @@ buildPythonPackage rec { substituteInPlace pyfakefs/tests/fake_os_test.py \ --replace "test_path_links_not_resolved" "notest_path_links_not_resolved" \ --replace "test_append_mode_tell_linux_windows" "notest_append_mode_tell_linux_windows" - substituteInPlace pyfakefs/tests/fake_filesystem_unittest_test.py \ - --replace "test_copy_real_file" "notest_copy_real_file" '' + (lib.optionalString stdenv.isDarwin '' # this test fails on darwin due to case-insensitive file system substituteInPlace pyfakefs/tests/fake_os_test.py \ diff --git a/pkgs/development/python-modules/pypugjs/default.nix b/pkgs/development/python-modules/pypugjs/default.nix index 22ac89cf6a9..4e2bf164a33 100644 --- a/pkgs/development/python-modules/pypugjs/default.nix +++ b/pkgs/development/python-modules/pypugjs/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, fetchpatch, six, chardet, nose +{ lib, buildPythonPackage, fetchPypi, six, chardet, nose , django, jinja2, tornado, pyramid, pyramid_mako, Mako }: buildPythonPackage rec { diff --git a/pkgs/development/python-modules/pyramid/default.nix b/pkgs/development/python-modules/pyramid/default.nix index 44ac5a9221a..a26eff37ef2 100644 --- a/pkgs/development/python-modules/pyramid/default.nix +++ b/pkgs/development/python-modules/pyramid/default.nix @@ -33,6 +33,8 @@ buildPythonPackage rec { # https://github.com/Pylons/pyramid/issues/1899 doCheck = !isPy35; + pythonImportsCheck = [ "pyramid" ]; + meta = with lib; { description = "The Pyramid Web Framework, a Pylons project"; homepage = "https://trypyramid.com/"; diff --git a/pkgs/development/python-modules/pyramid_beaker/default.nix b/pkgs/development/python-modules/pyramid_beaker/default.nix index 5c4e7c104bf..9a529214c2e 100644 --- a/pkgs/development/python-modules/pyramid_beaker/default.nix +++ b/pkgs/development/python-modules/pyramid_beaker/default.nix @@ -19,6 +19,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ beaker pyramid ]; meta = with lib; { + description = "Beaker session factory backend for Pyramid"; + homepage = "https://docs.pylonsproject.org/projects/pyramid_beaker/en/latest/"; + # idk, see https://github.com/Pylons/pyramid_beaker/blob/master/LICENSE.txt + # license = licenses.mpl20; maintainers = with maintainers; [ domenkozar ]; }; } diff --git a/pkgs/development/python-modules/pyramid_chameleon/default.nix b/pkgs/development/python-modules/pyramid_chameleon/default.nix index d3388fdff35..377317049dc 100644 --- a/pkgs/development/python-modules/pyramid_chameleon/default.nix +++ b/pkgs/development/python-modules/pyramid_chameleon/default.nix @@ -23,11 +23,12 @@ buildPythonPackage rec { propagatedBuildInputs = [ chameleon pyramid zope_interface setuptools ]; + pythonImportsCheck = [ "pyramid_chameleon" ]; + meta = with lib; { description = "Chameleon template compiler for pyramid"; homepage = "https://github.com/Pylons/pyramid_chameleon"; license = licenses.bsd0; maintainers = with maintainers; [ domenkozar ]; }; - } diff --git a/pkgs/development/python-modules/pyramid_exclog/default.nix b/pkgs/development/python-modules/pyramid_exclog/default.nix index 55da77f4964..96570fce884 100644 --- a/pkgs/development/python-modules/pyramid_exclog/default.nix +++ b/pkgs/development/python-modules/pyramid_exclog/default.nix @@ -15,6 +15,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ pyramid ]; + pythonImportsCheck = [ "pyramid_exclog" ]; + meta = with lib; { description = "A package which logs to a Python logger when an exception is raised by a Pyramid application"; homepage = "https://docs.pylonsproject.org/"; diff --git a/pkgs/development/python-modules/pyramid_hawkauth/default.nix b/pkgs/development/python-modules/pyramid_hawkauth/default.nix index f2f156e98b6..c2e17f8adde 100644 --- a/pkgs/development/python-modules/pyramid_hawkauth/default.nix +++ b/pkgs/development/python-modules/pyramid_hawkauth/default.nix @@ -21,10 +21,12 @@ buildPythonPackage rec { propagatedBuildInputs = [ pyramid hawkauthlib tokenlib ]; buildInputs = [ webtest ]; + pythonImportsCheck = [ "pyramid_hawkauth" ]; + meta = with lib; { homepage = "https://github.com/mozilla-services/pyramid_hawkauth"; description = "A Pyramid authentication plugin for HAWK"; license = licenses.mpl20; + maintainers = with maintainers; [ ]; }; - } diff --git a/pkgs/development/python-modules/pyramid_jinja2/default.nix b/pkgs/development/python-modules/pyramid_jinja2/default.nix index 464d8d209bf..d1eaf49e6bc 100644 --- a/pkgs/development/python-modules/pyramid_jinja2/default.nix +++ b/pkgs/development/python-modules/pyramid_jinja2/default.nix @@ -18,11 +18,12 @@ buildPythonPackage rec { buildInputs = [ webtest ]; propagatedBuildInputs = [ jinja2 pyramid ]; + pythonImportsCheck = [ "pyramid_jinja2" ]; + meta = with lib; { description = "Jinja2 template bindings for the Pyramid web framework"; homepage = "https://github.com/Pylons/pyramid_jinja2"; license = licenses.bsd0; maintainers = with maintainers; [ domenkozar ]; }; - } diff --git a/pkgs/development/python-modules/pyramid_mako/default.nix b/pkgs/development/python-modules/pyramid_mako/default.nix index 2f8c5e1e075..47aa1deb5e2 100644 --- a/pkgs/development/python-modules/pyramid_mako/default.nix +++ b/pkgs/development/python-modules/pyramid_mako/default.nix @@ -22,6 +22,6 @@ buildPythonPackage rec { homepage = "https://github.com/Pylons/pyramid_mako"; description = "Mako template bindings for the Pyramid web framework"; license = licenses.bsd0; + maintainers = with maintainers; []; }; - } diff --git a/pkgs/development/python-modules/pyramid_multiauth/default.nix b/pkgs/development/python-modules/pyramid_multiauth/default.nix index 545883a25c1..859d4c3b433 100644 --- a/pkgs/development/python-modules/pyramid_multiauth/default.nix +++ b/pkgs/development/python-modules/pyramid_multiauth/default.nix @@ -19,6 +19,6 @@ buildPythonPackage rec { description = "Authentication policy for Pyramid that proxies to a stack of other authentication policies"; homepage = "https://github.com/mozilla-services/pyramid_multiauth"; license = licenses.mpl20; + maintainers = with maintainers; []; }; - } diff --git a/pkgs/development/python-modules/pytest-httpx/default.nix b/pkgs/development/python-modules/pytest-httpx/default.nix new file mode 100644 index 00000000000..d3b6654931b --- /dev/null +++ b/pkgs/development/python-modules/pytest-httpx/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchPypi, httpx, pytest }: + +buildPythonPackage rec { + pname = "pytest-httpx"; + version = "0.10.1"; + + src = fetchPypi { + inherit version; + pname = "pytest_httpx"; + extension = "tar.gz"; + sha256 = "13ld6nnsc3f7i4zl4qm1jh358z0awr6xfk05azwgngmjb7jmcz0a"; + }; + + propagatedBuildInputs = [ httpx pytest ]; + + # not in pypi tarball + doCheck = false; + pythonImportsCheck = [ "pytest_httpx" ]; + + meta = with lib; { + description = "Send responses to httpx"; + homepage = "https://github.com/Colin-b/pytest_httpx"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/development/python-modules/pytest-watch/default.nix b/pkgs/development/python-modules/pytest-watch/default.nix index 12b06c2e1b6..0088bf45e4a 100644 --- a/pkgs/development/python-modules/pytest-watch/default.nix +++ b/pkgs/development/python-modules/pytest-watch/default.nix @@ -16,10 +16,11 @@ buildPythonPackage rec { sha256 = "06136f03d5b361718b8d0d234042f7b2f203910d8568f63df2f866b547b3d4b9"; }; + propagatedBuildInputs = [ pytest colorama docopt watchdog ]; + # No Tests doCheck = false; - - propagatedBuildInputs = [ pytest colorama docopt watchdog ]; + pythonImportsCheck = [ "pytest_watch" ]; meta = with lib; { homepage = "https://github.com/joeyespo/pytest-watch"; @@ -28,4 +29,3 @@ buildPythonPackage rec { maintainers = with maintainers; [ dmvianna ]; }; } - diff --git a/pkgs/development/python-modules/pyu2f/default.nix b/pkgs/development/python-modules/pyu2f/default.nix index c703a8fe30c..281511192fe 100644 --- a/pkgs/development/python-modules/pyu2f/default.nix +++ b/pkgs/development/python-modules/pyu2f/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ six ]; - checkInputs = [ pytest six mock pyfakefs unittest2 ]; + checkInputs = [ pytest mock pyfakefs unittest2 ]; checkPhase = '' pytest pyu2f/tests diff --git a/pkgs/development/python-modules/respx/default.nix b/pkgs/development/python-modules/respx/default.nix index 61e2016a497..68da058194b 100644 --- a/pkgs/development/python-modules/respx/default.nix +++ b/pkgs/development/python-modules/respx/default.nix @@ -1,5 +1,4 @@ { lib -, attrs , buildPythonPackage , fetchFromGitHub , httpcore @@ -8,7 +7,6 @@ , pytest-cov , pytestCheckHook , trio -, xmltodict }: buildPythonPackage rec { diff --git a/pkgs/development/python-modules/spyder-kernels/0.x.nix b/pkgs/development/python-modules/spyder-kernels/0.x.nix index a760033c915..43a2f5b460f 100644 --- a/pkgs/development/python-modules/spyder-kernels/0.x.nix +++ b/pkgs/development/python-modules/spyder-kernels/0.x.nix @@ -60,6 +60,7 @@ buildPythonPackage rec { "test_turtle_launc" "test_umr_skip_cython" "test_umr_pathlist" + "test_user_sitepackages_in_pathlist" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/spyder/3.nix b/pkgs/development/python-modules/spyder/3.nix index 0fb98fa38e3..2618ccfcd8c 100644 --- a/pkgs/development/python-modules/spyder/3.nix +++ b/pkgs/development/python-modules/spyder/3.nix @@ -31,6 +31,8 @@ buildPythonPackage rec { substituteInPlace setup.py --replace "pyqt5<5.13" "pyqt5" ''; + pythonImportsCheck = [ "spyder" ]; + meta = with lib; { description = "Library providing a scientific python development environment"; longDescription = '' diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index 0859ed51323..1429fcab4c6 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -1,5 +1,4 @@ -{ fetchFromGitHub -, lib +{ lib , python3 , enableTelemetry ? false }: diff --git a/pkgs/development/tools/misc/blackmagic/default.nix b/pkgs/development/tools/misc/blackmagic/default.nix index c49187273c4..fc1af1a4d68 100644 --- a/pkgs/development/tools/misc/blackmagic/default.nix +++ b/pkgs/development/tools/misc/blackmagic/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { ''; buildPhase = "${stdenv.shell} ${./helper.sh}"; - installPhase = ":"; # buildPhase does this. + dontInstall = true; enableParallelBuilding = true; diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix index bd74a628877..ddfa6faf243 100644 --- a/pkgs/servers/uwsgi/default.nix +++ b/pkgs/servers/uwsgi/default.nix @@ -5,7 +5,7 @@ , systemd, withSystemd ? stdenv.isLinux , libcap, withCap ? stdenv.isLinux , python2, python3, ncurses -, ruby, php, libmysqlclient +, ruby, php }: let php-embed = php.override { diff --git a/pkgs/tools/misc/pubs/default.nix b/pkgs/tools/misc/pubs/default.nix index be5fd6d499c..3b6df828fda 100644 --- a/pkgs/tools/misc/pubs/default.nix +++ b/pkgs/tools/misc/pubs/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, fetchpatch, python3Packages }: +{ lib, fetchFromGitHub, python3Packages }: python3Packages.buildPythonApplication rec { pname = "pubs"; diff --git a/pkgs/tools/misc/yubikey-manager-qt/default.nix b/pkgs/tools/misc/yubikey-manager-qt/default.nix index 0f81f132abd..1176e440cef 100644 --- a/pkgs/tools/misc/yubikey-manager-qt/default.nix +++ b/pkgs/tools/misc/yubikey-manager-qt/default.nix @@ -11,8 +11,6 @@ , qtgraphicaleffects , qtquickcontrols , qtquickcontrols2 -, qtdeclarative -, qtsvg , yubikey-manager , yubikey-personalization }: diff --git a/pkgs/tools/security/gen-oath-safe/default.nix b/pkgs/tools/security/gen-oath-safe/default.nix index 51ff5b0e81e..20ee69eeaea 100644 --- a/pkgs/tools/security/gen-oath-safe/default.nix +++ b/pkgs/tools/security/gen-oath-safe/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper ]; - buildPhase = ":"; + dontBuild = true; installPhase = let diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7c1f274c2b7..972bcb2ef38 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6163,6 +6163,8 @@ in { pytest-httpserver = callPackage ../development/python-modules/pytest-httpserver { }; + pytest-httpx = callPackage ../development/python-modules/pytest-httpx { }; + pytest-instafail = callPackage ../development/python-modules/pytest-instafail { }; pytest-isort = callPackage ../development/python-modules/pytest-isort { };