File: rules

package info (click to toggle)
pygments 2.7.1%2Bdfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,844 kB
  • sloc: python: 83,170; makefile: 214; sh: 93; javascript: 87
file content (60 lines) | stat: -rwxr-xr-x 1,411 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
54
55
56
57
58
59
60
#!/usr/bin/make -f

#export DH_VERBOSE=1

PYVERS ?= $(shell py3versions -vr)
pkgdir = $(CURDIR)/debian/python$(if $(patsubst 3.%,,$(1)),,3)-pygments

clean:
	dh_testdir
	dh_testroot
	rm -rf build Pygments.egg-info doc/_build
	find . -name "*\.py[co]" -delete
	dh_clean build-indep install-stamp $(PYVERS:%=install-python%-stamp)

build: build-indep

build-arch:

build-indep:
	dh_testdir
	dh_installdirs
	PYTHONPATH=$(CURDIR):$(CURDIR)/doc make -C doc html
	python3 -m pytest -v -k 'not test_chooses_correct_lexer_for_example_files'
	touch $@

install: build install-stamp $(PYVERS:%=install-python%-stamp)

install-stamp:
	dh_installdirs
	install -m 644 external/pygments.bashcomp debian/python3-pygments/usr/share/bash-completion/completions/pygmentize
	touch $@

install-python%-stamp:
	python$* setup.py install --single-version-externally-managed \
		--root $(call pkgdir,$*) --install-layout=deb
	touch $@

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -i CHANGES
	dh_installexamples -i
	dh_installdocs -i
	dh_install -i -ppython-pygments-doc
	dh_link -i
	dh_installman -i
	dh_sphinxdoc -i -p python-pygments-doc
	dh_python3 -i --shebang=/usr/bin/python3
	dh_compress -i -X.py -X.inv
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install