[pkg] Use setuptools
Move sources to a 'rql' subdirectory, drop the NO_SETUPTOOLS code path
(essentially rewriting all of setup.py). This avoids a conflict between
our parser.py and the stdlib when running setup.py. Closes #278637.
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#
# adapted by Logilab for automatic generation by debianize
# (part of the devtools project, http://www.logilab.org/projects/devtools)
#
# Copyright (c) 2003-2008 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
build: build-stamp
build-stamp:
dh_testdir
for PYTHON in `pyversions -r`; do \
RQL_FORCE_GECODE=1 NO_SETUPTOOLS=1 $${PYTHON} setup.py build || exit; done
$(MAKE) -C doc html || true
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
rm -rf build
find . -name "*.pyc" | xargs rm -f
rm -f changelog.gz
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
for PYTHON in `pyversions -r`; do \
NO_SETUPTOOLS=1 $${PYTHON} setup.py install --no-compile --prefix=debian/python-rql/usr/ || exit; \
done
# remove test directory (installed in in the doc directory)
rm -rf debian/python-rql/usr/lib/python*/site-packages/rql/test
# install tests
cd test && find . -type f -not \( -name '*.pyc' \) -exec install -D --mode=644 {} ../debian/python-rql/usr/share/doc/python-rql/test/{} \;
# Build architecture-independent files here.
binary-indep:
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_install -a
dh_pysupport -a
gzip -9 -c ChangeLog > changelog.gz
dh_installchangelogs -a
dh_installexamples -a
dh_installdocs -a README TODO changelog.gz
dh_installman -a
dh_link -a
# .js, .txt and .json are coming from sphinx build
dh_compress -a -X.py -X.ini -X.xml -Xtest/ -X.js -X.txt -X.json
dh_fixperms -a
dh_strip
dh_shlibdeps -a
dh_installdeb -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary binary-indep binary-arch