Skip to content
Snippets Groups Projects
Commit 64fd9f43 authored by Antonio Rojas's avatar Antonio Rojas
Browse files

Drop python2

parent 8c4d2422
No related branches found
Tags 2.0.0.post1-1
No related merge requests found
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Contributor: Atlanis <emallson@archlinux.us>
pkgbase=python-oauth2client
pkgname=('python2-oauth2client' 'python-oauth2client')
pkgname=python-oauth2client
pkgver=4.1.3
pkgrel=3
pkgrel=4
pkgdesc="A client library for OAuth 2.0"
arch=('any')
url="https://github.com/google/oauth2client"
license=('Apache')
makedepends=('python2-setuptools' 'python-setuptools' 'python-httplib2'
'python-pyasn1' 'python-pyasn1-modules' 'python-rsa'
'python-six' 'python2-httplib2' 'python2-pyasn1'
'python2-pyasn1-modules' 'python2-rsa' 'python2-six')
depends=('python-httplib2' 'python-pyasn1' 'python-pyasn1-modules' 'python-rsa' 'python-six')
optdepends=('python-gflags: for oauth2client.tools.run function')
makedepends=('python-setuptools')
source=("https://github.com/google/oauth2client/archive/v${pkgver}.tar.gz")
md5sums=('e5495da59867779d47bacf4bc4c10d86')
prepare() {
cd "$srcdir"
cp -a oauth2client-${pkgver} oauth2client-py2-${pkgver}
cd oauth2client-py2-${pkgver}
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
-i $(find . -name '*.py')
}
build() {
msg "Building Python2"
cd "$srcdir"/oauth2client-py2-${pkgver}
python2 setup.py build
msg "Building Python3"
cd "$srcdir"/oauth2client-${pkgver}
python setup.py build
}
package_python2-oauth2client() {
depends=('python2-httplib2' 'python2-pyasn1' 'python2-pyasn1-modules' 'python2-rsa' 'python2-six')
optdepends=('python2-gflags: for oauth2client.tools.run function')
cd "$srcdir"/oauth2client-py2-${pkgver}
python2 setup.py install --skip-build --root="$pkgdir" --optimize=1
}
package_python-oauth2client() {
depends=('python-httplib2' 'python-pyasn1' 'python-pyasn1-modules' 'python-rsa' 'python-six')
optdepends=('python-gflags: for oauth2client.tools.run function')
package() {
cd "$srcdir"/oauth2client-${pkgver}
python setup.py install --skip-build --root="$pkgdir" --optimize=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment