summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlester2014-08-27 01:28:53 +0800
committerlester2014-08-27 01:28:53 +0800
commitadeefea63befb1110becf7a478925c8f6f4c0a64 (patch)
tree90730e6072f3b578759633cd87a58742e1bcdb49
parent9b25c02d76c562d3b8e2e8b4c49a32c0f794adbb (diff)
downloadaur-adeefea63befb1110becf7a478925c8f6f4c0a64.tar.gz
Build first the library before packaging
Fixes the import error when using Python 3.
-rw-r--r--PKGBUILD12
1 files changed, 11 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 82197547bd65..be334a5eb2dd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,10 +18,20 @@ pkgver() {
git describe --tags --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g;s/^V//'
}
+build() {
+ for pybin in python python2; do
+ _dir="${srcdir}/${pybin}-${_pkgname}-${pkgver}"
+ mkdir -p "${_dir}"
+ cd "${_dir}"
+ cp -r "${srcdir}/${_pkgname}-${pkgver}"/. .
+ ${pybin} setup.py build
+ done
+}
+
_package() {
pybin=$1
depends=(${pybin})
- cd "${srcdir}/${_pkgname}"
+ cd "${srcdir}/${pybin}-${_pkgname}-${pkgver}"
${pybin} setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}