[arch-commits] Commit in python-pecan/trunk (PKGBUILD)
Thore Bödecker
foxxx0 at archlinux.org
Tue Jul 24 16:50:24 UTC 2018
Date: Tuesday, July 24, 2018 @ 16:50:23
Author: foxxx0
Revision: 363297
upgpkg: python-pecan 1.3.2-2
lots of fixes
Modified:
python-pecan/trunk/PKGBUILD
----------+
PKGBUILD | 76 ++++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 46 insertions(+), 30 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-07-24 14:43:15 UTC (rev 363296)
+++ PKGBUILD 2018-07-24 16:50:23 UTC (rev 363297)
@@ -1,45 +1,72 @@
# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
# Contributor: Tim Meusel <tim at bastelfreak.de>
pkgbase='python-pecan'
-pkgname=('python2-pecan' 'python-pecan')
+_pkgbase="${pkgbase#python-}"
+pkgname=("python-${_pkgbase}" "python2-${_pkgbase}")
pkgdesc='A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies.'
pkgver=1.3.2
-pkgrel=1
+pkgrel=2
arch=('any')
url='https://github.com/pecan/pecan'
license=('BSD')
-makedepends=('python' 'python2' 'python-setuptools' 'python2-setuptools' 'python-sphinx' 'python2-sphinx' 'python-webob' 'python2-webob' 'python-mako' 'python2-mako' 'python-webtest' 'python2-webtest')
-checkdepends=('python2-tox' 'python2-singledispatch' 'python2-waitress' 'python2-markupsafe' 'python2-six' 'python2-beautifulsoup4' 'python2-gunicorn' 'uwsgi-plugin-python2')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/pecan/pecan/archive/${pkgver}.tar.gz")
+makedepends=('python' 'python2' 'python-setuptools' 'python2-setuptools'
+ 'python-sphinx' 'python2-sphinx' 'python-webob' 'python2-webob'
+ 'python-mako' 'python2-mako' 'python-webtest' 'python2-webtest'
+ 'python-six' 'python2-six' 'python-logutils' 'python2-logutils')
+checkdepends=('python-virtualenv' 'python2-virtualenv'
+ 'python-jinja' 'python2-jinja' 'gunicorn' 'python2-gunicorn'
+ 'python-mock' 'python2-mock' 'python-sqlalchemy' 'python2-sqlalchemy'
+ 'python2-kajiki' 'python-genshi' 'python2-genshi'
+ 'python2-singledispatch' 'python-nine' 'python2-nine')
+source=("${_pkgbase}-${pkgver}.tar.gz::https://github.com/pecan/pecan/archive/${pkgver}.tar.gz")
sha512sums=('21eca763571c66d5bd2cecf59ebf5b4a70476088a670a5d8067ab84dc67881b81ae5a85fe2f262ca90a8a39b3a9bf8310651d0c595e331fcd0457b01f7f9cf2e')
-prepare() {
- cd "${srcdir}/pecan-${pkgver}"
-
+prepare(){
# fix manpage build
- sed -i '/^dist = /d' docs/source/conf.py
- sed -i "s/^version = release = .*\$/version = release = '${pkgver}'/" docs/source/conf.py
+ sed -i '/^dist = /d' "${srcdir}/${_pkgbase}-${pkgver}/docs/source/conf.py"
+ sed -i "s/^version = release = .*\$/version = release = '${pkgver}'/" "${srcdir}/${_pkgbase}-${pkgver}/docs/source/conf.py"
- # run tests only on platforms we support on Arch Linux
- # upstream currently ships no tests for python3.6, only 3.5 and older 3.X
- sed -i 's/envlist.*/envlist = py27,scaffolds-27,scaffolds-27-rest-api,pep8/' tox.ini
+ cp -r "${srcdir}/${_pkgbase}-${pkgver}" "${srcdir}/${_pkgbase}-${pkgver}-py2"
+
+ # fix python interpreter for python2 stuff
+ find "${srcdir}/${_pkgbase}-${pkgver}-py2" -type f -name '*.py' \
+ -exec sed -i 's|^#!/usr/bin/env python$|#!/usr/bin/env python2|1' {} +
}
+build() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ python ./setup.py build
+ cd "${srcdir}/${_pkgbase}-${pkgver}-py2"
+ python2 ./setup.py build
+}
+
check() {
- cd "${srcdir}/pecan-${pkgver}"
- # upstream tests only support python 2
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ python setup.py test
+ cd "${srcdir}/${_pkgbase}-${pkgver}-py2"
python2 setup.py test
}
+package_python-pecan() {
+ depends=('python' 'python-webob' 'python-mako' 'python-webtest' 'python-six' 'python-logutils')
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ python ./setup.py install --root="$pkgdir/" --optimize=1
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ cd docs
+ PYTHONPATH="${PWD}/../" make man
+ install -D -m644 "./build/man/pecan.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+}
+
package_python2-pecan() {
- depends=('python2')
- cd "${srcdir}/pecan-${pkgver}"
- python2 setup.py install --root="${pkgdir}/" --optimize=1
+ depends=('python2' 'python2-webob' 'python2-mako' 'python2-webtest' 'python2-six' 'python2-logutils')
+ cd "${srcdir}/${_pkgbase}-${pkgver}-py2"
+ python2 ./setup.py install --root="$pkgdir/" --optimize=1
install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cd docs
PYTHONPATH="${PWD}/../" make man
- install -D -m644 "${srcdir}/pecan-${pkgver}/docs/build/man/pecan.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+ install -D -m644 "./build/man/pecan.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
# fix conflicting files
for file in gunicorn_pecan pecan; do
@@ -46,14 +73,3 @@
mv "${pkgdir}/usr/bin/${file}" "${pkgdir}/usr/bin/${file}2"
done
}
-
-package_python-pecan() {
- depends=('python')
- cd "${srcdir}/pecan-${pkgver}"
- python setup.py install --root="${pkgdir}/" --optimize=1
- install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
- cd docs
- PYTHONPATH="${PWD}/../" make man
- install -D -m644 "${srcdir}/pecan-${pkgver}/docs/build/man/pecan.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
-}
More information about the arch-commits
mailing list