From 4b96517f5509ed89c51515358880096e9470c1c1 Mon Sep 17 00:00:00 2001 From: Tobias Megies Date: Fri, 20 Mar 2015 12:59:18 +0100 Subject: [PATCH] debug py3 man page building --- .../_copy_lib_extensions_to_source_tree.sh | 9 ++++++ debian/pybuild/rules | 28 ++++++++++--------- 2 files changed, 24 insertions(+), 13 deletions(-) create mode 100644 debian/pybuild/_copy_lib_extensions_to_source_tree.sh diff --git a/debian/pybuild/_copy_lib_extensions_to_source_tree.sh b/debian/pybuild/_copy_lib_extensions_to_source_tree.sh new file mode 100644 index 00000000000..bb28ef5dc7e --- /dev/null +++ b/debian/pybuild/_copy_lib_extensions_to_source_tree.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +for FILE in `ls debian/tmp/usr/lib/python3*/*-packages/obspy/lib/lib*` +do + # copy to original source directory, otherwise Help2Man exits with error + # because command line script can't be executed (it is tried to be executed + # in source directory it seems) + cp $FILE obspy/lib/ +done diff --git a/debian/pybuild/rules b/debian/pybuild/rules index c97f5b290d2..f20fc7ddbda 100755 --- a/debian/pybuild/rules +++ b/debian/pybuild/rules @@ -23,21 +23,9 @@ override_dh_auto_install: dh_numpy dh_numpy3 set -ex; for python in $(shell py3versions -r); do \ + echo $$python; \ $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \ done; - python3 setup.py build_man - ln build/man/* debian/ - ls -1 build/man/obspy-* | sed 's#.*/#./debian/#' > debian/python-obspy.manpages - ls -1 build/man/obspy3-* | sed 's#.*/#./debian/#' > debian/python3-obspy.manpages - -override_dh_install: - # data files get separated into /usr/share for both python2/3 to use - sh -x debian/_dh_install_data_files.sh - # files for normal packages - ## bin - dh_install -p python3-obspy "debian/tmp/usr/bin/obspy3-*" - dh_install -p python-obspy "debian/tmp/usr/bin/obspy-*" - ## lib ########## lib naming hack start # python-setuptools on Debian/Ubuntu is patched to include multiarch information in lib filenames # in the deb build log e.g.: @@ -54,6 +42,20 @@ override_dh_install: # - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733128 sh -x debian/_rename_lib_extensions.sh ########## lib naming hack end + sh -x debian/_copy_lib_extensions_to_source_tree.sh + python3 setup.py build_man + ln build/man/* debian/ + ls -1 build/man/obspy-* | sed 's#.*/#./debian/#' > debian/python-obspy.manpages + ls -1 build/man/obspy3-* | sed 's#.*/#./debian/#' > debian/python3-obspy.manpages + +override_dh_install: + # data files get separated into /usr/share for both python2/3 to use + sh -x debian/_dh_install_data_files.sh + # files for normal packages + ## bin + dh_install -p python3-obspy "debian/tmp/usr/bin/obspy3-*" + dh_install -p python-obspy "debian/tmp/usr/bin/obspy-*" + ## lib dh_install -p python3-obspy -X"tests/data" -X"tests/images" "debian/tmp/usr/lib/python3*/*-packages/*" dh_install -p python-obspy -X"tests/data" -X"tests/images" "debian/tmp/usr/lib/python2*/*-packages/*" # Continue with regular dh_install