Control: tag -1 patch On Thu, Sep 25, 2014 at 12:17:33 +0200, Julien Cristau wrote:
> Source: yapps2 > Version: 2.1.1-17.2 > Severity: wishlist > > Hi, > > upstream yapps (2.2.0) supports python3, it'd be nice to get a > python3-yapps package in Debian. > Here's a patch for the debian package, based on the 2.2.0 upstream version, adding a python3 package and reworking the packaging to more modern style. Cheers, Julien diff --git a/debian/changelog b/debian/changelog index 97e3334..d99aca9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +yapps2 (2.2.0-0.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * New upstream release. + * Build for python3 (closes: #762804), switching debian/rules to dh with the + pybuild build system. + * Bump Standards-Version to 3.9.6. + + -- Julien Cristau <[email protected]> Wed, 09 Sep 2015 10:30:57 +0200 + yapps2 (2.1.1-17.3) unstable; urgency=medium * Non-maintainer upload. diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..5f9a740 --- /dev/null +++ b/debian/clean @@ -0,0 +1,3 @@ +doc/yapps2.haux +doc/yapps2.html +doc/yapps2.htoc diff --git a/debian/compat b/debian/compat index b8626c4..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -4 +9 diff --git a/debian/control b/debian/control index 3713aaa..6c04beb 100644 --- a/debian/control +++ b/debian/control @@ -2,13 +2,23 @@ Source: yapps2 Section: python Priority: optional Maintainer: Matthias Urlichs <[email protected]> -Build-Depends: debhelper (>= 4.1) -Build-Depends-Indep: python-dev (>= 2.5.4-1~), hevea, dh-python -Standards-Version: 3.7.2 +Build-Depends: + debhelper (>= 9), + python-all (>= 2.6.5), + python3-all, + dh-python, +Build-Depends-Indep: + hevea, +Standards-Version: 3.9.6 +X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.3 Package: yapps2 Architecture: all -Depends: ${python:Depends}, yapps2-runtime (= ${Source-Version}) +Depends: + ${python3:Depends}, + ${misc:Depends}, + python3-yapps2-runtime (= ${source:Version}), Description: Yet Another Python Parser System YAPPS is an easy to use parser generator that is written in Python and generates Python code. There are several parser generator systems @@ -29,13 +39,28 @@ Description: Yet Another Python Parser System Package: yapps2-runtime Architecture: all -Depends: ${python:Depends} -Description: Yet Another Python Parser System +Depends: + ${python:Depends}, + ${misc:Depends}, +Description: Yet Another Python Parser System - Python 2 runtime YAPPS is an easy to use parser generator that is written in Python and generates Python code. There are several parser generator systems already available for Python, but this parser has different goals: Yapps is simple, very easy to use, and produces human-readable parsers. . - This package contains the Python runtime support for parsers generated + This package contains the Python 2 runtime support for parsers generated with yapps2. +Package: python3-yapps2-runtime +Architecture: all +Depends: + ${python3:Depends}, + ${misc:Depends}, +Description: Yet Another Python Parser System - Python 3 runtime + YAPPS is an easy to use parser generator that is written in Python and + generates Python code. There are several parser generator systems + already available for Python, but this parser has different goals: + Yapps is simple, very easy to use, and produces human-readable parsers. + . + This package contains the Python 3 runtime support for parsers generated + with yapps2. diff --git a/debian/python3-yapps2-runtime.install b/debian/python3-yapps2-runtime.install new file mode 100644 index 0000000..d7180cc --- /dev/null +++ b/debian/python3-yapps2-runtime.install @@ -0,0 +1,3 @@ +usr/lib/python3*/*-packages/yapps/__init__.py +usr/lib/python3*/*-packages/yapps/runtime.py +usr/lib/python3*/*-packages/*.egg-info diff --git a/debian/pyversions b/debian/pyversions deleted file mode 100644 index 9091367..0000000 --- a/debian/pyversions +++ /dev/null @@ -1 +0,0 @@ -2.2- diff --git a/debian/rules b/debian/rules index e5c895e..7abea4f 100755 --- a/debian/rules +++ b/debian/rules @@ -6,95 +6,14 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -include /usr/share/python/python.mk +%: + dh $@ --with python2,python3 --buildsystem=pybuild -PWD=$(shell pwd) -PYVER=$(shell pyversions -d) - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - python setup.py build - #/usr/bin/docbook-to-man debian/yapps2.sgml > yapps.1 - #cd doc && latex2html yapps2.tex +override_dh_auto_build: + dh_auto_build cd doc && hevea yapps2.tex cd doc && hevea yapps2.tex # twice because of TOC - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - rm -rf build debian/yapps2 doc/yapps2 - test -f changelog || bk changes > changelog - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - dh_installdirs -pyapps2-runtime usr/lib/$(PYVER)/${call py_sitename, ${PYVER}}/yapps - - # Add here commands to install the package into debian/yapps. - python setup.py install --root=$(PWD)/debian/yapps2 --no-compile ${py_setup_install_args} - install -m 755 yapps2.py debian/yapps2/usr/bin/yapps - install -m 755 doc/yapps2.html debian/yapps2/usr/share/doc/yapps2/ - set -e; \ - for f in runtime.py __init__.py; do \ - mv $(PWD)/debian/yapps2/usr/lib/$(PYVER)/${call py_sitename, ${PYVER}}/yapps/$$f \ - $(PWD)/debian/yapps2-runtime/usr/lib/$(PYVER)/${call py_sitename, ${PYVER}}/yapps/; \ - done - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples examples/* test yapps_grammar.g - dh_installman debian/yapps.1 - find debian/yapps2/usr/share -name SCCS -print0 | xargs -0r rm -rf - dh_compress - dh_compress usr/share/doc/yapps2/NOTES - dh_fixperms -# dh_perl - dh_python2 -# dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure +override_dh_auto_install: + dh_auto_install + mv debian/tmp/usr/bin/yapps2 debian/tmp/usr/bin/yapps diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..e090316 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ +https://pypi.debian.net/Yapps/Yapps-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff --git a/debian/yapps2-runtime.install b/debian/yapps2-runtime.install new file mode 100644 index 0000000..3ca8c65 --- /dev/null +++ b/debian/yapps2-runtime.install @@ -0,0 +1,3 @@ +usr/lib/python2*/*-packages/yapps/__init__.py +usr/lib/python2*/*-packages/yapps/runtime.py +usr/lib/python2*/*-packages/*.egg-info diff --git a/debian/yapps2.docs b/debian/yapps2.docs index 832b175..368e321 100644 --- a/debian/yapps2.docs +++ b/debian/yapps2.docs @@ -1,3 +1,4 @@ NOTES -changelog doc/yapps2.tex +doc/yapps2.html +README.md diff --git a/debian/yapps2.install b/debian/yapps2.install new file mode 100644 index 0000000..942cd5d --- /dev/null +++ b/debian/yapps2.install @@ -0,0 +1,5 @@ +usr/bin +usr/lib/python3*/*-packages/yapps/grammar.py +usr/lib/python3*/*-packages/yapps/parsetree.py +usr/lib/python3*/*-packages/yapps/cli_tool.py + diff --git a/debian/yapps2.manpages b/debian/yapps2.manpages new file mode 100644 index 0000000..dab0620 --- /dev/null +++ b/debian/yapps2.manpages @@ -0,0 +1 @@ +debian/yapps.1 -- Julien Cristau <[email protected]> Logilab http://www.logilab.fr/ Informatique scientifique & gestion de connaissances

