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 65 66
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
# set the MPLCONFIGDIR to avoid writing into non writable location
export HOME=$(CURDIR)/build
export MPLCONFIGDIR=$(CURDIR)/build
# Use agg Matplotlib backend for testing on headless machines.
export MPLBACKEND=agg
export LC_ALL=C.UTF-8
export ASTROPY_USE_SYSTEM_ALL=1
export SETUPTOOLS_SCM_PRETEND_VERSION=${DEB_VERSION_UPSTREAM}
PY3VERSION = $(shell py3versions -d -v)
# Generate PLY files
export PYBUILD_AFTER_BUILD=cd {build_dir}; python{version} -c 'import astropy.coordinates; astropy.coordinates.angle_utilities.parse_angle("0°"); import astropy.units.format; astropy.units.format.CDS.parse("m/s"); astropy.units.format.Generic.parse("m"); astropy.units.format.OGIP.parse("m/s")'
# Don't run hypothesis tests
export PYBUILD_TEST_ARGS=--astropy-header -m "not hypothesis"
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
override_dh_shlibdeps:
dh_shlibdeps
dh_numpy3
override_dh_installdocs-indep:
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python$(PY3VERSION)/dist-packages \
$(MAKE) -C docs -k html || true
dh_installdocs
override_dh_sphinxdoc-arch:
# sphinxdoc is only needed on indep and does not work here.
override_dh_installchangelogs:
dh_installchangelogs docs/changelog.rst
override_dh_auto_clean:
dh_auto_clean
rm -rf build astropy.egg-info
rm -rf astropy_helpers-*.egg
rm -rf docs/_build docs/_generated
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
ifneq ($(DEB_HOST_ARCH),mipsel)
dh_auto_test
endif
endif
override_dh_python3:
dh_python3
dh_python3-ply $$(find $(PYBUILD_DESTDIR_python3) -name '*tab.py'| grep -v test_tab.py)
override_dh_strip_nondeterminism:
dh_strip_nondeterminism -Xinvalid.dat.gz
override_dh_missing:
dh_missing --list-missing
|