summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-daemon/default.nix
diff options
context:
space:
mode:
authorJoão Figueira <jmc.figueira@campus.fct.unl.pt>2022-01-24 01:33:13 +0000
committerGitHub <noreply@github.com>2022-01-24 01:33:13 +0000
commitae10fad86b2d7a357825c19a563dd5dac60a67da (patch)
treea2bde77769ba6055989c27aaf1ac7287ad56d640 /pkgs/development/python-modules/python-daemon/default.nix
parent0ac894e7d1d91e32fdcdc901229f16f27f321374 (diff)
parent8dbc4efd40169a8e3e57375b08d78205e5f83ff0 (diff)
Merge branch 'master' into wine-wayland
Diffstat (limited to 'pkgs/development/python-modules/python-daemon/default.nix')
-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; [ ];
};
}