Updating buildsystem, adding Python 3 support, adding pybuild support

This commit is contained in:
Sergio Durigan Junior 2016-07-08 19:35:51 -04:00
parent b08ac4f681
commit 7603f9afad
2 changed files with 47 additions and 25 deletions

34
debian/control vendored
View file

@ -2,15 +2,23 @@ Source: kitchen
Section: python Section: python
Priority: optional Priority: optional
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Uploaders: Simon Chopin <chopin.simon@gmail.com>, Nicolas Dandrimont <olasd@debian.org> Uploaders: Simon Chopin <chopin.simon@gmail.com>, Nicolas Dandrimont <olasd@debian.org>, Sergio Durigan Junior <sergiodj@sergiodj.net>
Build-Depends: Build-Depends:
debhelper (>= 9), debhelper (>= 9),
dh-python,
python-all (>= 2.6.6-3~), python-all (>= 2.6.6-3~),
locales (>= 0), python-setuptools,
python3-all,
python3-setuptools,
python-nose, python-nose,
python-setuptools python3-nose,
Standards-Version: 3.9.4 python-sphinx,
X-Python-Version: >= 2.3 python-coverage,
python3-coverage,
locales-all,
Standards-Version: 3.9.8
X-Python-Version: >= 2.6
X-Python3-Version: >= 3.4
Homepage: https://fedorahosted.org/kitchen/ Homepage: https://fedorahosted.org/kitchen/
Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/kitchen.git Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/kitchen.git
Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/kitchen.git Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/kitchen.git
@ -18,7 +26,21 @@ Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/kitchen.git
Package: python-kitchen Package: python-kitchen
Architecture: all Architecture: all
Depends: ${misc:Depends}, ${python:Depends} Depends: ${misc:Depends}, ${python:Depends}
Description: Python library of containers, text and i18n helpers Description: Python library of containers, text and i18n helpers (Python 2)
The kitchen Python package aims at gathering in one place all the snippets of
code that the author originally carried around from project to project to ease
the development.
.
A non-exhaustive list of the features provided by kitchen:
* helpers for text and specifically unicode handling i18n support
* a dictionary that treats unicode and str strings as different values
* An helper function to change any non-list value into a single-element list
* Tools to help deal with PEP386 version format
Package: python3-kitchen
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}
Description: Python library of containers, text and i18n helpers (Python 3)
The kitchen Python package aims at gathering in one place all the snippets of The kitchen Python package aims at gathering in one place all the snippets of
code that the author originally carried around from project to project to ease code that the author originally carried around from project to project to ease
the development. the development.

38
debian/rules vendored
View file

@ -1,23 +1,23 @@
#!/usr/bin/make -f #!/usr/bin/make -f
UPSTREAM= $(shell dpkg-parsechangelog | egrep '^Version: ' | sed -r 's/Version: (.*)-[0-9a-zA-Z~+.]+/\1/')
export PYBUILD_NAME = kitchen
export PYBUILD_BEFORE_TEST_python2 = cp -a {dir}/kitchen2/tests {build_dir}/tests
export PYBUILD_BEFORE_TEST_python3 = cp -a {dir}/kitchen3/tests {build_dir}/tests
export PYBUILD_AFTER_TEST = rm -rf {build_dir}/tests
export LANGUAGE =
%: %:
dh $@ --with python2 dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
override_dh_install:
dh_install
for py in $(shell pyversions -r); do \
rm -f debian/python-kitchen/usr/lib/$$py/dist-packages/kitchen-$(UPSTREAM).egg-info/SOURCES.txt; \
done
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
mkdir -p debian/tmp/locales
localedef -f UTF-8 -i en_US ./debian/tmp/locales/en_US.UTF-8/
localedef -f UTF-8 -i pt_BR ./debian/tmp/locales/pt_BR.UTF-8/
localedef -f ISO-8859-1 -i pt_BR ./debian/tmp/locales/pt_BR.ISO-8859-1/
set -e; \
for py in $(shell pyversions -r); do \
LOCPATH=$(CURDIR)/debian/tmp/locales/ $$py /usr/bin/nosetests tests; \
done
endif
# override_dh_auto_test:
# ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
# mkdir -p debian/tmp/locales
# localedef -f UTF-8 -i en_US ./debian/tmp/locales/en_US.UTF-8/
# localedef -f UTF-8 -i pt_BR ./debian/tmp/locales/pt_BR.UTF-8/
# localedef -f ISO-8859-1 -i pt_BR ./debian/tmp/locales/pt_BR.ISO-8859-1/
# LOCPATH=$(CURDIR)/debian/tmp/locales dh_auto_test
# set -e; \
# for py in $(shell pyversions -r); do \
# LOCPATH=$(CURDIR)/debian/tmp/locales/ $$py /usr/bin/nosetests tests; \
# done
# endif