From 7f40d19607a6360bb31c27620fabcc0fc82b2fc9 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 18 Jun 2018 23:00:27 +0200 Subject: [PATCH] temp/py-requests: update to 2.19.1 This fixes building the extra-cmake-modules package. --- temp/py-requests/APKBUILD | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 temp/py-requests/APKBUILD diff --git a/temp/py-requests/APKBUILD b/temp/py-requests/APKBUILD new file mode 100644 index 000000000..62e958b9c --- /dev/null +++ b/temp/py-requests/APKBUILD @@ -0,0 +1,52 @@ +# Forked from Alpine for update to 2.19.1. Without this, KDE's extra-cmake-modules +# currently does not compile. See https://github.com/alpinelinux/aports/pull/4533 +# for details. This aport can be removed, when that PR is merged. + +pkgname=py-requests +_pkgname=requests +pkgver=2.19.1 +pkgrel=0 +pkgdesc="A HTTP request library for Python" +url="http://www.python-requests.org/" +arch="noarch" +license="Apache-2.0" +# Requirements for tests are not available in main +options="!check" +depends="py-chardet py-idna py-certifi py-urllib3" +makedepends="python2-dev py-setuptools python3-dev" +subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +package() { + mkdir -p "$pkgdir" +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc ${python#python}" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + replaces="$pkgname" + depends="${depends//py-/py2-}" + _py python2 +} + +_py3() { + depends="${depends//py-/py3-}" + _py python3 +} + +sha512sums="deef2662227497b472f6e7eb7f0ee468c772069fc66552f71d80e5a12af62a187f8bc6a8a78531915e824c7f277d0db61c1534c89d13d473f68504f0bd6edf47 requests-2.19.1.tar.gz"