File: rules

package info (click to toggle)
libpysal 4.12.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,704 kB
  • sloc: python: 25,817; xml: 548; makefile: 48
file content (50 lines) | stat: -rwxr-xr-x 1,955 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export HOME = $(shell pwd)
export PYBUILD_NAME=libpysal
export PYBUILD_TEST_CUSTOM=1

SRC_DIR="usr/lib/python3/dist-packages/libpysal/examples/"
DEST_DIR="usr/share/doc/python3-libpysal/examples"


%:
	dh $@ --sphinxdoc  --buildsystem=pybuild

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	 pytest-3 -v --ignore=libpysal/graph/tests/ \
        --ignore=libpysal/weights/tests/test_contiguity.py \
        --ignore=libpysal/cg/tests/test_geoJSON.py \
        --ignore=libpysal/weights/tests/test_util.py \
        --ignore=libpysal/examples/tests/test_available.py \
        --ignore=libpysal/io/iohandlers/tests/test_db.py
	dh_auto_test
endif

# Build sphinx HTML documentation
override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. https_proxy='https://127.0.0.1:9/' no_proxy=localhost python3 -m sphinx -N -d debian/doctrees  -bhtml docs/ debian/html


override_dh_link:
	dh_link
# Fixe privacy-breach-generic
	find debian/python-libpysal-doc/  -name '*.html' -exec sed -i 's/.*https:.*//g' {} \;

#fixe package-contains-documentation-outside-usr-share-doc
	rm -rf debian/python3-libpysal/usr/lib/python3/dist-packages/lattice.dbf
	rm -rf debian/python3-libpysal/usr/lib/python3/dist-packages/libpysal/.gitignore
	rm -rf debian/python3-libpysal/usr/share/doc/python3-libpysal/examples/__pycache__
	rm -rf debian/python3-libpysal/usr/lib/python3/dist-packages/core
	rm -rf debian/python-libpysal-doc/usr/share/doc/python-libpysal-doc/html/_static/bootstrap-3.4.1/fonts/
	rm -rf debian/python-libpysal-doc/usr/share/doc/python-libpysal-doc/html/_static/bootswatch-3.4.1/fonts/
	find debian/python-libpysal-doc/usr/share/doc -name '*.js' -delete
	find debian/python-libpysal-doc/usr/share/doc -type d -empty -delete
#Fixe duplicate-files
	jdupes -rl debian/python-libpysal-doc/usr
	jdupes -rl debian/python3-libpysal/usr

override_dh_installexamples:
	dh_installexamples libpysal/examples/*