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 64
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
export DH_VERBOSE = 1
export PYBUILD_NAME=mdtraj
export PYBUILD_TEST_ARGS=-k 'not (mdconvert or pi_stacking.ipynb or nmr.ipynb or test_image_molecules) and not (test_3 or test_pdb_from_url or test_1vii_url_and_gz)'
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@ --with sphinxdoc --buildsystem=pybuild
execute_after_dh_auto_clean:
for f in mdtraj/formats/binpos/binpos.c \
mdtraj/formats/dcd/dcd.c \
mdtraj/formats/dtr/dtr.cpp \
mdtraj/formats/tng/tng.c \
mdtraj/formats/xtc/trr.c \
mdtraj/formats/xtc/xtc.c \
mdtraj/geometry/drid.cpp \
mdtraj/geometry/neighborlist.cpp \
mdtraj/geometry/neighbors.cpp \
mdtraj/geometry/src/_geometry.cpp \
mdtraj/rmsd/_lprmsd.cpp \
mdtraj/rmsd/_rmsd.cpp \
mdtraj/version.py; \
do rm -f $$f; done
rm -rf mdtraj/core/lib
rm -rf docs/api/generated
rm -rf __pycache__ .pybuild
find . -name "lib*.a" -delete
execute_after_dh_auto_install-indep: export http_proxy=127.0.0.1:9
execute_after_dh_auto_install-indep: export https_proxy=127.0.0.1:9
execute_after_dh_auto_install-indep:
cp -a $(CURDIR)/examples $(CURDIR)/examples.orig
mkdir -p $(CURDIR)/build/html/examples/iterload
ln -s $(CURDIR)/examples/data $(CURDIR)/build/html/examples/iterload/data
sed "s|http://www.rcsb.org/pdb/files|$(CURDIR)/debian/external|g" -i $(CURDIR)/examples/*.ipynb
PYTHONPATH=$(shell pybuild --pyver `py3versions --default -v` --print build_dir | awk '{print $$3}' ) \
MPLCONFIGDIR=$(CURDIR)/build/matplotlib \
make -C docs BUILDDIR=$(CURDIR)/build html
for img in `find $(CURDIR)/build/html/examples -name *.png`; do \
mv $$img $(CURDIR)/build/html/examples; \
done
sed "s|$(CURDIR)/build/html/examples/|./|g; s|.ipynb|.ipynb.gz|g" -i $(CURDIR)/build/html/examples/*.html
sed "s|$(CURDIR)/debian/external|http://www.rcsb.org/pdb/files|g" -i $(CURDIR)/build/html/examples/*.html
rm $(CURDIR)/build/html/examples/iterload/data
rm -rf $(CURDIR)/examples
mv $(CURDIR)/examples.orig $(CURDIR)/examples
execute_after_dh_python3:
# setup.py builds the static lib libtheobald.a for each python version
# but dh_python3 can't tell the difference between the different builds,
# since py3.11 compiles libtheobald.o with -fwrapv, where py3.12 uses -fno-strict-overflow
# So clean up manually (assume the binary difference is not an issue)
rm -f debian/python3-$(PYBUILD_NAME)/usr/lib/python3.*/dist-packages/mdtraj/core/lib/libtheobald.a
for d in debian/python3-$(PYBUILD_NAME)/usr/lib/python3.*/dist-packages/mdtraj/core/lib; do if [-d $$d]; then rmdir -p --ignore-fail-on-non-empty $$d; fi; done
override_dh_sphinxdoc-indep:
dh_sphinxdoc -i
sed "s|src=\"https://img.shields.io/badge/DOI-10.1016%2Fj.bpj.2015.08.015-blue.svg\"|src=\"_static/doi-10.1016_j.bpj.2015.08.015-blue.svg\"|g" -i debian/python-mdtraj-doc/usr/share/doc/python-mdtraj-doc/html/index.html
|