Package: src:pep8
Version: 1.6.2-0.1
Severity: wishlist
Tags: patch

trying to use python3 only, and running without a python (2.x) binary; converting the pep8 binary to use python3.

This introduces a python-pep8 package, and unfortunately breaking some packages which not only require the pep8 binary, but also the pep8 module.

among these are prospector, python-flake8, shortuuid, actdiag.

https://patches.ubuntu.com/a/actdiag/actdiag_0.5.3-5ubuntu1.patch
https://patches.ubuntu.com/p/python-flake8/python-flake8_2.2.2-1ubuntu4.patch
https://patches.ubuntu.com/s/shortuuid/shortuuid_0.4.2-4ubuntu1.patch
http://launchpadlibrarian.net/229121519/prospector_0.10.1%2Bgit20150706.a00e191-1_0.10.1%2Bgit20150706.a00e191-1ubuntu1.diff.gz
  * Let the pep8 binary use python3.
  * Build a python-pep8 package.
  * Don't depend on setuptools, pkg-resources is good enough.
 
diff -pruN 1.6.2-0.1/debian/control 1.6.2-0.1ubuntu2/debian/control
--- 1.6.2-0.1/debian/control	2015-10-25 20:06:09.000000000 +0000
+++ 1.6.2-0.1ubuntu2/debian/control	2015-10-25 20:06:09.000000000 +0000
@@ -8,15 +8,24 @@ Homepage: http://pypi.python.org/pypi/pe
 
 Package: pep8
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, python-setuptools
-Description: Python PEP 8 code style checker - python2
+Depends: ${misc:Depends}, ${python3:Depends}, python3-pep8
+Description: Python PEP 8 code style checker
+ Features a plugin architecture allowing for adding new checks is easily.
+ Parseable output listing line numbers of the error location.  Consists of
+ just one Python file, and requires only stdlib.
+
+Package: python-pep8
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}, python-pkg-resources
+Replaces: pep8 (<< 1.6.2-0.1)
+Description: Python PEP 8 code style checker - python
  Features a plugin architecture allowing for adding new checks is easily.
  Parseable output listing line numbers of the error location.  Consists of
  just one Python file, and requires only stdlib.
 
 Package: python3-pep8
 Architecture: all
-Depends: ${misc:Depends}, ${python3:Depends}, python3-setuptools
+Depends: ${misc:Depends}, ${python3:Depends}, python3-pkg-resources
 Description: Python PEP 8 code style checker - python3
  Features a plugin architecture allowing for adding new checks is easily.
  Parseable output listing line numbers of the error location.  Consists of
diff -pruN 1.6.2-0.1/debian/rules 1.6.2-0.1ubuntu2/debian/rules
--- 1.6.2-0.1/debian/rules	2015-10-25 20:06:09.000000000 +0000
+++ 1.6.2-0.1ubuntu2/debian/rules	2015-10-25 20:06:09.000000000 +0000
@@ -17,11 +17,16 @@ PYTHON3S:=$(shell py3versions -vr)
 override_dh_auto_install:
 	set -e && for pyvers in $(PYTHONS); do \
 		python$$pyvers setup.py install --install-layout=deb \
-			--root $(CURDIR)/debian/pep8; \
+			--root $(CURDIR)/debian/python-pep8; \
 	done
 
 	set -e && for pyvers in $(PYTHON3S); do \
 		python$$pyvers setup.py install --install-layout=deb \
 			--root $(CURDIR)/debian/python3-pep8; \
 	done
-	rm -r $(CURDIR)/debian/python3-pep8/usr/bin
+	rm -rf debian/python-pep8/usr/bin
+	mkdir -p debian/pep8/usr
+	mv debian/python3-pep8/usr/bin debian/pep8/usr/.
+
+override_dh_python3:
+	dh_python3 --shebang=/usr/bin/python3

Reply via email to