[arch-commits] Commit in python2-pecan/repos (community-any community-any/PKGBUILD)
Thore Bödecker
foxxx0 at archlinux.org
Mon May 6 09:55:40 UTC 2019
Date: Monday, May 6, 2019 @ 09:55:39
Author: foxxx0
Revision: 460506
archrelease: copy trunk to community-any
Added:
python2-pecan/repos/community-any/
python2-pecan/repos/community-any/PKGBUILD
(from rev 460505, python2-pecan/trunk/PKGBUILD)
----------+
PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
Copied: python2-pecan/repos/community-any/PKGBUILD (from rev 460505, python2-pecan/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2019-05-06 09:55:39 UTC (rev 460506)
@@ -0,0 +1,53 @@
+# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Contributor: Tim Meusel <tim at bastelfreak.de>
+pkgname="python2-pecan"
+_pkgname="${pkgname#python2-}"
+pkgdesc='A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies.'
+pkgver=1.3.3
+pkgrel=1
+arch=('any')
+url='https://github.com/pecan/pecan'
+license=('BSD')
+depends=('python2' 'python2-webob' 'python2-mako' 'python2-webtest' 'python2-six' 'python2-logutils')
+makedepends=('python2' 'python2-setuptools' 'python2-webob' 'python2-mako'
+ 'python2-webtest' 'python2-six' 'python2-logutils' 'python-sphinx')
+checkdepends=('python2-virtualenv' 'python2-jinja' 'gunicorn' 'python2-gunicorn'
+ 'python2-mock' 'python2-sqlalchemy' 'python2-kajiki'
+ 'python2-genshi' 'python2-singledispatch' 'python2-nine')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/${pkgver}.tar.gz")
+sha512sums=('a1d2c865c2c5ec6b891449107920b3c7fcb9a656df7f39f39610669fb50b70756e28508c9108e006e757fbaac3832b8f2e52b343d83edd173ff802407c8fff56')
+
+prepare(){
+ # fix manpage build
+ sed -i '/^dist = /d' "${srcdir}/${_pkgname}-${pkgver}/docs/source/conf.py"
+ sed -i "s/^version = release = .*\$/version = release = '${pkgver}'/" "${srcdir}/${_pkgname}-${pkgver}/docs/source/conf.py"
+
+ # fix python interpreter for python2 stuff
+ find "${srcdir}/${_pkgname}-${pkgver}" -type f -name '*.py' \
+ -exec sed -i 's|^#!/usr/bin/env python$|#!/usr/bin/env python2|1' {} +
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ python2 ./setup.py build
+}
+
+check() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ python2 setup.py test
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ 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 "./build/man/pecan.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+
+ # fix conflicting files
+ for file in gunicorn_pecan pecan; do
+ mv "${pkgdir}/usr/bin/${file}" "${pkgdir}/usr/bin/${file}2"
+ done
+}
More information about the arch-commits
mailing list