diff options
-rw-r--r-- | main/python3/APKBUILD | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/main/python3/APKBUILD b/main/python3/APKBUILD index e974d997db..188c09c737 100644 --- a/main/python3/APKBUILD +++ b/main/python3/APKBUILD @@ -3,6 +3,7 @@ pkgname=python3 pkgver=3.5.2 +_basever="${pkgver%.*}" pkgrel=1 pkgdesc="A high-level scripting language" url="http://www.python.org" @@ -13,8 +14,7 @@ depends="" makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev xz-dev sqlite-dev libffi-dev tcl-dev linux-headers gdbm-dev readline-dev" source="http://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz" - -builddir="$srcdir"/Python-$pkgver +builddir="$srcdir/Python-$pkgver" prepare() { default_prepare || return 1 @@ -53,36 +53,31 @@ package() { || return 1 install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE - local _basever="${pkgver%.*}" ln -sf ../../libpython${_basever}m.so \ "${pkgdir}/usr/lib/python${_basever}/config-${_basever}m/libpython${_basever}m.so" } -_mv_files() { - cd "$pkgdir"/usr/lib/python${pkgver%.*} - for i in */test */tests; do - mkdir -p "$subpkgdir"/usr/lib/python${pkgver%.*}/"$i" - mv "$i"/* "$subpkgdir"/usr/lib/python${pkgver%.*}/"$i" - rm -rf "$i" - done - mv "$pkgdir"/usr/lib/python${pkgver%.*}/test \ - "$subpkgdir"/usr/lib/python${pkgver%.*} -} - dev() { + default_dev || return 1 + # pyconfig.h is needed runtime so we move it back - default_dev - mkdir -p "$pkgdir"/usr/include/python${pkgver%.*}m - mv "$subpkgdir"/usr/include/python${pkgver%.*}m/pyconfig.h \ - "$pkgdir"/usr/include/python${pkgver%.*}m/ + mkdir -p "$pkgdir"/usr/include/python${_basever}m + mv "$subpkgdir"/usr/include/python${_basever}m/pyconfig.h \ + "$pkgdir"/usr/include/python${_basever}m/ } tests() { pkgdesc="The test modules from the main python package" arch="noarch" - cd "$pkgdir" - _mv_files + cd "$pkgdir"/usr/lib/python$_basever + local i; for i in */test */tests; do + mkdir -p "$subpkgdir"/usr/lib/python$_basever/"$i" + mv "$i"/* "$subpkgdir"/usr/lib/python$_basever/"$i" + rm -rf "$i" + done + mv "$pkgdir"/usr/lib/python$_basever/test \ + "$subpkgdir"/usr/lib/python$_basever/ } md5sums="8906efbacfcdc7c3c9198aeefafd159e Python-3.5.2.tar.xz" |