summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD49
2 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fe7c8cdad53b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = python-oauthlib2
+ pkgdesc = A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
+ pkgver = 2.1.0
+ pkgrel = 1
+ url = https://github.com/idan/oauthlib
+ arch = any
+ license = BSD
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ source = https://files.pythonhosted.org/packages/source/o/oauthlib/oauthlib-2.1.0.tar.gz
+ sha256sums = ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162
+
+pkgname = python-oauthlib2
+ depends = python-cryptography
+ conflicts = python-oauthlib
+
+pkgname = python2-oauthlib2
+ depends = python2-cryptography
+ conflicts = python2-oauthlib
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..17662d6274f0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Tommy Li <ttoo74@gmail.com>
+# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+
+pkgbase=python-oauthlib2
+pkgname=(python-oauthlib2 python2-oauthlib2)
+pkgver=2.1.0
+pkgrel=1
+_libname=oauthlib
+pkgdesc="A generic, spec-compliant, thorough implementation of the OAuth request-signing logic"
+arch=(any)
+url="https://github.com/idan/oauthlib"
+license=('BSD')
+source=(https://files.pythonhosted.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz)
+makedepends=(python-setuptools python2-setuptools)
+sha256sums=('ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162')
+
+build() {
+ cd "$srcdir/$_libname-$pkgver"
+
+ rm -rf ../buildpy3; mkdir ../buildpy3
+ python setup.py build -b ../buildpy3
+
+ rm -rf ../buildpy2; mkdir ../buildpy2
+ python2 setup.py build -b ../buildpy2
+}
+
+package_python-oauthlib2() {
+ depends=(python-cryptography)
+ conflicts=(python-oauthlib)
+
+ cd "$srcdir/$_libname-$pkgver"
+ rm -rf build; ln -s ../buildpy3 build
+ python setup.py install --skip-build -O1 --root="$pkgdir"
+ install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ chmod -R a+r "$pkgdir/usr/lib"
+}
+
+package_python2-oauthlib2() {
+ depends=(python2-cryptography)
+ conflicts=(python2-oauthlib)
+
+ cd "$srcdir/$_libname-$pkgver"
+ rm -rf build; ln -s ../buildpy2 build
+ python2 setup.py install --skip-build -O1 --root="$pkgdir"
+ install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ chmod -R a+r "$pkgdir/usr/lib"
+}