Commit 96b4eeed authored by Leo's avatar Leo Committed by Natanael Copa

main/py3-requests-oauthlib: drop py2

parent c46de884
# Maintainer:
pkgname=py-requests-oauthlib
pkgname=py3-requests-oauthlib
_pkgname=requests-oauthlib
pkgver=1.0.0
pkgrel=1
pkgrel=2
pkgdesc="First-class OAuth library support for Requests"
options="!check" # Requires 'requests-mock'
url="https://pypi.python.org/pypi/requests-oauthlib"
arch="noarch"
license="BSD"
depends="py-oauthlib py-requests"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
license="ISC"
depends="python3 py3-oauthlib py3-requests"
makedepends="py3-setuptools"
checkdepends="py3-mock"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-requests-oauthlib" # Backwards compatibility
provides="py-requests-oauthlib=$pkgver-r$pkgrel" # Backwards compatibility
build() {
cd "$builddir"
python2 setup.py build || return 1
python3 setup.py build || return 1
python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
depends="${depends//py-/py2-}"
_py python2
}
_py3() {
replaces="$pkgname"
depends="${depends//py-/py3-}"
_py python3
check() {
cd "$builddir"
python3 setup.py test
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
package() {
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="b1036ca0533383dc5d6297de0cf65c9c705bbdc01b367adba94735424ac262f8e01cc2975da294af31af12c347d4a93b06ac3e18e159a45b3544aa051b2c59c8 requests-oauthlib-1.0.0.tar.gz"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment