File: rules

package info (click to toggle)
feedparser 5.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 11,532 kB
  • ctags: 2,502
  • sloc: xml: 12,461; python: 4,256; makefile: 25
file content (38 lines) | stat: -rwxr-xr-x 1,112 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
#!/usr/bin/make -f
export DH_VERBOSE=1

%:
	dh $@ --with python2,python3

override_dh_auto_build:
	dh_auto_build
	python3 setup.py build

override_dh_auto_install:
	dh_auto_install
	python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
	cp feedparser/sgmllib3.py $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/feedparser_sgmllib3.py

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build .*egg-info

override_dh_auto_test:
	# Add back data files which were missing in upstream tarball for 5.1
	cp $(CURDIR)/debian/upstream/*.z feedparser/tests/compression
	cp $(CURDIR)/debian/upstream/*.gz feedparser/tests/compression
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd feedparser && python ./feedparsertest.py
	# FIXME: run tests for python3 too.  This requires running 2to3 over
	# feedparsertest.py also, and then running it against the already
	# converted feedparser.py, but still being able to find the test
	# directory.
else
	@echo "nocheck set, not running tests"
endif

override_dh_installdocs:
	dh_installdocs -Xtests

override_dh_installchangelogs:
	dh_installchangelogs NEWS