1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
include /usr/share/dpkg/pkg-info.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
export PYBUILD_NAME=bumps
# skip (unused?) files not needed with Python 3.12
export PYBUILD_TEST_ARGS=--ignore bumps/openmp_ext.py
export libdir=/usr/lib/bumps/
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
execute_after_dh_auto_clean:
rm -rf .mplconfig doc/_build doc/api doc/dream doc/tutorial api dream .cache
rm -f bumps/dream/_compiled.so
rm -f bumps/_version.py
execute_before_dh_auto_configure:
echo "__version__ = '$(DEB_UPSTREAM_VERSION)'" > bumps/_version.py
execute_after_dh_install:
find debian/python3-bumps/usr -name __pycache__ -exec rm -rf {} +
rm -f debian/python3-bumps/usr/lib/python3*/dist-packages/.coverage
rm -f debian/python3-bumps/usr/lib/python3*/dist-packages/bumps/webview/client/.npmignore
execute_after_dh_auto_build-indep:
PYTHONPATH=`pybuild --print build_dir | awk '{print $$3}'` http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml doc/ build/html # HTML generator
PYTHONPATH=`pybuild --print build_dir | awk '{print $$3}'` http_proxy='127.0.0.1:9' python3 -m sphinx -N -btexinfo doc/ build/texinfo # texinfo generator
execute_after_dh_auto_build-arch:
(cd bumps/dream && $(CC) compiled.c \
$(shell dpkg-buildflags --get CPPFLAGS) \
$(shell dpkg-buildflags --get CFLAGS) \
$(shell dpkg-buildflags --get LDFLAGS) \
-fopenmp -shared -lm -o _compiled.so -fPIC)
for pybuilddir in `pybuild --print build_dir | awk '{print $$3}'`; do \
cp bumps/dream/_compiled.so $$pybuilddir/bumps/dream; \
done
# bumps/dream:_compiled.so is hardwired into compiled.py, so don't rename
override_dh_python3:
dh_python3 --no-ext-rename
execute_after_dh_auto_install-arch:
rm debian/python*-bumps/usr/lib/python*/*packages/bumps/dream/*.so
cp bumps/dream/_compiled.so \
debian/bumps-private-libs/usr/lib/bumps/random123_compiled.so
execute_before_dh_installinfo-indep:
cd build/texinfo; \
makeinfo bumps.texi
sed "s|src=\"bumps-figures/|src=\"/usr/share/doc/python-bumps-doc/html/_images/|" -i build/texinfo/bumps.info-1
execute_after_dh_installexamples-indep:
cp -r bumps/mystic/examples debian/python-bumps-doc/usr/share/doc/python-bumps-doc/examples/mystic_examples
cp -r doc/examples debian/python-bumps-doc/usr/share/doc/python-bumps-doc/examples/doc_examples
|