Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / pyparted / fix-test-pythonpath.patch
blob740bffbef6d8d9ec61992eaa82fa026f7e00922a
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
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
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
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
26 dist: