On Thu, 15 Jun 2017 20:17:41 +0800 Aron Xu <happyaron...@gmail.com> wrote:
> Hi,
>
> Thanks for the report, we don't want to build for only one version of
> Python 3 of course, will have a look later.
>

This patch should build modules for all python3 versions.
can you reivew it?

>
> Regards,
> Aron Xu
>
>
diff -ur libxml2-2.9.4+dfsg1/debian/control xxx/debian/control
--- libxml2-2.9.4+dfsg1/debian/control  2017-01-14 14:07:44.000000000 +0000
+++ xxx/debian/control  2017-06-19 22:56:42.447698818 +0000
@@ -5,6 +5,7 @@
 Uploaders: Aron Xu <a...@debian.org>, YunQiang Su <wzss...@gmail.com>
 Standards-Version: 3.9.8
 Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, pkg-config,
+ dh-python,
  libpython-all-dev, libpython-all-dbg,
  python-all-dev:any (>= 2.7.5-5~), python-all-dbg:any,
  libpython3-all-dev, libpython3-all-dbg,
diff -ur libxml2-2.9.4+dfsg1/debian/rules xxx/debian/rules
--- libxml2-2.9.4+dfsg1/debian/rules    2017-01-14 14:07:44.000000000 +0000
+++ xxx/debian/rules    2017-06-19 23:10:31.299451679 +0000
@@ -43,9 +43,10 @@
 
 doconfigure-%: debian/autoreconf.after
        dh_auto_configure --parallel --builddirectory=builddir/$(*) -- 
$(CONFIGURE_FLAGS)
+       touch $@
 
 doconfigure-main: CONFIGURE_FLAGS += --without-python --with-icu
-doconfigure-python%: CONFIGURE_FLAGS += --with-python=/usr/bin/$(*)
+doconfigure-python%: CONFIGURE_FLAGS += --with-python=/usr/bin/$(subst 
-dbg,,$(*)) --with-python-install-dir=/usr/lib/$(subst -dbg,,$(*))/dist-packages
 #doconfigure-udeb: CONFIGURE_FLAGS += --without-history --with-minimum 
--with-tree --with-output
 doconfigure-udeb: CONFIGURE_FLAGS += --without-history --with-tree 
--with-output --without-python --without-icu
 
@@ -54,7 +55,7 @@
        $(if $(filter $(BUILD_DIR),builddir/$(*)),,[ -d $(BUILD_DIR) ] || mv 
builddir/$(*)/python $(BUILD_DIR))
        dh_auto_build --parallel --builddirectory=$(BUILD_DIR) -- $(BUILD_FLAGS)
 
-dobuild-python%: BUILD_DIR=builddir/main/$(*)
+dobuild-python%: BUILD_DIR=builddir/$(*)
 dobuild-python%: BUILD_FLAGS=libxml2mod_la_LIBADD='$$(mylibs)' \
     PYTHON_INCLUDES='$(shell $(DEB_HOST_GNU_TYPE)-$(*)-config --includes)' \
     PYTHON_LIBS='$(shell $(DEB_HOST_GNU_TYPE)-$(*)-config --ldflags)'
@@ -70,6 +71,7 @@
 
 override_dh_auto_clean:
        rm -rf builddir debian/tmp-dbg debian/tmp-udeb
+       rm -f doconfigure-*
        dh_auto_clean
 
 override_dh_auto_install-arch: $(TARGETS:%=doinstall-%)
@@ -100,11 +102,11 @@
                doc/tutorial debian/tmp/usr/share/doc/libxml2-doc
 
 doinstall-python%-dbg:
-       $(MAKE) -C builddir/main/python$(*)-dbg 
DESTDIR=$(CURDIR)/debian/tmp-dbg install-pythonLTLIBRARIES
+       $(MAKE) -C builddir/python$(*)-dbg/python 
DESTDIR=$(CURDIR)/debian/tmp-dbg install-pythonLTLIBRARIES
        prename -vf 's/(?<!_d)\.so$$/_d.so/' 
debian/tmp-dbg/usr/lib/python$(*)/*-packages/*.so
 
 doinstall-python%:
-       dh_auto_install --builddirectory=builddir/main/python$(*)
+       dh_auto_install --builddirectory=builddir/python$(*)
 
 doinstall-udeb:
        dh_auto_install --builddirectory=builddir/udeb --destdir=debian/tmp-udeb
@@ -137,18 +139,6 @@
        dh_strip -ppython-libxml2 --dbg-package=python-libxml2-dbg
        dh_strip -ppython3-libxml2 --dbg-package=python3-libxml2-dbg
 endif
-       $(foreach python, $(filter-out $(PYVER), $(PYVERS)),\
-               cd $(CURDIR)/debian/python-libxml2/usr/lib/pyshared; \
-               if diff $(python)/libxml2mod.so $(PYVER)/libxml2mod.so > 
/dev/null 2>&1; then \
-                       rm -f $(python)/libxml2mod.so; \
-                       ln -s ../$(PYVER)/libxml2mod.so 
$(python)/libxml2mod.so; \
-               fi;)
-       $(foreach python3, $(filter-out $(PY3VER), $(PY3VERS)),\
-               cd $(CURDIR)/debian/python3-libxml2/usr/lib/pyshared; \
-               if diff $(python3)/libxml2mod.so $(PYVER)/libxml2mod.so > 
/dev/null 2>&1; then \
-                       rm -f $(python3)/libxml2mod.so; \
-                       ln -s ../$(PY3VER)/libxml2mod.so 
$(python3)/libxml2mod.so; \
-               fi;)
        dh_strip -Npython-libxml2-dbg -Npython3-libxml2-dbg
 
 override_dh_makeshlibs:
@@ -163,3 +153,4 @@
 else
        dh $@ --parallel --with autoreconf,python2,python3
 endif

Reply via email to