diff options
author | Alexandre Detiste <alexandre.detiste@gmail.com> | 2015-05-28 21:32:51 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2015-07-14 11:47:47 +0200 |
commit | e39c7a187c04ac4d2e3837d3845f547231354457 (patch) | |
tree | 1e6f164dffd7b14124cd6bc906ee38f6aef2bb94 /debian | |
parent | 247adfbd93391ebf663b3245a6542d69674e4d7b (diff) |
Port to python3, keep compatibility symlink for lsb_release.py
Closes: #719063
Diffstat (limited to 'debian')
-rw-r--r-- | debian/control | 9 | ||||
-rw-r--r-- | debian/lsb-release.links | 2 | ||||
-rwxr-xr-x | debian/rules | 19 |
3 files changed, 17 insertions, 13 deletions
diff --git a/debian/control b/debian/control index ba4c83a..95e76b8 100644 --- a/debian/control +++ b/debian/control @@ -6,8 +6,9 @@ Uploaders: Didier Raboud <odyx@debian.org>, Jeff Licquia <licquia@debian.org> Build-Depends: debhelper (>> 9.0), po-debconf (>= 0.5.0), dpkg-dev (>= 1.10), - python-all-dev (>= 2.6.6-6~), -X-Python-Version: >= 2.6 + python3-all-dev, + dh-python, +X-Python3-Version: >= 3.4 Standards-Version: 3.9.4 Homepage: http://www.linuxfoundation.org/collaborate/workgroups/lsb Vcs-Git: git://anonscm.debian.org/collab-maint/lsb.git @@ -47,7 +48,7 @@ Depends: lsb-release (>= ${source:Version}), psmisc, rsync, alien (>= 8.36), - ${python:Depends}, + ${python3:Depends}, ${misc:Depends}, ${depends}, lsb-base (>= ${source:Version}), @@ -317,7 +318,7 @@ Package: lsb-release Architecture: all Priority: optional Multi-Arch: foreign -Depends: ${python:Depends}, +Depends: ${python3:Depends}, ${misc:Depends} Recommends: apt Suggests: lsb diff --git a/debian/lsb-release.links b/debian/lsb-release.links new file mode 100644 index 0000000..a71099b --- /dev/null +++ b/debian/lsb-release.links @@ -0,0 +1,2 @@ +usr/share/pyshared/lsb_release.py usr/lib/python2.7/dist-packages/lsb_release.py +usr/share/pyshared/lsb_release.py usr/lib/python3/dist-packages/lsb_release.py diff --git a/debian/rules b/debian/rules index 6bc0f05..8f7d87d 100755 --- a/debian/rules +++ b/debian/rules @@ -2,11 +2,10 @@ derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes") || echo "no") -PY2VERSIONS=$(shell pyversions -vr) PY3VERSIONS=$(shell [ -x /usr/bin/py3versions ] && py3versions -vr) %: - dh $@ --with python2 + dh $@ --with python3 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) @@ -47,19 +46,21 @@ override_dh_clean: dh_clean rm -f *.py[co] rm -f debian/lsb-base.maintscript + rm -rf __pycache__ + rm -rf test/__pycache__ -override_dh_auto_test: $(PY2VERSIONS:%=test-python%) $(PY3VERSIONS:%=test-python%) - -test-python2.6: - # Tests are not backported to python2.6, sorry. +override_dh_auto_test: $(PY3VERSIONS:%=test-python%) test-python%: PATH=test/:$${PATH} PYTHONPATH=. python$* test/test_lsb_release.py -vv PYTHONPATH=. python$* test/test_initdutils.py -vv + rm -rf __pycache__ + rm -rf test/__pycache__ + rm -f test/debian_version_* -override_dh_python2: - dh_python2 - dh_python2 /usr/lib/lsb +override_dh_python3: + dh_python3 + dh_python3 /usr/lib/lsb override_dh_install: dh_install |