File: rules

package info (click to toggle)
pyflakes 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 464 kB
  • sloc: python: 5,970; makefile: 15; sh: 7
file content (27 lines) | stat: -rwxr-xr-x 1,038 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
#!/usr/bin/make -f

export PYBUILD_NAME=pyflakes

# Some tests require that the bin/pyflakes script be available one directory
# up relative to the package directory.  When the tests are run during the
# build, this won't be the case, because pybuild cd's to a directory that
# doesn't have this installed.  Create the necessary paths, run the tests,
# then delete the paths.
export PYBUILD_BEFORE_TEST=mkdir -p {build_dir}/bin && ln -s $(CURDIR)/bin/pyflakes {build_dir}/bin/pyflakes
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/bin


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

override_dh_installchangelogs:
	dh_installchangelogs NEWS.rst

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/pyflakes/usr/bin
	mkdir -p debian/pyflakes3/usr/bin
	mv debian/python-pyflakes/usr/bin/pyflakes debian/pyflakes/usr/bin/pyflakes
	mv debian/python3-pyflakes/usr/bin/pyflakes debian/pyflakes3/usr/bin/pyflakes3
	sed -i '1s/3.*/2.7/' ./debian/pyflakes/usr/bin/pyflakes
	sed -i '1s/3.*/3/' ./debian/pyflakes3/usr/bin/pyflakes3