Debian Codegraph @

debian-upstream/rules

raw
1 #!/usr/bin/make -f
2 #
3 # Build Debian package using https://github.com/spotify/dh-virtualenv
4 #
5 # Note that this only works after applying
6 # https://github.com/spotify/dh-virtualenv/pull/43
7 # (at least with some versions of virtualenv)
8
9 # The below targets create a clean copy of the workdir via
10 # using "sdist", else "pip" goes haywire when installing from
11 # sourcedir ".", because that includes the debian build stage,
12 # and a recursive explosion ensues when symlinks are followed.
13
14 DH_VENV_ARGS=--with python-virtualenv --setuptools --python /usr/bin/python #-v
15
16 clean:
17 test ! -d dist || rm -rf dist
18 test ! -d debian/sdist || rm -rf debian/sdist
19 dh $@ $(DH_VENV_ARGS)
20
21 build-arch:
22 /usr/bin/python setup.py sdist --formats tar
23 mkdir -p debian/sdist
24 tar -x -C debian/sdist --strip-components=1 --exclude '*.egg-info' -f dist/*.tar
25 dh $@ $(DH_VENV_ARGS) --sourcedir debian/sdist
26
27 %:
28 dh $@ $(DH_VENV_ARGS) --sourcedir debian/sdist