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
|
#!/usr/bin/make -f
#
# Build Debian package using https://github.com/spotify/dh-virtualenv
#
# Note that this only works after applying
# https://github.com/spotify/dh-virtualenv/pull/43
# (at least with some versions of virtualenv)
# The below targets create a clean copy of the workdir via
# using "sdist", else "pip" goes haywire when installing from
# sourcedir ".", because that includes the debian build stage,
# and a recursive explosion ensues when symlinks are followed.
DH_VENV_ARGS=--with python-virtualenv --setuptools --python /usr/bin/python #-v
clean:
test ! -d dist || rm -rf dist
test ! -d debian/sdist || rm -rf debian/sdist
dh $@ $(DH_VENV_ARGS)
build-arch:
/usr/bin/python setup.py sdist --formats tar
mkdir -p debian/sdist
tar -x -C debian/sdist --strip-components=1 --exclude '*.egg-info' -f dist/*.tar
dh $@ $(DH_VENV_ARGS) --sourcedir debian/sdist
%:
dh $@ $(DH_VENV_ARGS) --sourcedir debian/sdist
|