Skip to content

Commit

Permalink
debug py3 man page building
Browse files Browse the repository at this point in the history
  • Loading branch information
megies committed Mar 20, 2015
1 parent 778d8c5 commit 4b96517
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
9 changes: 9 additions & 0 deletions debian/pybuild/_copy_lib_extensions_to_source_tree.sh
Original file line number Diff line number Diff line change
@@ -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
28 changes: 15 additions & 13 deletions debian/pybuild/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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.:
Expand All @@ -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
Expand Down

0 comments on commit 4b96517

Please sign in to comment.