summaryrefslogtreecommitdiff
path: root/python-distlib/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'python-distlib/PKGBUILD')
-rw-r--r--python-distlib/PKGBUILD67
1 files changed, 67 insertions, 0 deletions
diff --git a/python-distlib/PKGBUILD b/python-distlib/PKGBUILD
new file mode 100644
index 0000000..35fe3c4
--- /dev/null
+++ b/python-distlib/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer (Arch): Eli Schwartz <eschwartz@archlinux.org>
+# Maintainer: Tobias Dausend <throgh@hyperbola.info>
+# Contributor: rachad
+
+_pkgname=distlib
+pkgbase=python-distlib
+pkgname=('python-distlib' 'tauthon-distlib')
+pkgver=0.3.2
+_debver=$pkgver
+_debrel=0.1
+pkgrel=2
+pkgdesc="Low-level components of distutils2/packaging"
+arch=('i686' 'x86_64')
+url='https://bitbucket.org/pypa/distlib'
+license=('Python' 'Python-CWI' 'Python-BeOpen' 'Python-CNRI' 'Modified-BSD' 'Simplified-BSD')
+makedepends=('python' 'tauthon' 'quilt')
+source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.zip"
+ "https://deb.debian.org/debian/pool/main/d/distlib/distlib_${_debver}+really+0.3.1-${_debrel}.debian.tar.xz")
+sha512sums=('a39f8c7df9c07554769153268bae09d8abd8b59b8360d470c1bc011944936a1dcfbe34134a03eb63e377ee594e68b07c676289fbdbf53e90968f1b9cd6e7003b'
+ '6f50d6a258905c7039e58b04e588c1bc15d2df8c5288b04f7553d9de3d680fbb7ae1d7abfb49fef8d99dec3c30d5854f7e8b62840e10849579b39a61838c9cd4')
+
+prepare() {
+ cd "${srcdir}"/${_pkgname}-${pkgver}
+
+ if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
+ # Debian patches
+ export QUILT_PATCHES=debian/patches
+ export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
+ export QUILT_DIFF_ARGS='--no-timestamps'
+
+ mv "$srcdir"/debian .
+
+ # Doesn't apply
+ rm -v debian/patches/setuptools.diff || true
+
+ quilt push -av
+ fi
+
+ rm distlib/*.exe
+ cd .. && cp -a $_pkgname-$pkgver{,-tauthon}
+}
+
+build() {
+ cd "${srcdir}"/${_pkgname}-${pkgver}
+ python setup.py build
+
+ cd "${srcdir}"/${_pkgname}-${pkgver}-tauthon
+ tauthon setup.py build
+}
+
+package_python-distlib() {
+ depends=('python')
+
+ cd "${srcdir}"/${_pkgname}-${pkgver}
+ python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+
+ install -Dm644 LICENSE.txt debian/copyright -t $pkgdir/usr/share/licenses/$pkgname
+}
+
+package_tauthon-distlib() {
+ depends=('tauthon')
+
+ cd "${srcdir}"/${_pkgname}-${pkgver}-tauthon
+ tauthon setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+
+ install -Dm644 LICENSE.txt debian/copyright -t $pkgdir/usr/share/licenses/$pkgname
+}