diff --git a/pkgs/development/python-modules/pyparted/default.nix b/pkgs/development/python-modules/pyparted/default.nix index 935e700c4790..84d8439a5360 100644 --- a/pkgs/development/python-modules/pyparted/default.nix +++ b/pkgs/development/python-modules/pyparted/default.nix @@ -5,6 +5,7 @@ , pkgs , python , six +, pytestCheckHook }: buildPythonPackage rec { @@ -30,23 +31,14 @@ buildPythonPackage rec { tests/test__ped_ped.py ''; - patches = [ - ./fix-test-pythonpath.patch - ]; - preConfigure = '' PATH="${pkgs.parted}/sbin:$PATH" ''; nativeBuildInputs = [ pkgs.pkg-config ]; - nativeCheckInputs = [ six ]; + nativeCheckInputs = [ six pytestCheckHook ]; propagatedBuildInputs = [ pkgs.parted ]; - checkPhase = '' - patchShebangs Makefile - make test PYTHON=${python.executable} - ''; - meta = with lib; { homepage = "https://github.com/dcantrell/pyparted/"; description = "Python interface for libparted"; diff --git a/pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch b/pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch deleted file mode 100644 index 3f084dc8bea5..000000000000 --- a/pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ur a/Makefile b/Makefile ---- a/Makefile 1980-01-02 00:00:00.000000000 +0100 -+++ b/Makefile 2020-02-18 20:04:14.068243263 +0100 -@@ -39,19 +39,19 @@ - @$(PYTHON) setup.py build - - test: all -- @env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src \ -+ @env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src:$$PYTHONPATH \ - $(PYTHON) -m unittest discover -v - - coverage: all - @echo "*** Running unittests with $(COVERAGE) for $(PYTHON) ***" -- @env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src \ -+ @env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src:$$PYTHONPATH \ - $(COVERAGE) run --branch -m unittest discover -v - $(COVERAGE) report --include="build/lib.*/parted/*" --show-missing - $(COVERAGE) report --include="build/lib.*/parted/*" > coverage-report.log - - check: clean - $(MAKE) ; \ -- env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src \ -+ env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src:$$PYTHONPATH \ - tests/pylint/runpylint.py - - dist: