From 94ae9f4ed542d5171104f551919b8db936123147 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 21 Jul 2019 04:20:00 -0500 Subject: [PATCH 1/8] pythonPackages.pytest-testmon: 0.9.16 -> 0.9.18 --- pkgs/development/python-modules/pytest-testmon/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pytest-testmon/default.nix b/pkgs/development/python-modules/pytest-testmon/default.nix index 1a4cc260ff44..17fb56a0588b 100644 --- a/pkgs/development/python-modules/pytest-testmon/default.nix +++ b/pkgs/development/python-modules/pytest-testmon/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "pytest-testmon"; - version = "0.9.16"; + version = "0.9.18"; src = fetchPypi { inherit pname version; - sha256 = "df00594e55f8f8f826e0e345dc23863ebac066eb749f8229c515a0373669c5bb"; + sha256 = "05648f9b22aeeda9d32e61b46fa78c9ff28f217d69005b3b19ffb75d5992187e"; }; buildInputs = [ pytest ]; @@ -21,7 +21,7 @@ buildPythonPackage rec { checkInputs = [ pytest ]; checkPhase = '' - pytest test + pytest --deselect=test/test_testmon.py::TestmonDeselect::test_dependent_testmodule ''; meta = with lib; { From 5ac577f1a25235b8093eaa10a70a6e2ca6c61c7a Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 21 Jul 2019 04:21:00 -0500 Subject: [PATCH 2/8] pythonPackages.tempora: enable tests --- pkgs/development/python-modules/tempora/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/tempora/default.nix b/pkgs/development/python-modules/tempora/default.nix index 861054ed948f..10de193866b3 100644 --- a/pkgs/development/python-modules/tempora/default.nix +++ b/pkgs/development/python-modules/tempora/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi -, setuptools_scm +, setuptools_scm, pytest, freezegun, backports_unittest-mock , six, pytz, jaraco_functools }: buildPythonPackage rec { @@ -11,12 +11,17 @@ buildPythonPackage rec { sha256 = "cb60b1d2b1664104e307f8e5269d7f4acdb077c82e35cd57246ae14a3427d2d6"; }; - doCheck = false; - buildInputs = [ setuptools_scm ]; propagatedBuildInputs = [ six pytz jaraco_functools ]; + checkInputs = [ pytest freezegun backports_unittest-mock ]; + + checkPhase = '' + substituteInPlace pytest.ini --replace "--flake8" "" + pytest + ''; + meta = with lib; { description = "Objects and routines pertaining to date and time"; homepage = https://github.com/jaraco/tempora; From 1ac3350c57b16e80a57c920516fc826f46e8c6ad Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 21 Jul 2019 04:22:00 -0500 Subject: [PATCH 3/8] pythonPackages.portend: fix build --- pkgs/development/python-modules/portend/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/portend/default.nix b/pkgs/development/python-modules/portend/default.nix index a8dc0e9907af..5da7a7941c0f 100644 --- a/pkgs/development/python-modules/portend/default.nix +++ b/pkgs/development/python-modules/portend/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { checkInputs = [ pytest ]; checkPhase = '' - py.test + py.test --deselect=test_portend.py::TestChecker::test_check_port_listening ''; meta = with stdenv.lib; { From f036eb62a9644035a4061f91ec7db9c2a399342b Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 21 Jul 2019 04:23:00 -0500 Subject: [PATCH 4/8] pythonPackages.backports_functools_lru_cache: enable tests --- .../backports_functools_lru_cache/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/backports_functools_lru_cache/default.nix b/pkgs/development/python-modules/backports_functools_lru_cache/default.nix index bcaa844720bd..2a8b5e7960d4 100644 --- a/pkgs/development/python-modules/backports_functools_lru_cache/default.nix +++ b/pkgs/development/python-modules/backports_functools_lru_cache/default.nix @@ -2,10 +2,11 @@ , buildPythonPackage , fetchPypi , setuptools_scm -, pythonOlder +, isPy3k +, pytest }: -if !(pythonOlder "3.3") then null else buildPythonPackage rec { +buildPythonPackage rec { pname = "backports.functools_lru_cache"; version = "1.5"; @@ -15,7 +16,15 @@ if !(pythonOlder "3.3") then null else buildPythonPackage rec { }; buildInputs = [ setuptools_scm ]; - doCheck = false; # No proper test + + checkInputs = [ pytest ]; + + checkPhase = '' + pytest + ''; + + # Test fail on Python 2 + doCheck = isPy3k; meta = { description = "Backport of functools.lru_cache"; From 2b4495246a7127e1b145207e24a7f5c49834b4ea Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 21 Jul 2019 04:24:00 -0500 Subject: [PATCH 5/8] pythonPackages.setuptools-scm-git-archive: init at 1.1 --- .../setuptools-scm-git-archive/default.nix | 23 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/python-modules/setuptools-scm-git-archive/default.nix diff --git a/pkgs/development/python-modules/setuptools-scm-git-archive/default.nix b/pkgs/development/python-modules/setuptools-scm-git-archive/default.nix new file mode 100644 index 000000000000..9c08871339a5 --- /dev/null +++ b/pkgs/development/python-modules/setuptools-scm-git-archive/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchPypi, setuptools_scm, pytest }: + +buildPythonPackage rec { + pname = "setuptools-scm-git-archive"; + version = "1.1"; + + src = fetchPypi { + inherit version; + pname = "setuptools_scm_git_archive"; + sha256 = "6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062"; + }; + + nativeBuildInputs = [ setuptools_scm ]; + + checkInputs = [ pytest ]; + + meta = with stdenv.lib; { + description = "setuptools_scm plugin for git archives"; + homepage = "https://github.com/Changaco/setuptools_scm_git_archive"; + license = licenses.mit; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2cc3e62d2dac..26592e084577 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4651,6 +4651,8 @@ in { setuptools_scm = callPackage ../development/python-modules/setuptools_scm { }; + setuptools-scm-git-archive = callPackage ../development/python-modules/setuptools-scm-git-archive { }; + serverlessrepo = callPackage ../development/python-modules/serverlessrepo { }; shippai = callPackage ../development/python-modules/shippai {}; From 9b6ddb3c2bd7c0214f008809c588ed9e5451a6cc Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 21 Jul 2019 04:25:00 -0500 Subject: [PATCH 6/8] pythonPackages.cheroot: 6.3.3 -> 6.5.5 --- .../python-modules/cheroot/default.nix | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/pkgs/development/python-modules/cheroot/default.nix b/pkgs/development/python-modules/cheroot/default.nix index 08a455eb40c3..96602c624a47 100644 --- a/pkgs/development/python-modules/cheroot/default.nix +++ b/pkgs/development/python-modules/cheroot/default.nix @@ -1,39 +1,30 @@ -{ stdenv, fetchPypi, buildPythonPackage, fetchpatch -, more-itertools, six -, pytest, pytestcov, portend -, backports_unittest-mock +{ stdenv, fetchPypi, buildPythonPackage +, more-itertools, six, setuptools_scm, setuptools-scm-git-archive +, pytest, pytestcov, portend, pytest-testmon, pytest-mock +, backports_unittest-mock, pyopenssl, requests, trustme, requests-unixsocket , backports_functools_lru_cache }: buildPythonPackage rec { pname = "cheroot"; - version = "6.3.3"; + version = "6.5.5"; src = fetchPypi { inherit pname version; - sha256 = "8e3ac15e1efffc81425a693e99b3c09d7ea4bf947255d8d4c38e2cf76f3a4d25"; + sha256 = "f6a85e005adb5bc5f3a92b998ff0e48795d4d98a0fbb7edde47a7513d4100601"; }; - patches = fetchpatch { - name = "cheroot-fix-setup-python3.patch"; - url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/cheroot-fix-setup-python3.patch?h=packages/python-cheroot&id=9b33cb0885b3c0d91adeacae23761a4321eb0e64"; - sha256 = "1rlgz0qln536y00mfqlf0i9hz3f53id73wh47cg5q2vcsw1w2bpc"; - }; + nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ]; propagatedBuildInputs = [ more-itertools six backports_functools_lru_cache ]; - checkInputs = [ pytest pytestcov portend backports_unittest-mock ]; - -# Disable testmon, it needs pytest-testmon, which we do not currently have in nikpkgs, -# and is only used to skip some tests that are already known to work. - postPatch = '' - substituteInPlace "./pytest.ini" --replace "--testmon" "" - substituteInPlace setup.py --replace "use_scm_version=True" "version=\"${version}\"" \ - --replace "'setuptools_scm>=1.15.0'," "" \ - --replace "'setuptools_scm_git_archive>=1.0'," "" \ - ''; + checkInputs = [ pytest pytestcov portend backports_unittest-mock pytest-mock pytest-testmon pyopenssl requests trustme requests-unixsocket ]; + # Disable doctest plugin because times out + # Deselect test_bind_addr_unix on darwin because times out + # Deselect test_http_over_https_error on darwin because builtin cert fails checkPhase = '' - py.test cheroot + substituteInPlace pytest.ini --replace "--doctest-modules" "" + pytest ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=cheroot/test/test_ssl.py::test_http_over_https_error --deselect=cheroot/test/test_server.py::test_bind_addr_unix"} ''; meta = with stdenv.lib; { From 2354898cb2cda819c3a930b86fc1e8902ab819c4 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 21 Jul 2019 04:26:00 -0500 Subject: [PATCH 7/8] pythonPackages.cherrypy: 17.4.1 -> 17.4.2 --- pkgs/development/python-modules/cherrypy/17.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/cherrypy/17.nix b/pkgs/development/python-modules/cherrypy/17.nix index daeb6ca45267..d9b9166e0f0d 100644 --- a/pkgs/development/python-modules/cherrypy/17.nix +++ b/pkgs/development/python-modules/cherrypy/17.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi +{ stdenv, buildPythonPackage, fetchPypi , setuptools_scm , cheroot, contextlib2, portend, routes, six, zc_lockfile , backports_unittest-mock, objgraph, pathpy, pytest, pytestcov, backports_functools_lru_cache, requests_toolbelt @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "cherrypy"; - version = "17.4.1"; + version = "17.4.2"; src = fetchPypi { pname = "CherryPy"; inherit version; - sha256 = "1kl17anzz535jgkn9qcy0c2m0zlafph0iv7ph3bb9mfrs2bgvagv"; + sha256 = "ef1619ad161f526745d4f0e4e517753d9d985814f1280e330661333d2ba05cdf"; }; propagatedBuildInputs = [ @@ -25,10 +25,10 @@ buildPythonPackage rec { ]; checkPhase = '' - pytest + pytest ${stdenv.lib.optionalString stdenv.isDarwin "--ignore=cherrypy/test/test_wsgi_unix_socket.py"} ''; - meta = with lib; { + meta = with stdenv.lib; { homepage = https://www.cherrypy.org; description = "A pythonic, object-oriented HTTP framework"; license = licenses.bsd3; From d57d67e1c48bf427524ac675540b3d5c7e43db42 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 21 Jul 2019 04:27:00 -0500 Subject: [PATCH 8/8] python3Packages.cherrypy: fix build --- pkgs/development/python-modules/cherrypy/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/cherrypy/default.nix b/pkgs/development/python-modules/cherrypy/default.nix index a0c8d24889df..75152d39aeb4 100644 --- a/pkgs/development/python-modules/cherrypy/default.nix +++ b/pkgs/development/python-modules/cherrypy/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k +{ stdenv, buildPythonPackage, fetchPypi, isPy3k , setuptools_scm , cheroot, portend, more-itertools, zc_lockfile, routes , objgraph, pytest, pytestcov, pathpy, requests_toolbelt, pytest-services @@ -29,11 +29,13 @@ buildPythonPackage rec { objgraph pytest pytestcov pathpy requests_toolbelt pytest-services ]; + # Disable doctest plugin because times out checkPhase = '' - pytest + substituteInPlace pytest.ini --replace "--doctest-modules" "" + pytest --deselect=cherrypy/test/test_static.py::StaticTest::test_null_bytes ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=cherrypy/test/test_bus.py::BusMethodTests::test_block"} ''; - meta = with lib; { + meta = with stdenv.lib; { homepage = https://www.cherrypy.org; description = "A pythonic, object-oriented HTTP framework"; license = licenses.bsd3;