[arch-commits] Commit in (4 files)

Thore Bödecker foxxx0 at archlinux.org
Mon May 6 09:48:15 UTC 2019


    Date: Monday, May 6, 2019 @ 09:48:14
  Author: foxxx0
Revision: 460504

split out python2 package

Added:
  python2-pecan/
  python2-pecan/repos/
  python2-pecan/trunk/
  python2-pecan/trunk/PKGBUILD

----------+
 PKGBUILD |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

Added: python2-pecan/trunk/PKGBUILD
===================================================================
--- python2-pecan/trunk/PKGBUILD	                        (rev 0)
+++ python2-pecan/trunk/PKGBUILD	2019-05-06 09:48:14 UTC (rev 460504)
@@ -0,0 +1,57 @@
+# 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-sphinx' 'python2-webob'
+             'python2-mako' 'python2-webtest'
+             'python2-six' 'python2-logutils')
+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