python-pystache: rebuild for Python 3.10
This commit is contained in:
parent
4b63e6e519
commit
d017670a35
2 changed files with 36 additions and 4 deletions
27
srcpkgs/python-pystache/patches/setup.patch
Normal file
27
srcpkgs/python-pystache/patches/setup.patch
Normal file
|
@ -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,
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue