Package: python3-libhfst Version: 3.8.2~r4145-1 Severity: important Tags: patch
Currently the package only builds support for the default python3 version. As a result, once the default version switches from python3 3.4 to 3.5, it will be unusable until it can be rebuilt. The best practice (as described in the Debian Python policy) is to build for all supported versions. Then whichever is default, the package still works. Additionally, this package doesn't use the standard Python helper, dh-python, to generate proper dependencies. Due to that, it would not be detected as needing rebuild for the transition. Please see the attached patch (formatted as an NMU because that's what devscripts handed me, but I have no near term plans to NMU). This makes the package more generally conform to Python policy. Scott K
diff -Nru hfst-3.8.2~r4145/debian/changelog hfst-3.8.2~r4145/debian/changelog --- hfst-3.8.2~r4145/debian/changelog 2015-07-22 22:46:56.000000000 +0000 +++ hfst-3.8.2~r4145/debian/changelog 2015-12-30 19:03:40.000000000 +0000 @@ -1,3 +1,11 @@ +hfst (3.8.2~r4145-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Update package to generate appropriate dependencies for python bindings + as well as building for all supported python3 versions + + -- Scott Kitterman <sc...@kitterman.com> Wed, 30 Dec 2015 19:02:29 +0000 + hfst (3.8.2~r4145-1) unstable; urgency=low [ Tino Didriksen ] diff -Nru hfst-3.8.2~r4145/debian/control hfst-3.8.2~r4145/debian/control --- hfst-3.8.2~r4145/debian/control 2015-07-22 22:47:24.000000000 +0000 +++ hfst-3.8.2~r4145/debian/control 2015-12-30 19:05:08.000000000 +0000 @@ -15,10 +15,9 @@ libicu-dev, libreadline-dev, libtool, - python, + dh-python, python-dev, - python3, - python3-dev, + python3-all-dev, swig, zlib1g-dev Standards-Version: 3.9.6 @@ -29,7 +28,7 @@ Package: hfst Architecture: any Depends: libhfst40 (= ${binary:Version}), - python, + ${python:Depends}, ${misc:Depends}, ${shlibs:Depends} Description: Helsinki Finite-State Transducer Technology @@ -68,7 +67,7 @@ Architecture: any Section: python Depends: libhfst40 (= ${binary:Version}), - python, + ${python:Depends}, ${misc:Depends}, ${shlibs:Depends} Description: Helsinki Finite-State Transducer Technology (Python2 module) @@ -82,7 +81,7 @@ Architecture: any Section: python Depends: libhfst40 (= ${binary:Version}), - python3, + ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends} Description: Helsinki Finite-State Transducer Technology (Python3 module) diff -Nru hfst-3.8.2~r4145/debian/rules hfst-3.8.2~r4145/debian/rules --- hfst-3.8.2~r4145/debian/rules 2015-07-05 12:29:54.000000000 +0000 +++ hfst-3.8.2~r4145/debian/rules 2015-12-30 19:01:47.000000000 +0000 @@ -7,12 +7,13 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif +build3vers := $(shell py3versions -sv) # This has to be exported to make some magic below work. export DH_OPTIONS %: - dh $@ --parallel --with autoreconf + dh $@ --parallel --with autoreconf,python2,python3 override_dh_auto_configure: dh_auto_configure -- --disable-static --without-foma --with-unicode-handler=ICU --enable-all-tools @@ -20,13 +21,19 @@ override_dh_auto_build: ./scripts/generate-cc-files.sh $(MAKE) -j$(NUMJOBS) || $(MAKE) -j$(NUMJOBS) || $(MAKE) - cd $(CURDIR)/swig && python setup.py build_ext && python3 setup.py build_ext && strip --strip-unneeded build/*/*.so + cd $(CURDIR)/swig && python setup.py build_ext + set -e && for i in $(build3vers); do \ + cd $(CURDIR)/swig && python$$i setup.py build_ext && strip --strip-unneeded build/*/*.so; \ + done override_dh_auto_test: # Skip, as it breaks in various unpredictable ways override_dh_auto_install: dh_auto_install - cd $(CURDIR)/swig && python setup.py install --no-compile --prefix /usr --install-layout deb --root $(CURDIR)/debian/tmp && python3 setup.py install --no-compile --prefix /usr --install-layout deb --root $(CURDIR)/debian/tmp + cd $(CURDIR)/swig && python setup.py install --no-compile --prefix /usr --install-layout deb --root $(CURDIR)/debian/tmp + set -e && for i in $(build3vers); do \ + cd $(CURDIR)/swig && python$$i setup.py install --no-compile --prefix /usr --install-layout deb --root $(CURDIR)/debian/tmp; \ + done find $(CURDIR) -type f -name '*.pyc' -exec rm -f '{}' \; find $(CURDIR) -type f -name '*.pyo' -exec rm -f '{}' \;
-- debian-science-maintainers mailing list debian-science-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers