File: rules

package info (click to toggle)
setuptools 78.1.1-0.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,188 kB
  • sloc: python: 65,095; ansic: 204; makefile: 108; xml: 14
file content (72 lines) | stat: -rwxr-xr-x 2,222 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/make -f

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

override_dh_auto_test:

v_dir := usr/lib/$(shell py3versions -d)/dist-packages/setuptools/_vendor

override_dh_auto_install:
	dh_auto_install

	PYTHONPATH=$(CURDIR) $(MAKE) -C docs html

	mkdir -p debian/python3-setuptools-whl/usr/share/python-wheels
	python3 setup.py bdist_wheel \
	        -d debian/python3-setuptools-whl/usr/share/python-wheels

	# dh_pypy from dh-python < 1.20150705-1 falls over requires.txt
	# and our requires.txt aren't useful
	find debian/tmp -name requires.txt -delete

	find debian/tmp -name '*.exe' | xargs -r rm -f

override_dh_install:
	dh_install
	find debian/python3-pkg-resources
	find debian/python3-setuptools
	: # move vendored modules required by pkg_resources
	set -e; \
	for py in $$(py3versions -s); do \
	  vdir=usr/lib/$$py/dist-packages/setuptools/_vendor; \
	  mkdir -p debian/python3-pkg-resources/$$vdir/jaraco; \
	  mv \
	    debian/python3-setuptools/$$vdir/packaging \
	    debian/python3-setuptools/$$vdir/packaging-*.dist-info \
	    debian/python3-setuptools/$$vdir/platformdirs \
	    debian/python3-setuptools/$$vdir/platformdirs-*.dist-info \
	    debian/python3-setuptools/$$vdir/jaraco.text-*.dist-info \
		debian/python3-pkg-resources/$$vdir/.; \
	  mv \
	    debian/python3-setuptools/$$vdir/jaraco/text \
		debian/python3-pkg-resources/$$vdir/jaraco/.; \
	done
	find debian/python3-pkg-resources
	find debian/python3-setuptools


override_dh_installchangelogs:
	dh_installchangelogs NEWS.rst

override_dh_auto_clean:
#	Dont run dh_auto_clean, dh-python now removes the egg-info dir.
#	dh_auto_clean
	rm -rf .pybuild
	rm -rf build

	rm -rf .eggs docs/build

override_dh_installdocs:
	dh_installdocs -p python3-pkg-resources \
	               docs/pkg_resources.rst
	dh_installdocs -p python3-setuptools \
	               -X pkg_resources docs/*.rst
	dh_installdocs -p python-setuptools-doc docs/build/html
	dh_installdocs --remaining-packages
	dh_link -p python-setuptools-doc \
	        /usr/share/doc/python-setuptools-doc/html \
	        /usr/share/doc/python3-setuptools/html \

#	        /usr/share/doc/python-setuptools-doc/html \
#	        /usr/share/doc/pypy-setuptools/html