Replacing the shebang from /usr/bin/pythonx.x to /usr/bin/env python{2,3}.

This commit is contained in:
Thomas Goirand
2014-02-01 12:42:02 +08:00
parent befe29a603
commit c8db29ace2
2 changed files with 10 additions and 1 deletions

1
debian/changelog vendored
View File

@@ -3,6 +3,7 @@ python-lesscpy (0.9j-4) unstable; urgency=medium
* Installing /usr/bin/lesscpy using update-alternatives, so that users can
use either python 2 or 3.
* Standard-Version: is now 3.9.5.
* Replacing the shebang from /usr/bin/pythonx.x to /usr/bin/env python{2,3}.
-- Thomas Goirand <zigo@debian.org> Sat, 01 Feb 2014 12:31:15 +0800

10
debian/rules vendored
View File

@@ -22,5 +22,13 @@ override_dh_auto_install:
python$$pyvers setup.py install --install-layout=deb \
--root $(CURDIR)/debian/python3-lesscpy; \
done
mv $(CURDIR)/debian/python3-lesscpy/usr/bin/lesscpy $(CURDIR)/debian/python3-lesscpy/usr/bin/python3-lesscpy
mv $(CURDIR)/debian/python-lesscpy/usr/bin/lesscpy $(CURDIR)/debian/python-lesscpy/usr/bin/python2-lesscpy
# Fix the interpreter to be /usr/bin/env python, rather than
# python2.6, which needs argparse (this is only useful for
# backporting to wheezy, we don't care for Python 2.7)
sed -i '1 s/python2.6/env python/' $(CURDIR)/debian/python-lesscpy/usr/bin/python2-lesscpy
mv $(CURDIR)/debian/python3-lesscpy/usr/bin/lesscpy $(CURDIR)/debian/python3-lesscpy/usr/bin/python3-lesscpy
# Use /usr/bin/env python3 instead of /usr/bin/python3.x
sed -i '1 s/python3\../env python/' $(CURDIR)/debian/python3-lesscpy/usr/bin/python3-lesscpy