summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-06-25 12:34:45 +0100
committerGitHub <noreply@github.com>2020-06-25 12:34:45 +0100
commitd35735ae2544d5dccb2ae7f8bcae5383e50cddbd (patch)
treedb72afc7073f55643ae0ed67380d28839c7fa149 /pkgs/development
parentbdb59380a39d63fb3b0f22b90f3fcaf40686e0d7 (diff)
parentb422dd62ce667b01939d19edff4eb1fe1df40b33 (diff)
downloadnixpkgs-d35735ae2544d5dccb2ae7f8bcae5383e50cddbd.tar
nixpkgs-d35735ae2544d5dccb2ae7f8bcae5383e50cddbd.tar.gz
nixpkgs-d35735ae2544d5dccb2ae7f8bcae5383e50cddbd.tar.bz2
nixpkgs-d35735ae2544d5dccb2ae7f8bcae5383e50cddbd.tar.lz
nixpkgs-d35735ae2544d5dccb2ae7f8bcae5383e50cddbd.tar.xz
nixpkgs-d35735ae2544d5dccb2ae7f8bcae5383e50cddbd.tar.zst
nixpkgs-d35735ae2544d5dccb2ae7f8bcae5383e50cddbd.zip
Merge pull request #91479 from Mic92/python-fixes
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/jaraco_itertools/0001-Don-t-run-flake8-checks-during-the-build.patch27
-rw-r--r--pkgs/development/python-modules/jaraco_itertools/default.nix5
-rw-r--r--pkgs/development/python-modules/pytest-freezegun/default.nix29
-rw-r--r--pkgs/development/python-modules/tempora/0001-pytest-remove-flake8-black-coverage.patch28
-rw-r--r--pkgs/development/python-modules/tempora/default.nix18
5 files changed, 101 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/jaraco_itertools/0001-Don-t-run-flake8-checks-during-the-build.patch b/pkgs/development/python-modules/jaraco_itertools/0001-Don-t-run-flake8-checks-during-the-build.patch
new file mode 100644
index 00000000000..2dcf7d64862
--- /dev/null
+++ b/pkgs/development/python-modules/jaraco_itertools/0001-Don-t-run-flake8-checks-during-the-build.patch
@@ -0,0 +1,27 @@
+From fd56b0d85393d684bd3bf99f33d8638da884282f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
+Date: Thu, 25 Jun 2020 09:52:11 +0100
+Subject: [PATCH] disable flake8/black8/coverage from tests
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
+---
+ pytest.ini | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pytest.ini b/pytest.ini
+index 5027d34..4e2a2d2 100644
+--- a/pytest.ini
++++ b/pytest.ini
+@@ -1,5 +1,5 @@
+ [pytest]
+ norecursedirs=dist build .tox .eggs
+-addopts=--doctest-modules --flake8 --black --cov
++addopts=--doctest-modules
+ doctest_optionflags=ALLOW_UNICODE ELLIPSIS ALLOW_BYTES
+ filterwarnings=
+-- 
+2.27.0
+
diff --git a/pkgs/development/python-modules/jaraco_itertools/default.nix b/pkgs/development/python-modules/jaraco_itertools/default.nix
index 7f1d954f68d..5df70b6da97 100644
--- a/pkgs/development/python-modules/jaraco_itertools/default.nix
+++ b/pkgs/development/python-modules/jaraco_itertools/default.nix
@@ -12,6 +12,11 @@ buildPythonPackage rec {
   };
 
   nativeBuildInputs = [ setuptools_scm ];
+
+  patches = [
+    ./0001-Don-t-run-flake8-checks-during-the-build.patch
+  ];
+
   propagatedBuildInputs = [ inflect more-itertools six ];
   checkInputs = [ pytest ];
 
diff --git a/pkgs/development/python-modules/pytest-freezegun/default.nix b/pkgs/development/python-modules/pytest-freezegun/default.nix
new file mode 100644
index 00000000000..8809bc143cb
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-freezegun/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, freezegun
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "pytest-freezegun";
+  version = "0.4.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    extension = "zip";
+    sha256 = "060cdf192848e50a4a681a5e73f8b544c4ee5ebc1fab3cb7223a0097bac2f83f";
+  };
+
+  propagatedBuildInputs = [
+    freezegun
+    pytest
+  ];
+
+  meta = with lib; {
+    description = "Wrap tests with fixtures in freeze_time";
+    homepage = "https://github.com/ktosiek/pytest-freezegun";
+    license = licenses.mit;
+    maintainers = [ maintainers.mic92 ];
+  };
+}
diff --git a/pkgs/development/python-modules/tempora/0001-pytest-remove-flake8-black-coverage.patch b/pkgs/development/python-modules/tempora/0001-pytest-remove-flake8-black-coverage.patch
new file mode 100644
index 00000000000..f807a6d2515
--- /dev/null
+++ b/pkgs/development/python-modules/tempora/0001-pytest-remove-flake8-black-coverage.patch
@@ -0,0 +1,28 @@
+From 9dfd2a8fac4a643fd007390762ccc8564588b4bf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
+Date: Thu, 25 Jun 2020 10:16:52 +0100
+Subject: [PATCH] pytest: remove flake8/black/coverage
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
+---
+ pytest.ini | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pytest.ini b/pytest.ini
+index bd6998d..a464529 100644
+--- a/pytest.ini
++++ b/pytest.ini
+@@ -1,6 +1,6 @@
+ [pytest]
+ norecursedirs=dist build .tox .eggs
+-addopts=--doctest-modules --flake8 --black --cov
++addopts=--doctest-modules
+ doctest_optionflags=ALLOW_UNICODE ELLIPSIS
+ filterwarnings=
+ 	# suppress known warning
+-- 
+2.27.0
+
diff --git a/pkgs/development/python-modules/tempora/default.nix b/pkgs/development/python-modules/tempora/default.nix
index 9b54953d28c..d4139ce7621 100644
--- a/pkgs/development/python-modules/tempora/default.nix
+++ b/pkgs/development/python-modules/tempora/default.nix
@@ -1,7 +1,6 @@
 { lib, buildPythonPackage, fetchPypi
-, setuptools_scm, pytest, freezegun, backports_unittest-mock
-, pytest-black, pytestcov, pytest-flake8
-, six, pytz, jaraco_functools }:
+, setuptools_scm, pytest, pytest-freezegun, freezegun, backports_unittest-mock
+, six, pytz, jaraco_functools, pythonOlder }:
 
 buildPythonPackage rec {
   pname = "tempora";
@@ -12,15 +11,22 @@ buildPythonPackage rec {
     sha256 = "e370d822cf48f5356aab0734ea45807250f5120e291c76712a1d766b49ae34f8";
   };
 
+  disabled = pythonOlder "3.2";
+
   nativeBuildInputs = [ setuptools_scm ];
 
+  patches = [
+    ./0001-pytest-remove-flake8-black-coverage.patch
+  ];
+
   propagatedBuildInputs = [ six pytz jaraco_functools ];
 
-  checkInputs = [ pytest pytest-flake8 pytest-black pytestcov freezegun backports_unittest-mock ];
+  checkInputs = [
+    pytest-freezegun pytest freezegun backports_unittest-mock
+  ];
 
-  # missing pytest-freezegun package
   checkPhase = ''
-    pytest -k 'not get_nearest_year_for_day'
+    pytest
   '';
 
   meta = with lib; {