1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/pyparted/fix-test-pythonpath.patch
2020-02-18 14:03:41 -08:00

27 lines
1.2 KiB
Diff

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: