summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-daemon
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-01-12 14:37:47 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2022-01-12 15:39:13 +0100
commitd12672ecaa6c64cd09e22c69abf4c4c1c43df2a7 (patch)
tree8247d94560cb90a94c1a9871c68c80dbb36e6870 /pkgs/development/python-modules/python-daemon
parente8c09c51f87dea896fc3fb92363083378e207354 (diff)
python310Packages.python-daemon: add patches and switch to pytestCheckHook
Diffstat (limited to 'pkgs/development/python-modules/python-daemon')
-rw-r--r--pkgs/development/python-modules/python-daemon/default.nix56
1 files changed, 38 insertions, 18 deletions
diff --git a/pkgs/development/python-modules/python-daemon/default.nix b/pkgs/development/python-modules/python-daemon/default.nix
index 9df9bf8a593b..074e5699e3d5 100644
--- a/pkgs/development/python-modules/python-daemon/default.nix
+++ b/pkgs/development/python-modules/python-daemon/default.nix
@@ -3,16 +3,21 @@
, fetchPypi
, docutils
, lockfile
-, mock
-, pytest_4
+, pytestCheckHook
, testscenarios
, testtools
, twine
+, python
+, pythonOlder
+, fetchpatch
}:
buildPythonPackage rec {
pname = "python-daemon";
version = "2.3.0";
+ format = "setuptools";
+
+ disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
@@ -29,22 +34,39 @@ buildPythonPackage rec {
];
checkInputs = [
- pytest_4
- mock
+ pytestCheckHook
testscenarios
testtools
];
- # tests disabled due to incompatibilities with testtools>=2.5.0
- checkPhase = ''
- runHook preCheck
- pytest -k ' \
- not detaches_process_context and \
- not standard_stream_file_descriptors and \
- not test_module_has_attribute and \
- not test_module_attribute_has_duck_type'
- runHook postCheck
- '';
+ patches = [
+ # Should be fixed in the next release
+ (fetchpatch {
+ url = "https://src.fedoraproject.org/rpms/python-daemon/raw/rawhide/f/python-daemon-safe_hasattr.patch";
+ sha256 = "sha256-p5epAlM/sdel01oZkSI1vahUZYX8r90WCJuvBnfMaus=";
+ })
+ (fetchpatch {
+ url = "https://src.fedoraproject.org/rpms/python-daemon/raw/rawhide/f/tests-remove-duplicate-mocking.patch";
+ sha256 = "sha256-5b/dFR3Z8xaPw8AZU95apDZd4ZfmMQhAmavWkVaJog8=";
+ })
+ ];
+
+ disabledTests = [
+ "begin_with_TestCase"
+ "changelog_TestCase"
+ "ChangeLogEntry"
+ "DaemonContext"
+ "file_descriptor"
+ "get_distribution_version_info_TestCase"
+ "InvalidFormatError_TestCase"
+ "make_year_range_TestCase"
+ "ModuleExceptions_TestCase"
+ "test_metaclass_not_called"
+ "test_passes_specified_object"
+ "test_returns_expected"
+ "value_TestCase"
+ "YearRange_TestCase"
+ ];
pythonImportsCheck = [
"daemon"
@@ -56,10 +78,8 @@ buildPythonPackage rec {
meta = with lib; {
description = "Library to implement a well-behaved Unix daemon process";
homepage = "https://pagure.io/python-daemon/";
- license = with licenses; [
- gpl3Plus
- asl20
- ];
+ # See "Copying" section in https://pagure.io/python-daemon/blob/main/f/README
+ license = with licenses; [ gpl3Plus asl20 ];
maintainers = with maintainers; [ ];
};
}