aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-sip/APKBUILD
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-08 07:42:10 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-08 10:40:39 -0300
commitce78abdb30219cbacfe6c3dcaae4a5ff92f4278f (patch)
tree8fde50dec207c48c142eb138d9d209ba3b9fdf92 /community/py3-sip/APKBUILD
parent65c5673cf5268b618151a320ebf5e3acfcd7d820 (diff)
community/py3-sip: drop py2
Diffstat (limited to 'community/py3-sip/APKBUILD')
-rw-r--r--community/py3-sip/APKBUILD80
1 files changed, 26 insertions, 54 deletions
diff --git a/community/py3-sip/APKBUILD b/community/py3-sip/APKBUILD
index 782dc6704bb..6b5ed7661ad 100644
--- a/community/py3-sip/APKBUILD
+++ b/community/py3-sip/APKBUILD
@@ -1,39 +1,32 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
-pkgname=py-sip
+pkgname=py3-sip
_pkgname=sip
pkgver=4.19.18
-pkgrel=1
+pkgrel=2
pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries"
+options="!check" # No testsuite
url="http://www.riverbankcomputing.com/software/sip/"
arch="all"
license="custom:sip"
-makedepends="python2-dev python3-dev"
+makedepends="python3-dev"
subpackages="
- py2-${pkgname#py-}:_py2
- py2-${pkgname#py-}-pyqt5:_py2qt5
- py3-${pkgname#py-}:_py3
- py3-${pkgname#py-}-pyqt5:_py3qt5
- $pkgname-dev:_dev:noarch
+ $pkgname-pyqt5
+ $pkgname-dev::noarch
$pkgname-doc"
-source="https://www.riverbankcomputing.com/static/Downloads/${_pkgname}/$pkgver/${_pkgname}-$pkgver.tar.gz"
+source="https://www.riverbankcomputing.com/static/Downloads/$_pkgname/$pkgver/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
+replaces="py-sip" # Backwards comptibility
+provides="py-sip=$pkgver-r$pkgrel" # Backwards comptibility
+
prepare() {
default_prepare
- mkdir -p "$srcdir"/python2-sip
mkdir -p "$srcdir"/python3-sip
- mkdir -p "$srcdir"/python2-PyQt5.sip
mkdir -p "$srcdir"/python3-PyQt5.sip
}
build() {
- cd "$srcdir"/python2-sip
- python2 "$builddir"/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS"
-
- cd "$srcdir"/python2-PyQt5.sip
- python2 "$builddir"/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS" --sip-module PyQt5.sip --no-tools
-
cd "$srcdir"/python3-sip
python3 "$builddir"/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS"
@@ -42,52 +35,31 @@ build() {
}
package() {
- install -Dm644 "$builddir"/LICENSE "${pkgdir}"/usr/share/licenses/custom/${pkgname}/LICENSE
-}
-
-_py2() {
- replaces="$pkgname"
- _py python2 sip
-}
-
-_py3() {
- _py python3 sip
-}
+ cd "$srcdir"/python3-sip
+ make DESTDIR="$pkgdir" install
-_py2qt5() {
- _py python2 PyQt5.sip
-}
+ # Move sip.h to /usr/include
+ mv "$pkgdir"/usr/include/python3*/sip.h "$pkgdir"/usr/include/sip.h
+ rm -rf "$pkgdir"/usr/include/python3*
-_py3qt5() {
- _py python3 PyQt5.sip
+ install -Dm644 "$builddir"/LICENSE "$pkgdir"/usr/share/licenses/custom/$pkgname/LICENSE
}
-_py() {
- local python="$1" module="$2"
- pkgdesc="$python SIP bindings for C and C++ libraries"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
-
- cd "$srcdir/$python-$module"
+pyqt5() {
+ pkgdesc="Python3 SIP bindings for C and C++ libraries"
- make DESTDIR="$pkgdir" install
-
- if [ "$module" = "sip" ]; then
- # Conflicts with py-sip-dev
- rm -r "$pkgdir"/usr/bin
- rm -r "$pkgdir"/usr/include
- fi
+ replaces="" # Reset
+ provides="" # Reset
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/${python}.* "$subpkgdir"/usr/lib/
+ cd "$srcdir"/python3-PyQt5.sip
+ make DESTDIR="$subpkgdir" install
}
-_dev() {
- cd "$srcdir"/python3-sip
- make DESTDIR="$pkgdir" install -C sipgen
- mv "$pkgdir"/usr/include/python*/sip.h "$pkgdir"/usr/include
- rm -r "$pkgdir"/usr/include/python*
+dev() {
+ replaces="py-sip-dev" # Backwards compatibility
+ provides="py-sip-dev=$pkgver-r$pkgrel" # Backwards compatibility
- depends_dev="py-sip" # Depend on the package that provides the sip binary
+ depends_dev="py3-sip" # Depend on the package that provides the sip binary
default_dev
}