From a026eee27d147035b448de0935bae9a3dfe33276 Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Fri, 22 Feb 2019 11:20:35 +0100 Subject: pcr/python-wsgiref: moved from python2-wsgiref and updated --- pcr/python-wsgiref/PKGBUILD | 45 ++++++++++++++++++++++++++++++++++++++++++++ pcr/python2-wsgiref/PKGBUILD | 28 --------------------------- 2 files changed, 45 insertions(+), 28 deletions(-) create mode 100644 pcr/python-wsgiref/PKGBUILD delete mode 100644 pcr/python2-wsgiref/PKGBUILD (limited to 'pcr') diff --git a/pcr/python-wsgiref/PKGBUILD b/pcr/python-wsgiref/PKGBUILD new file mode 100644 index 000000000..4a164c041 --- /dev/null +++ b/pcr/python-wsgiref/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer : Parabola GNU / Linux-libre Aurélien DESBRIÈRES + +_pkgname=wsgiref +pkgname=(python{,2}-$_pkgname) +pkgver=0.1.2 +pkgrel=3 +pkgdesc="WSGI (PEP 333) Reference Library" +arch=(any) +url=http://cheeseshop.python.org/pypi/wsgiref +license=(PSF ZPL) + +makedepends=(python{,2}-setuptools) +source=("https://files.pythonhosted.org/packages/source/w/wsgiref/wsgiref-${pkgver}.zip") +md5sums=('29b146e6ebd0f9fb119fe321f7bcf6cb') + +prepare() { + cd "$srcdir" + + cp -r $_pkgname-$pkgver $_pkgname-$pkgver-python2 + mv $_pkgname-$pkgver $_pkgname-$pkgver-python + + cd "$srcdir"/$_pkgname-$pkgver-python2 + find -iname '*.py' -type f -exec sed -ri 's:^#!/usr/bin/(env )?python$:&2:' '{}' \; + + cd "$srcdir"/$_pkgname-$pkgver-python + 2to3 -w . +} + +build() { + cd "$srcdir"/$_pkgname-$pkgver-python2 + python2 setup.py build + + cd "$srcdir"/$_pkgname-$pkgver-python + python setup.py build +} + +_package() { + depends=($1) + cd "$srcdir"/$_pkgname-$pkgver-$1 + $1 setup.py install --root="$pkgdir" +} + +for _pkg in "${pkgname[@]}"; do + eval "package_$_pkg () { _package ${_pkg%%-*}; }" +done diff --git a/pcr/python2-wsgiref/PKGBUILD b/pcr/python2-wsgiref/PKGBUILD deleted file mode 100644 index fe7e7758d..000000000 --- a/pcr/python2-wsgiref/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Contributor: Limao Luo -# Contributor: Philipp Schmidt -# Maintainer : Parabola GNU / Linux-libre Aurélien DESBRIÈRES - -pkgname=python2-wsgiref -pkgver=0.1.2 -pkgrel=2.1 -pkgdesc="WSGI (PEP 333) Reference Library" -arch=(any) -url=http://cheeseshop.python.org/pypi/wsgiref -license=(PSF ZPL) -depends=(python2) -makedepends=(python2-setuptools) -source=(http://pypi.python.org/packages/source/w/${pkgname#*-}/${pkgname#*-}-$pkgver.zip) - -prepare() { - find ${pkgname#*-}-$pkgver -name '*.py' -type f -exec sed -ri 's:^#!/usr/bin/(env )?python$:&2:' '{}' \; -} - -build() { - cd ${pkgname#*-}-$pkgver/ - python2 setup.py build -} - -package() { - cd ${pkgname#*-}-$pkgver/ - python2 setup.py install --root="$pkgdir" --optimize=1 -} -- cgit v1.2.3