diff options
author | Peter Pentchev <roam@debian.org> | 2019-01-13 15:02:05 +0200 |
---|---|---|
committer | Peter Pentchev <roam@debian.org> | 2019-01-14 00:29:02 +0200 |
commit | 87c0936cfef149d9088c1f16b29205c5d322020d (patch) | |
tree | c5c581d893cc4a4480ea570e57db8bd19abaea6f | |
parent | 28b74a338558256a4c1ba3673ba1b153184fce50 (diff) |
Add a PyPy package.
-rw-r--r-- | debian/control | 26 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/test-too-many-pypy.patch | 16 | ||||
-rwxr-xr-x | debian/rules | 10 | ||||
-rwxr-xr-x | debian/tests/tap-python.sh | 6 |
5 files changed, 57 insertions, 2 deletions
diff --git a/debian/control b/debian/control index bb965c2..d801dc3 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,9 @@ Build-Depends: debhelper-compat (= 12), dh-python, libpcre3-dev, + pypy, + pypy-setuptools, + pypy-six, python-all, python-ddt, python-pytest, @@ -39,6 +42,29 @@ Description: read variables from INI-style configuration files output mode that quotes the variable values in a way suitable for passing them directly to a Bourne-style shell. +Package: pypy-confget +Section: python +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, ${pypy:Depends} +Recommends: ${pypy:Recommends} +Suggests: ${pypy:Suggests} +Provides: ${pypy:Provides} +Description: read variables from INI-style configuration files - PyPy 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 PyPy library. + Package: python-confget Section: python Architecture: all diff --git a/debian/patches/series b/debian/patches/series index 5d2e681..7cff224 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ python-no-executable.patch +test-too-many-pypy.patch diff --git a/debian/patches/test-too-many-pypy.patch b/debian/patches/test-too-many-pypy.patch new file mode 100644 index 0000000..e851b56 --- /dev/null +++ b/debian/patches/test-too-many-pypy.patch @@ -0,0 +1,16 @@ +Description: Skip some of the "too many options" tests on PyPy, too. +Forwarded: yes +Author: Peter Pentchev <roam@ringlet.net> +Last-Update: 2019-01-13 + +--- a/t/14-bespoke-too-many.t ++++ b/t/14-bespoke-too-many.t +@@ -57,7 +57,7 @@ + '-q features -q feature BASE' \ + '-q features key1'; do + if [ "${args#-q sections -q}" != "$args" ] || [ "${args#-q features -q}" != "$args" ]; then +- if [ "${CONFGET#*python}" != "$CONFGET" ]; then ++ if [ "${CONFGET#*python}" != "$CONFGET" ] || [ "${CONFGET#*pypy}" != "$CONFGET" ]; then + echo "ok $idx $args - skipped, Python argparse" + idx="$((idx + 1))" + continue diff --git a/debian/rules b/debian/rules index cdec530..e4caa7c 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,7 @@ # Debian build rules for confget, the configuration variable extractor export PYBUILD_NAME=confget +export PYBUILD_DISABLE=test/pypy # Aim for the top, adapt if anything should break on the buildds. DEB_BUILD_MAINT_OPTIONS= hardening=+all future=+lfs @@ -25,6 +26,11 @@ BUILD_IMPL_C=yes else BUILD_IMPL_C=no endif +ifneq (,$(filter pypy-confget,$(shell dh_listpackages))) +BUILD_IMPL_PYPY=yes +else +BUILD_IMPL_PYPY=no +endif ifneq (,$(filter python-confget,$(shell dh_listpackages))) BUILD_IMPL_PY2=yes else @@ -35,7 +41,7 @@ BUILD_IMPL_PY3=yes else BUILD_IMPL_PY3=no endif -ifneq (no no,${BUILD_IMPL_PY2} ${BUILD_IMPL_PY3}) +ifneq (no no no,${BUILD_IMPL_PYPY} ${BUILD_IMPL_PY2} ${BUILD_IMPL_PY3}) BUILD_IMPL_PY=yes else BUILD_IMPL_PY=no @@ -103,4 +109,4 @@ override_dh_auto_clean: rm -rf -- '${PY}/.pytest_cache' '${PY}/confget.egg-info' %: - dh $@ --with python2,python3 + dh $@ --with python2,python3,pypy diff --git a/debian/tests/tap-python.sh b/debian/tests/tap-python.sh index e295f1e..06cbfee 100755 --- a/debian/tests/tap-python.sh +++ b/debian/tests/tap-python.sh @@ -16,6 +16,12 @@ if [ -n "$(command -v py3versions 2>/dev/null)" ]; then done fi +# Add PyPy into the mix. + +if [ -n "$(command -v pypy 2>/dev/null)" ]; then + interpreters="$interpreters pypy" +fi + # Finally run the tests. for python in $interpreters; do |