aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-markupsafe
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-10-01 23:00:42 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-10-01 23:14:16 +0200
commit00af055fb923409c52ba1ba0410237aa11804b3e (patch)
treeeefcf0219115f3e9f3fae171ec0c7bb9eb63ecf2 /main/py-markupsafe
parent452dcc9276bc0258072bade7435e5c40c9a1471c (diff)
downloadaports-00af055fb923409c52ba1ba0410237aa11804b3e.tar.bz2
aports-00af055fb923409c52ba1ba0410237aa11804b3e.tar.xz
main/py-markupsafe: improve abuild and remove useless -dev subpkg
Diffstat (limited to 'main/py-markupsafe')
-rw-r--r--main/py-markupsafe/APKBUILD31
1 files changed, 13 insertions, 18 deletions
diff --git a/main/py-markupsafe/APKBUILD b/main/py-markupsafe/APKBUILD
index 3a4b66f043..83be40c134 100644
--- a/main/py-markupsafe/APKBUILD
+++ b/main/py-markupsafe/APKBUILD
@@ -3,46 +3,41 @@
pkgname=py-markupsafe
_pkgname=MarkupSafe
pkgver=0.23
-pkgrel=2
+pkgrel=3
pkgdesc="Implements a XML/HTML/XHTML Markup safe string"
url="https://github.com/mitsuhiko/markupsafe"
arch="noarch"
license="BSD"
depends=""
-depends_dev=""
-makedepends="python-dev python3-dev py-setuptools"
-install=""
-subpackages="$pkgname-dev py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-
-builddir="$srcdir"/$_pkgname-$pkgver
+builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
- python setup.py build || return 1
- python3 setup.py build || return 1
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$builddir"
- python setup.py install --root=$pkgdir/ --optimize=1 || return 1
- python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1
+ mkdir -p "$pkgdir"
}
_py() {
- local python=$1
- pkgdesc="$pkgdesc - $python"
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
arch="all"
install_if="$pkgname=$pkgver-r$pkgrel $python"
- local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))')
- mkdir -p "$subpkgdir"${dir}
- mv "$pkgdir"${dir}/* "$subpkgdir"${dir}
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir" || return 1
+ find "$subpkgdir" -name "*.c" -delete
}
_py2() {
- _py python2
replaces="$pkgname"
+ _py python2
}
_py3() {