File: rules

package info (click to toggle)
astroquery 0.4.6%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 19,420 kB
  • sloc: xml: 56,574; python: 43,303; makefile: 145; ansic: 69
file content (53 lines) | stat: -rwxr-xr-x 2,076 bytes parent folder | download
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
#!/usr/bin/make -f

#export DH_VERBOSE=1
export PYBUILD_NAME=astroquery
export PYBUILD_TEST_PYTEST=1
export http_proxy=127.0.0.1:9
export HOME=$(shell mktemp -d)

BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)" -D html_show_copyright=0

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	# remove references to build or temporary directories in the doc
	cp astroquery/hitran/core.py hitran.old
	sed -i "s#FORMATFILE = .*#FORMATFILE = ''#" astroquery/hitran/core.py
	cp astroquery/vamdc/__init__.py vamdc.old
	sed -i "s#cache_location = .*#cache_location = ''#" astroquery/vamdc/__init__.py
	# build doc
	PYTHONPATH=. sphinx-build $(SPHINXOPTS) -N -bhtml docs/ build/html # HTML generator
	# restore original files
	mv hitran.old astroquery/hitran/core.py
	mv vamdc.old astroquery/vamdc/__init__.py

override_dh_sphinxdoc:
	dh_sphinxdoc
	rm -rf debian/python-astroquery-doc/usr/share/doc/python-astroquery-doc/html/_sources/license.rst.txt

override_dh_auto_clean:
	dh_auto_clean
	rm -f astroquery/version.py
	rm -rf api
	rm -rf .cache
	rm -rf astroquery.egg-info

override_dh_auto_install:
	dh_auto_install
	rm -rf debian/python3-astroquery/usr/astroquery.splatalogue
	# Remove files not cleaned after tests
	rm -rf debian/python3-astroquery/usr/lib/python3.*/dist-packages/J6FL25S4Q.vot
	rm -rf debian/python3-astroquery/usr/lib/python3.*/dist-packages/J6FL25S4Q.vot.fits.gz
	rm -rf debian/python3-astroquery/usr/lib/python3.*/dist-packages/J6FL25S4Q.vot.jpg
	rm -rf debian/python3-astroquery/usr/lib/python3.*/dist-packages/X0MC5101T.vot
	rm -rf debian/python3-astroquery/usr/lib/python3.*/dist-packages/filename.tar
	rm -rf debian/python3-astroquery/usr/lib/python3.*/dist-packages/tarfile_lightcurves.tar
	rm -rf debian/python3-astroquery/usr/lib/python3.*/dist-packages/w0ji0v01t_c2f.fits.gz

override_dh_fixperms:
	dh_fixperms
	chmod a-x debian/python3-astroquery/usr/lib/python3/dist-packages/astroquery/linelists/cdms/data/catdir.cat