diff --git a/srcpkgs/python-pystache/patches/setup.patch b/srcpkgs/python-pystache/patches/setup.patch new file mode 100644 index 00000000000..3849245d01d --- /dev/null +++ b/srcpkgs/python-pystache/patches/setup.patch @@ -0,0 +1,27 @@ +1. setuptools no longer supports use_2to3, so drop the setup() arg +2. Drop the pystache-test entrypoint script here rather than in-template + +--- ./setup.py ++++ ./setup.py +@@ -351,13 +351,6 @@ + + """ + extra = {} +- # TODO: it might be more correct to check whether we are using +- # Distribute instead of setuptools, since use_2to3 doesn't take +- # effect when using Python 2, even when using Distribute. +- if py_version >= (3, ): +- # Causes 2to3 to be run during the build step. +- extra['use_2to3'] = True +- + return extra + + +@@ -401,7 +394,6 @@ + entry_points = { + 'console_scripts': [ + 'pystache=pystache.commands.render:main', +- 'pystache-test=pystache.commands.test:main', + ], + }, + classifiers = CLASSIFIERS, diff --git a/srcpkgs/python-pystache/template b/srcpkgs/python-pystache/template index 4bed7b9403d..6c85b2d20d3 100644 --- a/srcpkgs/python-pystache/template +++ b/srcpkgs/python-pystache/template @@ -1,7 +1,7 @@ # Template file for 'python-pystache' pkgname=python-pystache version=0.5.4 -revision=5 +revision=6 wrksrc="pystache-${version}" build_style=python-module pycompile_module="pystache" @@ -15,10 +15,15 @@ distfiles="${PYPI_SITE}/p/pystache/pystache-${version}.tar.gz" checksum=f7bbc265fb957b4d6c7c042b336563179444ab313fb93a719759111eabd3b85a alternatives="pystache:pystache:/usr/bin/pystache2" -pre_build() { - # no pystache-test entry point - sed -i '/pystache-test/d' setup.py +do_build() { + # This is pure python, no need for cross antics + python2.7 setup.py build --build-base=build-2.7 + + # Convert py2 syntax to py3 since setuptools no longer does it + 2to3-${py3_ver} -w pystache + python3 setup.py build --build-base=build-${py3_ver} } + post_install() { vlicense LICENSE }