[arch-commits] Commit in python-pycurl/trunk (PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Fri Dec 18 13:06:03 UTC 2020
Date: Friday, December 18, 2020 @ 13:06:03
Author: felixonmars
Revision: 404474
upgpkg: python-pycurl 7.43.0.6-4: split out python2 package
Modified:
python-pycurl/trunk/PKGBUILD
----------+
PKGBUILD | 52 ++++++++++++----------------------------------------
1 file changed, 12 insertions(+), 40 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-12-18 12:39:14 UTC (rev 404473)
+++ PKGBUILD 2020-12-18 13:06:03 UTC (rev 404474)
@@ -2,43 +2,30 @@
# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
-pkgbase=python-pycurl
-pkgname=('python-pycurl' 'python2-pycurl')
+pkgname=python-pycurl
pkgver=7.43.0.6
-pkgrel=3
+pkgrel=4
+pkgdesc="A Python 3.x interface to libcurl"
arch=('x86_64')
url="http://pycurl.sourceforge.net/"
license=('LGPL' 'MIT')
-makedepends=('python' 'python2' 'curl')
-checkdepends=('python-bottle' 'python2-bottle' 'python-nose-show-skipped' 'python2-nose-show-skipped'
- 'vsftpd' 'python-flaky' 'python2-flaky' 'python-pyflakes' 'python2-pyflakes')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/pycurl/pycurl/archive/REL_${pkgver//./_}.tar.gz")
+depends=('python' 'curl')
+checkdepends=('python-bottle' 'python-nose-show-skipped' 'vsftpd' 'python-flaky' 'python-pyflakes')
+source=("https://github.com/pycurl/pycurl/archive/REL_${pkgver//./_}/$pkgname-$pkgver.tar.gz")
sha512sums=('ea0160794d30758c8163f1f82fc6315c27f2cfd1b9981a7c349a48cee892fc2307e3edd25456378f1a780bc134fca199d8d6431310fd47b2ca6126a8822fea40')
prepare() {
mv pycurl-REL_${pkgver//./_} pycurl-$pkgver
- cp -a pycurl-$pkgver{,-py2}
-
- cd "$srcdir"/pycurl-$pkgver
+ cd pycurl-$pkgver
find . -name '*.py' -exec sed -i -e "s|#! /usr/bin/env python|#!/usr/bin/env python3|" {} +
- sed -i 's/"share", "doc", PACKAGE/"share", "doc", "python-pycurl"/' setup.py
+ sed -i 's/"share", "doc", PACKAGE/"share", "doc", "python-pycurl"/' setup.py
sed -e "s/nosetests/nosetests3/" -e "s/python/python3/" -i tests/run.sh
-
- cd "$srcdir"/pycurl-$pkgver-py2
- find . -name '*.py' -exec sed -i -e "s|#! /usr/bin/env python|#!/usr/bin/env python2|" {} +
- sed -i 's/"share", "doc", PACKAGE/"share", "doc", "python2-pycurl"/' setup.py
- sed -e "s/nosetests/nosetests2/" -e "s/python/python2/" -i tests/run.sh
- sed -e "s/pyflakes/pyflakes-python2/" -i Makefile
}
build() {
- cd "$srcdir"/pycurl-$pkgver
+ cd pycurl-$pkgver
make
python3 setup.py build
-
- cd "$srcdir"/pycurl-$pkgver-py2
- make
- python2 setup.py build
}
check() {
@@ -45,27 +32,12 @@
export PYCURL_VSFTPD_PATH=vsftpd
# We don't have HTTP2 enabled
- cd "$srcdir"/pycurl-$pkgver
+ cd pycurl-$pkgver
PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.9:$PYTHONPATH" make test || warning "Tests failed"
-
- cd "$srcdir"/pycurl-$pkgver-py2
- PYTHONPATH="$PWD/build/lib.linux-$CARCH-2.7:$PYTHONPATH" make PYTHON=python2 NOSETESTS=nosetests2 test || warning "Tests failed"
}
-package_python-pycurl() {
- pkgdesc="A Python 3.x interface to libcurl"
- depends=('python' 'curl')
-
+package() {
cd pycurl-$pkgver
python setup.py install -O1 --root="$pkgdir"
- install -D -m644 COPYING-MIT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -D -m644 COPYING-MIT -t "$pkgdir"/usr/share/licenses/$pkgname/
}
-
-package_python2-pycurl() {
- pkgdesc="A Python 2.x interface to libcurl"
- depends=('python2' 'curl')
-
- cd pycurl-$pkgver-py2
- python2 setup.py install -O1 --root="$pkgdir"
- install -D -m644 COPYING-MIT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
More information about the arch-commits
mailing list