[arch-commits] Commit in python-pecan/trunk (PKGBUILD)

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


    Date: Monday, May 6, 2019 @ 09:42:25
  Author: foxxx0
Revision: 460502

upgpkg: python-pecan 1.3.3-1

update to 1.3.3, split out python2 package

Modified:
  python-pecan/trunk/PKGBUILD

----------+
 PKGBUILD |   67 ++++++++++++++++---------------------------------------------
 1 file changed, 18 insertions(+), 49 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-05-06 08:38:17 UTC (rev 460501)
+++ PKGBUILD	2019-05-06 09:42:25 UTC (rev 460502)
@@ -1,55 +1,40 @@
 # Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
 # Contributor: Tim Meusel <tim at bastelfreak.de>
-pkgbase='python-pecan'
-_pkgbase="${pkgbase#python-}"
-pkgname=("python-${_pkgbase}" "python2-${_pkgbase}")
+pkgname="python-pecan"
+_pkgname="${pkgname#python-}"
 pkgdesc='A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies.'
-pkgver=1.3.2
-pkgrel=3
+pkgver=1.3.3
+pkgrel=1
 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'
-             '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')
+depends=('python' 'python-webob' 'python-mako' 'python-webtest' 'python-six'
+         'python-logutils')
+makedepends=('python' 'python-setuptools' 'python-sphinx' 'python-webob'
+             'python-mako' 'python-webtest' 'python-six' 'python-logutils')
+checkdepends=('python-virtualenv' 'python-jinja' 'gunicorn' 'python-mock'
+              'python-sqlalchemy' 'python-genshi' 'python-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}/${_pkgbase}-${pkgver}/docs/source/conf.py"
-  sed -i "s/^version = release = .*\$/version = release = '${pkgver}'/" "${srcdir}/${_pkgbase}-${pkgver}/docs/source/conf.py"
-
-  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' {} +
+  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"
 }
 
 build() {
-  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  cd "${srcdir}/${_pkgname}-${pkgver}"
   python ./setup.py build
-  cd "${srcdir}/${_pkgbase}-${pkgver}-py2"
-  python2 ./setup.py build
 }
 
 check() {
-  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  cd "${srcdir}/${_pkgname}-${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}"
+package() {
+  cd "${srcdir}/${_pkgname}-${pkgver}"
   python ./setup.py install --root="$pkgdir/" --optimize=1
   install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 
@@ -57,19 +42,3 @@
   PYTHONPATH="${PWD}/../" make man
   install -D -m644 "./build/man/pecan.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
 }
-
-package_python2-pecan() {
-  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 "./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