diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-23 10:52:27 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-23 10:52:27 +0000 |
commit | bb160bb259b96da87176aa01213e1a75306069ae (patch) | |
tree | 24006feb1e93bf5de2f2247c181efba6556c442a /community/py-greenlet | |
parent | bf9d181f3de29031973b61ebea07586c3139588c (diff) | |
download | aports-bb160bb259b96da87176aa01213e1a75306069ae.tar.bz2 aports-bb160bb259b96da87176aa01213e1a75306069ae.tar.xz |
community/py-greenlet: moved from testing, added python3 support, added py2/py3 subpackages
Diffstat (limited to 'community/py-greenlet')
-rw-r--r-- | community/py-greenlet/APKBUILD | 50 | ||||
-rw-r--r-- | community/py-greenlet/gcc-4.8-bugfix.patch | 16 |
2 files changed, 66 insertions, 0 deletions
diff --git a/community/py-greenlet/APKBUILD b/community/py-greenlet/APKBUILD new file mode 100644 index 0000000000..b60688fda4 --- /dev/null +++ b/community/py-greenlet/APKBUILD @@ -0,0 +1,50 @@ +# Maintainer: Elizabeth Jennifer Myers <elizabeth@sporksirc.net> +# Contributor: Elizabeth Jennifer Myers <elizabeth@sporksirc.net> +pkgname=py-greenlet +_pkgname=greenlet +pkgver=0.4.10 +pkgrel=1 +pkgdesc="Lightweight in-process concurrent programming" +url="http://pypi.python.org/pypi/greenlet" +arch="noarch" +license="MIT" +depends="" +makedepends="python2-dev py-setuptools python3-dev" +subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip" + +builddir="$srcdir"/$_pkgname-$pkgver + +build() { + cd "$builddir" + export CFLAGS="-O0" CPPFLAGS="-O0" CXXFLAGS="-O0" + python2 setup.py build || return 1 + python3 setup.py build || return 1 +} + +package() { + mkdir -p "$pkgdir" +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + arch="all" + install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + _py python2 + replaces="$pkgname" +} + +_py3() { + _py python3 +} + + +md5sums="bed0c4b3b896702131f4d5c72f87c41d greenlet-0.4.10.zip" +sha256sums="9a98d49f63259b16d3627976b69dd856888a376c498b091c8e9ead56d5098ca8 greenlet-0.4.10.zip" +sha512sums="7fc78b14dca079f838647fd99878850cf9e83af781c985362146a11f71c5a700fbac8148273cd1c0ec4ac6ead4cf5bd389e001b8fc1225e87e9b51919d7ecc6c greenlet-0.4.10.zip" diff --git a/community/py-greenlet/gcc-4.8-bugfix.patch b/community/py-greenlet/gcc-4.8-bugfix.patch new file mode 100644 index 0000000000..1526f3eb18 --- /dev/null +++ b/community/py-greenlet/gcc-4.8-bugfix.patch @@ -0,0 +1,16 @@ +--- greenlet-0.4.0.orig/setup.py ++++ greenlet-0.4.0/setup.py +@@ -2,12 +2,7 @@ + + import sys, os, glob, platform + +-# workaround segfaults on openbsd and RHEL 3 / CentOS 3 . see +-# https://bitbucket.org/ambroff/greenlet/issue/11/segfault-on-openbsd-i386 +-# https://github.com/python-greenlet/greenlet/issues/4 +-if ((sys.platform == "openbsd4" and os.uname()[-1] == "i386") +- or ("-with-redhat-3." in platform.platform() and platform.machine() == 'i686')): +- os.environ["CFLAGS"] = ("%s %s" % (os.environ.get("CFLAGS", ""), "-Os")).lstrip() ++os.environ['CFLAGS'] = '-O0' + + try: + if not (sys.modules.get("setuptools") |