Re: devel/py-genshi: use debian patches + python3
ping On Thu, Oct 19, 2017 at 09:28:04AM +0200, Sebastien Marie wrote: > On Wed, Oct 18, 2017 at 04:05:42PM +0200, Sebastien Marie wrote: > > Hi, > > > > The following patch makes www/py-genshi to download and uses Debian > > patches (instead of copying them on your side - few patches but touching > > several files): > > > > - fix_tests_failure_with_python27.patch : Skip test which still fails > > in Python 2.7.6. > > > > - issue566.patch : Fix an IndexError preventing Genshi for uploading > > attachments in Trac for users with non-English language settings. > > > > - issue582.patch : Make genshi 0.7 compatible with Python 3.4. > > > > - issue602.patch : Fix Python 3.5 compatibility issues. > > > > See http://sources.debian.net/src/genshi/0.7-6/debian/patches/ > > > > I use the same way that www/w3m does for that. If proper patches are > > prefered, I could go this way too. > > > > Currently, genshi upstream seems abandoned (last commits in 2015), but > > the library is still used by several projects (trac, relatorio which is > > a dependance of tryton). Linux distributions (at least Debian and > > Gentoo) uses these patches to makes it usable on python3. > > > > With the diff, it is possible to use genshi on python3 on OpenBSD too. > > updated diff to install py-genshi and py3-genshi with conflict *without* conflict > thanks > -- > Sebastien Marie > > Index: Makefile > === > RCS file: /cvs/ports/www/py-genshi/Makefile,v > retrieving revision 1.13 > diff -u -p -r1.13 Makefile > --- Makefile 26 Nov 2015 21:50:54 - 1.13 > +++ Makefile 19 Oct 2017 07:27:14 - > @@ -5,7 +5,7 @@ COMMENT = toolkit for generation of outp > MODPY_EGG_VERSION = 0.7 > DISTNAME = Genshi-${MODPY_EGG_VERSION} > PKGNAME =py-${DISTNAME:L} > -REVISION = 0 > +REVISION = 1 > > CATEGORIES = www > > @@ -17,23 +17,33 @@ PERMIT_PACKAGE_CDROM =Yes > WANTLIB += ${MODPY_WANTLIB} pthread > > MASTER_SITES = http://ftp.edgewall.com/pub/genshi/ > +MASTER_SITES0 = ${MASTER_SITE_DEBIAN:=main/g/genshi/} > + > +DISTFILES = ${DISTNAME}.tar.gz \ > + genshi_0.7-6.debian.tar.xz:0 > > MODULES =lang/python > > MODPY_SETUPTOOLS = Yes > MODPY_SETUP_ARGS = --with-speedups > > +FLAVOR ?= > +FLAVORS =python3 > + > TEST_DEPENDS = ${BUILD_DEPENDS} > > +PATCH_DIST_STRIP = -p1 > + > +do-distpatch: > + for p in ${WRKDIR}/debian/patches/*.patch; do \ > + ${PATCH} ${PATCH_DIST_ARGS} < $$p; \ > + done > + > post-install: > - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/py-genshi > - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-genshi > - cd ${WRKSRC}/doc && pax -rw * ${PREFIX}/share/doc/py-genshi > + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/${MODPY_PY_PREFIX}genshi > + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${MODPY_PY_PREFIX}genshi > + cd ${WRKSRC}/doc && pax -rw * > ${PREFIX}/share/doc/${MODPY_PY_PREFIX}genshi > cd ${WRKSRC}/examples && \ > - pax -rw * ${PREFIX}/share/examples/py-genshi > - > -do-test: > - @${MAKE_ENV} PYTHONPATH=${WRKSRC} ${MODPY_BIN} \ > - ${WRKSRC}/genshi/tests/__init__.py > + pax -rw * ${PREFIX}/share/examples/${MODPY_PY_PREFIX}genshi > > .include > Index: distinfo > === > RCS file: /cvs/ports/www/py-genshi/distinfo,v > retrieving revision 1.5 > diff -u -p -r1.5 distinfo > --- distinfo 26 Jun 2015 06:56:22 - 1.5 > +++ distinfo 19 Oct 2017 07:27:14 - > @@ -1,2 +1,4 @@ > SHA256 (Genshi-0.7.tar.gz) = HRVEAuaLxESlW8rBAflstOWTcxAMx6LaB/vz5cxdc1I= > +SHA256 (genshi_0.7-6.debian.tar.xz) = > E6/z0eBOYGOr1GKYRUOnluqm6V3THrbP6s7dBIveZFo= > SIZE (Genshi-0.7.tar.gz) = 491579 > +SIZE (genshi_0.7-6.debian.tar.xz) = 11380 > Index: pkg/PLIST > === > RCS file: /cvs/ports/www/py-genshi/pkg/PLIST,v > retrieving revision 1.3 > diff -u -p -r1.3 PLIST > --- pkg/PLIST 26 Jun 2015 06:56:22 - 1.3 > +++ pkg/PLIST 19 Oct 2017 07:27:14 - > @@ -8,413 +8,420 @@ lib/python${MODPY_VERSION}/site-packages > > lib/python${MODPY_VERSION}/site-packages/Genshi-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt > lib/python${MODPY_VERSION}/site-packages/genshi/ > lib/python${MODPY_VERSION}/site-packages/genshi/__init__.py > -lib/python${MODPY_VERSION}/site-packages/genshi/__init__.pyc > -lib/python${MODPY_VERSION}/site-packages/genshi/_speedups.so > +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}/ > +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc > +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}builder.${MODPY_PYC_MAGIC_TAG}pyc > +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}compat.${MODPY_PYC_MAGIC_TAG}pyc >
Re: devel/py-genshi: use debian patches + python3
On Wed, Oct 18, 2017 at 04:05:42PM +0200, Sebastien Marie wrote: > Hi, > > The following patch makes www/py-genshi to download and uses Debian > patches (instead of copying them on your side - few patches but touching > several files): > > - fix_tests_failure_with_python27.patch : Skip test which still fails > in Python 2.7.6. > > - issue566.patch : Fix an IndexError preventing Genshi for uploading > attachments in Trac for users with non-English language settings. > > - issue582.patch : Make genshi 0.7 compatible with Python 3.4. > > - issue602.patch : Fix Python 3.5 compatibility issues. > > See http://sources.debian.net/src/genshi/0.7-6/debian/patches/ > > I use the same way that www/w3m does for that. If proper patches are > prefered, I could go this way too. > > Currently, genshi upstream seems abandoned (last commits in 2015), but > the library is still used by several projects (trac, relatorio which is > a dependance of tryton). Linux distributions (at least Debian and > Gentoo) uses these patches to makes it usable on python3. > > With the diff, it is possible to use genshi on python3 on OpenBSD too. updated diff to install py-genshi and py3-genshi with conflict thanks -- Sebastien Marie Index: Makefile === RCS file: /cvs/ports/www/py-genshi/Makefile,v retrieving revision 1.13 diff -u -p -r1.13 Makefile --- Makefile26 Nov 2015 21:50:54 - 1.13 +++ Makefile19 Oct 2017 07:27:14 - @@ -5,7 +5,7 @@ COMMENT = toolkit for generation of outp MODPY_EGG_VERSION =0.7 DISTNAME = Genshi-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME:L} -REVISION = 0 +REVISION = 1 CATEGORIES = www @@ -17,23 +17,33 @@ PERMIT_PACKAGE_CDROM = Yes WANTLIB += ${MODPY_WANTLIB} pthread MASTER_SITES = http://ftp.edgewall.com/pub/genshi/ +MASTER_SITES0 =${MASTER_SITE_DEBIAN:=main/g/genshi/} + +DISTFILES =${DISTNAME}.tar.gz \ + genshi_0.7-6.debian.tar.xz:0 MODULES = lang/python MODPY_SETUPTOOLS = Yes MODPY_SETUP_ARGS = --with-speedups +FLAVOR ?= +FLAVORS = python3 + TEST_DEPENDS = ${BUILD_DEPENDS} +PATCH_DIST_STRIP = -p1 + +do-distpatch: + for p in ${WRKDIR}/debian/patches/*.patch; do \ + ${PATCH} ${PATCH_DIST_ARGS} < $$p; \ + done + post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/py-genshi - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-genshi - cd ${WRKSRC}/doc && pax -rw * ${PREFIX}/share/doc/py-genshi + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/${MODPY_PY_PREFIX}genshi + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${MODPY_PY_PREFIX}genshi + cd ${WRKSRC}/doc && pax -rw * ${PREFIX}/share/doc/${MODPY_PY_PREFIX}genshi cd ${WRKSRC}/examples && \ - pax -rw * ${PREFIX}/share/examples/py-genshi - -do-test: - @${MAKE_ENV} PYTHONPATH=${WRKSRC} ${MODPY_BIN} \ - ${WRKSRC}/genshi/tests/__init__.py + pax -rw * ${PREFIX}/share/examples/${MODPY_PY_PREFIX}genshi .include Index: distinfo === RCS file: /cvs/ports/www/py-genshi/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- distinfo26 Jun 2015 06:56:22 - 1.5 +++ distinfo19 Oct 2017 07:27:14 - @@ -1,2 +1,4 @@ SHA256 (Genshi-0.7.tar.gz) = HRVEAuaLxESlW8rBAflstOWTcxAMx6LaB/vz5cxdc1I= +SHA256 (genshi_0.7-6.debian.tar.xz) = E6/z0eBOYGOr1GKYRUOnluqm6V3THrbP6s7dBIveZFo= SIZE (Genshi-0.7.tar.gz) = 491579 +SIZE (genshi_0.7-6.debian.tar.xz) = 11380 Index: pkg/PLIST === RCS file: /cvs/ports/www/py-genshi/pkg/PLIST,v retrieving revision 1.3 diff -u -p -r1.3 PLIST --- pkg/PLIST 26 Jun 2015 06:56:22 - 1.3 +++ pkg/PLIST 19 Oct 2017 07:27:14 - @@ -8,413 +8,420 @@ lib/python${MODPY_VERSION}/site-packages lib/python${MODPY_VERSION}/site-packages/Genshi-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt lib/python${MODPY_VERSION}/site-packages/genshi/ lib/python${MODPY_VERSION}/site-packages/genshi/__init__.py -lib/python${MODPY_VERSION}/site-packages/genshi/__init__.pyc -lib/python${MODPY_VERSION}/site-packages/genshi/_speedups.so +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}/ +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}builder.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}compat.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}core.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}input.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}output.${MODPY_PYC_MAGIC_TAG}pyc
devel/py-genshi: use debian patches + python3
Hi, The following patch makes www/py-genshi to download and uses Debian patches (instead of copying them on your side - few patches but touching several files): - fix_tests_failure_with_python27.patch : Skip test which still fails in Python 2.7.6. - issue566.patch : Fix an IndexError preventing Genshi for uploading attachments in Trac for users with non-English language settings. - issue582.patch : Make genshi 0.7 compatible with Python 3.4. - issue602.patch : Fix Python 3.5 compatibility issues. See http://sources.debian.net/src/genshi/0.7-6/debian/patches/ I use the same way that www/w3m does for that. If proper patches are prefered, I could go this way too. Currently, genshi upstream seems abandoned (last commits in 2015), but the library is still used by several projects (trac, relatorio which is a dependance of tryton). Linux distributions (at least Debian and Gentoo) uses these patches to makes it usable on python3. With the diff, it is possible to use genshi on python3 on OpenBSD too. My purpose is to switch several ports to python3 in order to be able to run trytond on python3 (it isn't packaged on ports). Thanks. -- Sebastien Marie Index: Makefile === RCS file: /cvs/ports/www/py-genshi/Makefile,v retrieving revision 1.13 diff -u -p -r1.13 Makefile --- Makefile26 Nov 2015 21:50:54 - 1.13 +++ Makefile18 Oct 2017 14:00:39 - @@ -5,7 +5,7 @@ COMMENT = toolkit for generation of outp MODPY_EGG_VERSION =0.7 DISTNAME = Genshi-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME:L} -REVISION = 0 +REVISION = 1 CATEGORIES = www @@ -17,23 +17,33 @@ PERMIT_PACKAGE_CDROM = Yes WANTLIB += ${MODPY_WANTLIB} pthread MASTER_SITES = http://ftp.edgewall.com/pub/genshi/ +MASTER_SITES0 =${MASTER_SITE_DEBIAN:=main/g/genshi/} + +DISTFILES =${DISTNAME}.tar.gz \ + genshi_0.7-6.debian.tar.xz:0 MODULES = lang/python MODPY_SETUPTOOLS = Yes MODPY_SETUP_ARGS = --with-speedups +FLAVOR ?= +FLAVORS = python3 + TEST_DEPENDS = ${BUILD_DEPENDS} +PATCH_DIST_STRIP = -p1 + +do-distpatch: + for p in ${WRKDIR}/debian/patches/*.patch; do \ + ${PATCH} ${PATCH_DIST_ARGS} < $$p; \ + done + post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/py-genshi ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-genshi cd ${WRKSRC}/doc && pax -rw * ${PREFIX}/share/doc/py-genshi cd ${WRKSRC}/examples && \ pax -rw * ${PREFIX}/share/examples/py-genshi - -do-test: - @${MAKE_ENV} PYTHONPATH=${WRKSRC} ${MODPY_BIN} \ - ${WRKSRC}/genshi/tests/__init__.py .include Index: distinfo === RCS file: /cvs/ports/www/py-genshi/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- distinfo26 Jun 2015 06:56:22 - 1.5 +++ distinfo18 Oct 2017 14:00:39 - @@ -1,2 +1,4 @@ SHA256 (Genshi-0.7.tar.gz) = HRVEAuaLxESlW8rBAflstOWTcxAMx6LaB/vz5cxdc1I= +SHA256 (genshi_0.7-6.debian.tar.xz) = E6/z0eBOYGOr1GKYRUOnluqm6V3THrbP6s7dBIveZFo= SIZE (Genshi-0.7.tar.gz) = 491579 +SIZE (genshi_0.7-6.debian.tar.xz) = 11380 Index: pkg/PLIST === RCS file: /cvs/ports/www/py-genshi/pkg/PLIST,v retrieving revision 1.3 diff -u -p -r1.3 PLIST --- pkg/PLIST 26 Jun 2015 06:56:22 - 1.3 +++ pkg/PLIST 18 Oct 2017 14:00:39 - @@ -8,102 +8,108 @@ lib/python${MODPY_VERSION}/site-packages lib/python${MODPY_VERSION}/site-packages/Genshi-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt lib/python${MODPY_VERSION}/site-packages/genshi/ lib/python${MODPY_VERSION}/site-packages/genshi/__init__.py -lib/python${MODPY_VERSION}/site-packages/genshi/__init__.pyc -lib/python${MODPY_VERSION}/site-packages/genshi/_speedups.so +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}/ +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}builder.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}compat.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}core.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}input.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}output.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}path.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/genshi/${MODPY_PYCACHE}util.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/genshi/builder.py -lib/python${MODPY_VERSION}/site-packages/genshi/builder.pyc