diff options
-rw-r--r-- | main/py-markupsafe/APKBUILD | 31 |
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() { |