diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-04-01 15:50:50 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-04-01 15:50:50 +0000 |
commit | 75eafe97f7df0d653bec67f3962214d7c357831f (patch) | |
tree | 09f2cc901e0e637876cbb78d192dfe2fcfef8156 /nixpkgs/pkgs/development/python-modules/pyparted | |
parent | a53b121bf4331497da63df3b1b7f1a7897dad146 (diff) | |
parent | a2e06fc3423c4be53181b15c28dfbe0bcf67dd73 (diff) | |
download | nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.gz nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.bz2 nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.lz nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.xz nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.zst nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.zip |
Merge commit 'a2e06fc3423c4be53181b15c28dfbe0bcf67dd73'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyparted')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyparted/default.nix | 21 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch | 26 |
2 files changed, 41 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyparted/default.nix b/nixpkgs/pkgs/development/python-modules/pyparted/default.nix index 3defe979d378..c51c55a5eb23 100644 --- a/nixpkgs/pkgs/development/python-modules/pyparted/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pyparted/default.nix @@ -1,18 +1,22 @@ { stdenv +, fetchFromGitHub , buildPythonPackage , isPyPy , pkgs , python +, six }: buildPythonPackage rec { pname = "pyparted"; - version = "3.10.7"; + version = "3.11.4"; disabled = isPyPy; - src = pkgs.fetchurl { - url = "https://github.com/rhinstaller/pyparted/archive/v${version}.tar.gz"; - sha256 = "0c9ljrdggwawd8wdzqqqzrna9prrlpj6xs59b0vkxzip0jkf652r"; + src = fetchFromGitHub { + repo = pname; + owner = "dcantrell"; + rev = "v${version}"; + sha256 = "0wd0xhv1y1zw7djzcnimj8irif3mg0shbhgz0jn5yi914is88h6n"; }; postPatch = '' @@ -26,11 +30,16 @@ buildPythonPackage rec { tests/test__ped_ped.py ''; + patches = [ + ./fix-test-pythonpath.patch + ]; + preConfigure = '' PATH="${pkgs.parted}/sbin:$PATH" ''; nativeBuildInputs = [ pkgs.pkgconfig ]; + checkInputs = [ six ]; propagatedBuildInputs = [ pkgs.parted ]; checkPhase = '' @@ -39,10 +48,10 @@ buildPythonPackage rec { ''; meta = with stdenv.lib; { - homepage = "https://fedorahosted.org/pyparted/"; + homepage = "https://github.com/dcantrell/pyparted/"; description = "Python interface for libparted"; license = licenses.gpl2Plus; platforms = platforms.linux; + maintainers = with maintainers; [ lsix ]; }; - } diff --git a/nixpkgs/pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch b/nixpkgs/pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch new file mode 100644 index 000000000000..740bffbef6d8 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch @@ -0,0 +1,26 @@ +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 + env PYTHON=python3 $(MAKE) ; \ +- env PYTHON=python3 PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src \ ++ env PYTHON=python3 PYTHONPATH=$$(find $$(pwd) -name "*.so" | head -n 1 | xargs dirname):src/parted:src:$$PYTHONPATH \ + tests/pylint/runpylint.py + + dist: |