summaryrefslogtreecommitdiff
path: root/python-oauth2
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-09 11:54:04 +0200
committerErich Eckner <git@eckner.net>2017-10-09 11:54:04 +0200
commit615e485c85ef60fed4327dade9b9dd533a68ff4c (patch)
tree1aafb56bf14204aee535bf1e5d445833d84dae9a /python-oauth2
parentb49e693ad827bcaaaf81fc2226304f291111bb0d (diff)
downloadarchlinuxewe-615e485c85ef60fed4327dade9b9dd533a68ff4c.tar.xz
python-oauth2 neu
Diffstat (limited to 'python-oauth2')
-rw-r--r--python-oauth2/PKGBUILD77
1 files changed, 77 insertions, 0 deletions
diff --git a/python-oauth2/PKGBUILD b/python-oauth2/PKGBUILD
new file mode 100644
index 000000000..b2477fc58
--- /dev/null
+++ b/python-oauth2/PKGBUILD
@@ -0,0 +1,77 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+pkgbase=python-oauth2
+pkgname=(python-oauth2 python2-oauth2)
+pkgver=1.9
+pkgrel=1
+pkgdesc='library for OAuth'
+url='https://pypi.python.org/pypi/oauth2/'
+arch=('any')
+license=('MIT')
+_depends=()
+_optdepends=()
+makedepends=(
+ 'python' 'python2' 'python-setuptools' 'python2-setuptools'
+ "${_depends[@]}"
+ "${_depends[@]/python/python2}"
+)
+source=("https://github.com/joestump/python-oauth2/archive/v${pkgver}.tar.gz")
+sha512sums=('ba3183aa4e5512920fa540955321646c167d23dfd4bc2fad4d5426e1b71e35e91fe11f6cd919a7913015f9bf33c43849659cb97c862a57b5c2e288ace29ad452')
+
+prepare() {
+ cp -a python-oauth2-${pkgver}{,-py2}
+}
+
+build() {
+ msg2 "Building python..."
+ (
+ cd python-oauth2-${pkgver}
+ python setup.py build
+ )
+ msg2 "Building python2..."
+ (
+ cd python-oauth2-${pkgver}-py2
+ python2 setup.py build
+ )
+}
+
+check() {
+ msg2 "Checking python..."
+ (
+ cd python-oauth2-${pkgver}
+ python setup.py test
+ )
+ msg2 "Checking python2..."
+ (
+ cd python-oauth2-${pkgver}-py2
+ python2 setup.py test
+ )
+}
+
+package_python-oauth2() {
+ _pyVer=$(python -V 2>&1 | cut -d' ' -f2 | cut -d. -f2)
+ depends=(
+ "python>=3.${_pyVer}"
+ "python<3.$((_pyVer+1))"
+ "${_depends[@]}"
+ )
+ optdepends=("${_optdepends[@]}")
+
+ cd python-oauth2-${pkgver}
+ python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build
+ install -Dm 644 LICENSE.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}
+
+package_python2-oauth2() {
+ _pyVer=$(python2 -V 2>&1 | cut -d' ' -f2 | cut -d. -f2)
+ depends=(
+ "python2>=2.${_pyVer}"
+ "python2<2.$((_pyVer+1))"
+ "${_depends[@]}"
+ "${_depends[@]/python/python2}"
+ )
+ optdepends=("${_optdepends[@]/python/python2}")
+
+ cd python-oauth2-${pkgver}-py2
+ python2 setup.py install --prefix=/usr --root="${pkgdir}" --skip-build
+ install -Dm 644 LICENSE.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}