diff options
author | Peter Pentchev <roam@debian.org> | 2019-01-13 00:21:26 +0200 |
---|---|---|
committer | Peter Pentchev <roam@debian.org> | 2019-01-13 00:21:26 +0200 |
commit | deb91eeb8296816432b10308a264f935cd6c71d6 (patch) | |
tree | b47aa482b120ec44ed091b8669935a0d18858030 | |
parent | 3242b62d59511cf1336b1b92f6a6520403bdcf00 (diff) |
Build the Python 2.x and Python 3.x modules.
-rw-r--r-- | debian/control | 61 | ||||
-rw-r--r-- | debian/python-confget.install | 1 | ||||
-rw-r--r-- | debian/python3-confget.install | 1 | ||||
-rwxr-xr-x | debian/rules | 23 |
4 files changed, 84 insertions, 2 deletions
diff --git a/debian/control b/debian/control index 6c5d844..bb965c2 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,20 @@ Source: confget Section: text Priority: optional Maintainer: Peter Pentchev <roam@debian.org> -Build-Depends: debhelper-compat (= 12), libpcre3-dev +Build-Depends: + debhelper-compat (= 12), + dh-python, + libpcre3-dev, + python-all, + python-ddt, + python-pytest, + python-six, + python-setuptools, + python3-all, + python3-ddt, + python3-pytest, + python3-six, + python3-setuptools, Standards-Version: 4.3.0 Homepage: https://devel.ringlet.net/textproc/confget/ Vcs-Git: https://gitlab.com/confget/confget.git -b debian @@ -25,3 +38,49 @@ Description: read variables from INI-style configuration files check if a variable is present in the file at all. It has a "shell-quoting" output mode that quotes the variable values in a way suitable for passing them directly to a Bourne-style shell. + +Package: python-confget +Section: python +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, ${python:Depends} +Recommends: ${python:Recommends} +Suggests: ${python:Suggests} +Provides: ${python:Provides} +Description: read variables from INI-style configuration files - Python 2.x library + The confget utility examines a INI-style configuration file and retrieves + the value of the specified variables from the specified section. + Its intended use is to let shell scripts use the same INI-style + configuration files as other programs, to avoid duplication of data. + . + The confget utility may retrieve the values of one or more variables, + list all the variables in a specified section, list only those whose names + or values match a specified pattern (shell glob or regular expression), or + check if a variable is present in the file at all. It has a "shell-quoting" + output mode that quotes the variable values in a way suitable for passing + them directly to a Bourne-style shell. + . + This package contains the Python 2.x library. + +Package: python3-confget +Section: python +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, ${python3:Depends} +Recommends: ${python3:Recommends} +Suggests: ${python3:Suggests} +Provides: ${python3:Provides} +Description: read variables from INI-style configuration files - Python 3.x library + The confget utility examines a INI-style configuration file and retrieves + the value of the specified variables from the specified section. + Its intended use is to let shell scripts use the same INI-style + configuration files as other programs, to avoid duplication of data. + . + The confget utility may retrieve the values of one or more variables, + list all the variables in a specified section, list only those whose names + or values match a specified pattern (shell glob or regular expression), or + check if a variable is present in the file at all. It has a "shell-quoting" + output mode that quotes the variable values in a way suitable for passing + them directly to a Bourne-style shell. + . + This package contains the Python 3.x library. diff --git a/debian/python-confget.install b/debian/python-confget.install new file mode 100644 index 0000000..b2cc136 --- /dev/null +++ b/debian/python-confget.install @@ -0,0 +1 @@ +usr/lib/python2* diff --git a/debian/python3-confget.install b/debian/python3-confget.install new file mode 100644 index 0000000..4606faa --- /dev/null +++ b/debian/python3-confget.install @@ -0,0 +1 @@ +usr/lib/python3* diff --git a/debian/rules b/debian/rules index 23ceb9c..ea45649 100755 --- a/debian/rules +++ b/debian/rules @@ -24,10 +24,18 @@ else DEB_NODOC=1 endif +D= ${CURDIR}/debian +DTMP= $D/tmp +PY= ${CURDIR}/python +TESTD= ${CURDIR}/t + override_dh_auto_build: dh_auto_build -- LFS_CPPFLAGS= LFS_LDFLAGS= + dh_auto_build -D '${PY}' --buildsystem pybuild override_dh_auto_install: + dh_auto_install -D '${PY}' --buildsystem pybuild + rm -f -- '${DTMP}/usr/bin/confget' ifeq (${DEB_NODOC},1) mv -f Makefile Makefile.bak sed -e 's/^install:.*/install: all install-bin/' Makefile.bak > Makefile @@ -41,9 +49,22 @@ ifeq (${DEB_NODOC},1) mv -f Makefile.bak Makefile endif +override_dh_auto_test: + dh_auto_test + set -e; for pyver in $$(pyversions -i -v) $$(py3versions -i -v); do \ + echo "=============== Testing Python $$pyver"; \ + env PYTHONPATH='${PY}' CONFGET="python$$pyver -m confget" TESTDIR='${TESTD}' MANPAGE='${CURDIR}/confget.1' prove '${TESTD}'; \ + done + env TESTDIR='${TESTD}' dh_auto_test -D '${PY}' --buildsystem pybuild -- --test-pytest --test-args '${PY}/unit_tests' + override_dh_installchangelogs: dh_installchangelogs -X CHANGES install -m 644 CHANGES debian/confget/usr/share/doc/confget/NEWS +override_dh_auto_clean: + dh_auto_clean + dh_auto_clean -D '${PY}' --buildsystem pybuild + rm -rf -- '${PY}/.pytest_cache' '${PY}/confget.egg-info' + %: - dh $@ + dh $@ --with python2,python3 |