[Python-apps-team] Bug#887816: isort: Please don't install test_isort.py to global Python namespace

Chris Lamb lamby at debian.org
Sat Jan 20 06:09:04 UTC 2018


Source: isort
Version: 4.2.5+ds1-3
Severity: important

Hi!

src:isort installs:

 * usr/lib/python2.7/dist-packages/test_isort.py
 * usr/lib/python3/dist-packages/test_isort.py

... as it moves them for testing. We houldn't pollute the global Python
namespaces with such files.

Patch attached.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/debian/rules b/debian/rules
index 279ae8f..8118c43 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 export PYBUILD_NAME=isort
-export PYBUILD_BEFORE_TEST=cp {dir}/test_isort.py {build_dir}
+export PYBUILD_BEFORE_TEST=mkdir -p {build_dir}/tests && cp {dir}/test_isort.py {build_dir}
+export PYBUILD_TEST_ARGS={build_dir}/tests/
 
 %:
 	dh $@ --with python2,python3 --buildsystem=pybuild


More information about the Python-apps-team mailing list