Merge pull request #264228 from Yarny0/pyparted-fix

python311Packages.pyparted: fix build after update to 3.13.0

authored by

OTABI Tomoya and committed by
GitHub
ef3e4e40 fea9134c

+2 -45
+2 -19
pkgs/development/python-modules/pyparted/default.nix
··· 1 1 { lib, stdenv 2 2 , fetchFromGitHub 3 - , fetchpatch 4 3 , buildPythonPackage 5 4 , isPyPy 6 5 , pkgs 7 6 , python 8 7 , six 8 + , pytestCheckHook 9 9 }: 10 10 11 11 buildPythonPackage rec { ··· 31 31 tests/test__ped_ped.py 32 32 ''; 33 33 34 - patches = [ 35 - ./fix-test-pythonpath.patch 36 - (fetchpatch { 37 - url = "https://github.com/dcantrell/pyparted/commit/07ba882d04fa2099b53d41370416b97957d2abcb.patch"; 38 - hash = "sha256-yYfLdy+TOKfN3gtTMgOWPebPTRYyaOYh/yFTowCbdjg="; 39 - }) 40 - (fetchpatch { 41 - url = "https://github.com/dcantrell/pyparted/commit/a01b4eeecf63b0580c192c7c2db7a5c406a7ad6d.patch"; 42 - hash = "sha256-M/8hYiKUBzaTOxPYDFK5BAvCm6WJGx+693qwj3HzdRA="; 43 - }) 44 - ]; 45 - 46 34 preConfigure = '' 47 35 PATH="${pkgs.parted}/sbin:$PATH" 48 36 ''; 49 37 50 38 nativeBuildInputs = [ pkgs.pkg-config ]; 51 - nativeCheckInputs = [ six ]; 39 + nativeCheckInputs = [ six pytestCheckHook ]; 52 40 propagatedBuildInputs = [ pkgs.parted ]; 53 - 54 - checkPhase = '' 55 - patchShebangs Makefile 56 - make test PYTHON=${python.executable} 57 - ''; 58 41 59 42 meta = with lib; { 60 43 homepage = "https://github.com/dcantrell/pyparted/";
-26
pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch
··· 1 - diff -ur a/Makefile b/Makefile 2 - --- a/Makefile 1980-01-02 00:00:00.000000000 +0100 3 - +++ b/Makefile 2020-02-18 20:04:14.068243263 +0100 4 - @@ -39,19 +39,19 @@ 5 - @$(PYTHON) setup.py build 6 - 7 - test: all 8 - - @env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src \ 9 - + @env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src:$$PYTHONPATH \ 10 - $(PYTHON) -m unittest discover -v 11 - 12 - coverage: all 13 - @echo "*** Running unittests with $(COVERAGE) for $(PYTHON) ***" 14 - - @env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src \ 15 - + @env PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src:$$PYTHONPATH \ 16 - $(COVERAGE) run --branch -m unittest discover -v 17 - $(COVERAGE) report --include="build/lib.*/parted/*" --show-missing 18 - $(COVERAGE) report --include="build/lib.*/parted/*" > coverage-report.log 19 - 20 - check: clean 21 - env PYTHON=python3 $(MAKE) ; \ 22 - - env PYTHON=python3 PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src \ 23 - + env PYTHON=python3 PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src:$$PYTHONPATH \ 24 - tests/pylint/runpylint.py 25 - 26 - dist: