summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorspider-mario2017-08-17 20:40:51 +0200
committerspider-mario2017-08-17 20:43:35 +0200
commit2fd3aa9e76917e769532a4220e892da7eaad91d3 (patch)
tree80628bf5dfe307ca04bf5a3864b6f01c188a3565 /PKGBUILD
parent94024346851ffc083d84a14f3d63f587aa56aea8 (diff)
downloadaur-2fd3aa9e76917e769532a4220e892da7eaad91d3.tar.gz
1.6.8, and also build for python2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 31 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0763b3cd8ce..374b94b537b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,27 +2,48 @@
# Contributor: Jerome Leclanche <jerome@leclan.ch>
_pkgname=PuLP
-pkgname=python-${_pkgname,,}
-pkgver=1.6.2
+pkgbase=python-pulp
+pkgname=(python-pulp python2-pulp)
+pkgver=1.6.8
pkgrel=1
pkgdesc="A Linear Programming modeler written in Python"
arch=("any")
license=("BSD")
url="https://github.com/coin-or/pulp"
depends=("python-pyparsing")
-conflicts=("python2-pulp")
-source=("https://pypi.python.org/packages/c3/06/c503f803e09447416b382e5a567458db39fa67d871ff4f005ee732886557/$_pkgname-$pkgver.zip")
-sha512sums=('df7590c2ab2b0de4006bafdaf6f75a8b530aca9a1db6201c6c8dc5561137ad4200760d649cc0a6988e58d1192cf5de6f7bb4f5094868d9165cf8f7c43b8ac184')
+source=("https://files.pythonhosted.org/packages/b5/87/71293d89377341551f2f331d259c0b7e7324b60ce37c597d0a42f0ebc18d/$_pkgname-$pkgver.tar.gz")
+sha512sums=('e78b33f331144f458a585fda396b5c9d1d09e25199d29fc2de39027d6cbee74dfa3325878c77ca01164102adf22ee5bb31beea5af54500c1ad917cedb2dbf783')
+
+prepare() {
+ for _python in python python2; do
+ rm -fr $_python-pulp
+ cp -r $_pkgname-$pkgver $_python-pulp
+ done
+}
build() {
- cd "$srcdir/$_pkgname-$pkgver"
- python setup.py build
+ for _python in python python2; do
+ pushd $_python-pulp
+ $_python setup.py build
+ popd
+ done
}
-package() {
- cd "$srcdir/$_pkgname-$pkgver"
- python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build
+_package_for_python_version() {
+ _python="$1"
+
+ cd $_python-pulp
+
+ $_python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build
install --directory "$pkgdir"/usr/share/licenses/$pkgname/
install -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/
}
+
+package_python-pulp() {
+ _package_for_python_version python
+}
+
+package_python2-pulp() {
+ _package_for_python_version python2
+}