From 7603f9afad50e132e201e6aa207660c5eac676f6 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Fri, 8 Jul 2016 19:35:51 -0400 Subject: [PATCH] Updating buildsystem, adding Python 3 support, adding pybuild support --- debian/control | 34 ++++++++++++++++++++++++++++------ debian/rules | 38 +++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/debian/control b/debian/control index 5e59688..eba293b 100644 --- a/debian/control +++ b/debian/control @@ -2,15 +2,23 @@ Source: kitchen Section: python Priority: optional Maintainer: Debian Python Modules Team -Uploaders: Simon Chopin , Nicolas Dandrimont +Uploaders: Simon Chopin , Nicolas Dandrimont , Sergio Durigan Junior Build-Depends: debhelper (>= 9), + dh-python, python-all (>= 2.6.6-3~), - locales (>= 0), + python-setuptools, + python3-all, + python3-setuptools, python-nose, - python-setuptools -Standards-Version: 3.9.4 -X-Python-Version: >= 2.3 + python3-nose, + python-sphinx, + 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/ Vcs-Git: https://anonscm.debian.org/git/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 Architecture: all 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 code that the author originally carried around from project to project to ease the development. diff --git a/debian/rules b/debian/rules index 059e573..faab9f0 100755 --- a/debian/rules +++ b/debian/rules @@ -1,23 +1,23 @@ #!/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 -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 + dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild +# 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