ubuntu-packaging-guide-team team mailing list archive
-
ubuntu-packaging-guide-team team
-
Mailing list archive
-
Message #01068
[Bug 1047457] Re: python-packaging.html will result in incorrect #! lines for Python 3
I hope it's OK now:
=== modified file 'ubuntu-packaging-guide/python-packaging.rst'
--- ubuntu-packaging-guide/python-packaging.rst 2012-08-23 11:29:49 +0000
+++ ubuntu-packaging-guide/python-packaging.rst 2012-09-07 16:12:04 +0000
@@ -37,8 +37,12 @@
.. code-block:: makefile
- # This command builds the list of supported Python 3 versions
- PYTHON3=$(shell py3versions -r)
+ # These command build the list of supported Python 3 versions
+ # The last version should be just "python3" so that the scripts
+ # get a correct shebang.
+ PY3REQUESTED := $(shell py3versions -r)
+ PY3DEFAULT := $(shell py3versions -d)
+ PYTHON3 := $(filter-out $(PY3DEFAULT),$(PY3REQUESTED)) python3
%:
# Adding the required helpers
--
You received this bug notification because you are a member of Ubuntu
Packaging Guide Team, which is subscribed to Ubuntu Packaging Guide.
https://bugs.launchpad.net/bugs/1047457
Title:
python-packaging.html will result in incorrect #! lines for Python 3
Status in Ubuntu Packaging Guide:
In Progress
Bug description:
The advice in python-packaging.html:
PYTHON3=$(shell py3versions -r)
...
set -ex; for python in $(PYTHON3); do \
$$python setup.py build; \
done
...
set -ex; for python in $(PYTHON3); do \
$$python setup.py install --install-layout=deb --root=debian/tmp; \
done
... will result in incorrect #! lines for applications defaulting to
Python 3, something like #! /usr/bin/python3.2 rather than #!
/usr/bin/python3. To avoid that, you need something like this:
https://bazaar.launchpad.net/~ubuntu-core-dev/software-
properties/main/revision/794
This only really matters if you're defaulting to Python 3, which
probably isn't the case in the example given in this documentation
since it runs the standard dh_auto_* commands *after* the manual
additions and those commands will overwrite #! with #!
/usr/bin/python. However, these overrides are likely to be copied and
pasted with modifications, so it's worth getting them pedantically
right.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-packaging-guide/+bug/1047457/+subscriptions
Follow ups
References