Commit 5c9eacbd authored by A. Klitzing's avatar A. Klitzing Committed by Natanael Copa

main/py-gflags: upgrade to 3.1.1

* Modernize abuild
* Add support for python3
parent e2335ad9
# Maintainer: Peter Bui <pnutzh4x0r@gmail.com>
pkgname=py-gflags
pkgver=2.0
pkgrel=1
_pkgname=python-gflags
pkgver=3.1.1
pkgrel=0
pkgdesc="Commandline flags module for Python"
url="http://code.google.com/p/python-gflags"
url="https://github.com/google/python-gflags"
arch="noarch"
license="BSD"
depends="python2"
depends_dev=""
makedepends="python2-dev py-setuptools"
install=""
subpackages=""
source="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/python-gflags/python-gflags-$pkgver.tar.gz"
_builddir="$srcdir"/python-gflags-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
makedepends="python2-dev py-setuptools python3"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="https://github.com/google/$_pkgname/releases/download/$pkgver/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
cd "$_builddir"
cd "$builddir"
python2 setup.py build || return 1
python3 setup.py build || return 1
}
package() {
cd "$_builddir"
python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
mkdir -p "$pkgdir"
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
}
md5sums="c3ab70218dbf945cc32c0cd64c51d162 python-gflags-2.0.tar.gz"
sha256sums="311066217acb8cd8519a4c872cb3fe64f02bcf105802bb761ab0de55c2386cd6 python-gflags-2.0.tar.gz"
sha512sums="28566acffd092f09105f3b9ad3be4ada11f024f940914e6efb103907f3779283c63bdfe13edad83aa470c5e887b49ad8b05031fc1895f3bad9b5d9c368bbfe18 python-gflags-2.0.tar.gz"
sha512sums="28009cdc09b94b416af5237d3897d6ab516cc3b6a3eed18a31adb8c199f31a8c7d07b1d69794cb37de84b50eefbde1de57f9f0afaeac0a4747b352f4024ef12c python-gflags-3.1.1.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment