Subject: [alpine-aports] [PATCH 0/6] testing/syncplay: new aport

From: Drew DeVault <[email-masked]>
Date: Mon, 15 Jan 2018 19:23:22 -0500

This patch series adds the dependencies required for syncplay, and
syncplay itself. Also includes a necessary update to Twisted.

Drew DeVault (6):
  testing/shiboken: new aport
  testing/py-pyside: new aport
  testing/syncplay: new aport
  testing/py-incremental: new aport
  testing/py-constantly: new aport
  main/twisted: add constantly, incremental to deps

 main/py-twisted/APKBUILD          |  2 +-
 testing/py-constantly/APKBUILD    | 49 ++++++++++++++++++++++++
 testing/py-incremental/APKBUILD   | 49 ++++++++++++++++++++++++
 testing/py-pyside/APKBUILD        | 74 +++++++++++++++++++++++++++++++++++++
 testing/shiboken/APKBUILD         | 78 +++++++++++++++++++++++++++++++++++++++
 testing/shiboken/python-3.6.patch | 11 ++++++
 testing/syncplay/APKBUILD         | 23 ++++++++++++
 7 files changed, 285 insertions(+), 1 deletion(-)
 create mode 100644 testing/py-constantly/APKBUILD
 create mode 100644 testing/py-incremental/APKBUILD
 create mode 100644 testing/py-pyside/APKBUILD
 create mode 100644 testing/shiboken/APKBUILD
 create mode 100644 testing/shiboken/python-3.6.patch
 create mode 100644 testing/syncplay/APKBUILD

-- 
2.15.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 15 Jan 2018 19:23:24 -0500

---
 testing/py-pyside/APKBUILD | 74 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 testing/py-pyside/APKBUILD

diff --git a/testing/py-pyside/APKBUILD b/testing/py-pyside/APKBUILD
new file mode 100644
index 0000000000..2aa25f8210
--- /dev/null
+++ b/testing/py-pyside/APKBUILD
@@ -0,0 +1,74 @@
+# Maintainer: Drew DeVault <[email-masked]>
+pkgname=py-pyside
+_pkgname=PySide
+pkgver=1.2.4
+pkgrel=0
+pkgdesc="Provides LGPL Qt bindings for Python and related tools for binding generation"
+url="https://wiki.qt.io/PySide"
+arch="all"
+license="LGPL"
+makedepends="
+	cmake python2-dev python3-dev qt-dev py2-shiboken py3-shiboken phonon-dev
+"
+source="$_pkgname-$pkgver.tar.gz::https://pypi.python.org/packages/source/P/PySide/PySide-$pkgver.tar.gz"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+builddir="$srcdir/${_pkgname}-${pkgver}"
+
+build() {
+	cd "$builddir"
+	python2 setup.py egg_info
+	mkdir -p build-py2 build-py3
+	cd build-py3
+	cmake "$builddir"/sources/pyside/ \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DCMAKE_BUILD_TYPE=Release
+	make -j8
+	cd ../build-py2
+	cmake "$builddir"/sources/pyside/ \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DCMAKE_BUILD_TYPE=Release \
+		-DPYTHON_SUFFIX=-python2.7
+	make -j8
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	depends="qt python2 py2-shiboken"
+
+	cd "$builddir/build-py2"
+    make DESTDIR="$subpkgdir" install
+
+	cp -r "$srcdir/PySide-$pkgver/pyside_package/PySide.egg-info" \
+      "$subpkgdir/usr/lib/python2.7/site-packages/pyside-$pkgver-py2.7.egg-info"
+    mv "$subpkgdir"/usr/lib/pkgconfig/pyside.pc \
+      "$subpkgdir"/usr/lib/pkgconfig/pyside-py2.pc
+    sed -i 's#^Requires: shiboken$#Requires: shiboken-py2#' \
+		"$subpkgdir"/usr/lib/pkgconfig/pyside-py2.pc
+
+    rm -rf "$subpkgdir"/usr/include
+    rm -rf "$subpkgdir"/usr/share
+    rm "$subpkgdir"/usr/lib/cmake/PySide-$pkgver/PySideConfig.cmake
+    rm "$subpkgdir"/usr/lib/cmake/PySide-$pkgver/PySideConfigVersion.cmake
+}
+
+_py3() {
+	depends="qt python3 py3-shiboken"
+
+	cd "$builddir/build-py3"
+    make DESTDIR="$subpkgdir" install
+
+    cp -r "$srcdir/PySide-$pkgver/pyside_package/PySide.egg-info" \
+      "$subpkgdir/usr/lib/python3.6/site-packages/pyside-$pkgver-py3.6.egg-info"
+    mv "$subpkgdir"/usr/lib/pkgconfig/pyside.pc \
+      "$subpkgdir"/usr/lib/pkgconfig/pyside-py3.pc
+
+    rm -rf "$subpkgdir"/usr/include
+    rm -rf "$subpkgdir"/usr/share
+    rm "$subpkgdir"/usr/lib/cmake/PySide-$pkgver/PySideConfig.cmake
+    rm "$subpkgdir"/usr/lib/cmake/PySide-$pkgver/PySideConfigVersion.cmake
+}
+
+sha512sums="17debaf9bb5b1ede27fa767dcde044b42c0b3d287596572233218aadd1ed4f861ac4dd0538cf2a75e1c31a07190b8292eb9ad25c2d6aba187a46206d7fd3e618  PySide-1.2.4.tar.gz"
-- 
2.15.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 15 Jan 2018 19:23:25 -0500

---
 testing/syncplay/APKBUILD | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 testing/syncplay/APKBUILD

diff --git a/testing/syncplay/APKBUILD b/testing/syncplay/APKBUILD
new file mode 100644
index 0000000000..b135969bf9
--- /dev/null
+++ b/testing/syncplay/APKBUILD
@@ -0,0 +1,23 @@
+# Maintainer: Drew DeVault <[email-masked]>
+pkgname=syncplay
+pkgver=1.5.1
+pkgrel=0
+pkgdesc="Free software that synchronises media players so that faraway friends can watch videos together."
+url="http://syncplay.pl"
+arch="noarch"
+license="Apache-2"
+depends="python2 py-twisted py2-pyside"
+source="$pkgname-$pkgver.tar.gz::https://github.com/Syncplay/syncplay/archive/v${pkgver}.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+package() {
+	cd "$builddir"
+	make DESTDIR="$pkgdir" install
+}
+
+check() {
+    cd "$builddir"
+    ./syncplayClient.py --version
+}
+
+sha512sums="8d7f99132b49148003dcdc83b5afc3158ebd7ad0b8a161229f8f576e7683e3c432d09793db071239e6344490f6e08d01c9061a32556b5bce6dcd68823b47a0cf  syncplay-1.5.1.tar.gz"
-- 
2.15.0

---

---

From: Kevin Daudt <[email-masked]>
Date: Fri, 15 Mar 2019 21:10:15 +0100

> +++ b/testing/syncplay/APKBUILD

Does this support python3? Alpine prefers new aports not to rely on
python2 anymore.

> +    ./syncplayClient.py --version

Just calling --version does not suffice for a check, policy is to run
an actual test suite.

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 15 Jan 2018 19:23:26 -0500

---
 testing/py-incremental/APKBUILD | 49 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 testing/py-incremental/APKBUILD

diff --git a/testing/py-incremental/APKBUILD b/testing/py-incremental/APKBUILD
new file mode 100644
index 0000000000..bb289b3ddd
--- /dev/null
+++ b/testing/py-incremental/APKBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Drew DeVault <[email-masked]>
+pkgname=py-incremental
+_pkgname=incremental
+pkgver=17.5.0
+pkgrel=0
+pkgdesc="Incremental is a small library that versions your Python projects."
+url="https://github.com/twisted/incremental"
+arch="noarch"
+license="MIT"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	python3 setup.py build
+}
+
+check() {
+	cd "$builddir"
+	python2 setup.py check
+	python3 setup.py check
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	_py python2
+}
+
+_py3() {
+	_py python3
+}
+
+_py() {
+	local python="$1"
+	pkgdesc="$pkgdesc (for $python)"
+	depends="$python"
+	install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+	cd "$builddir"
+	$python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="91443205f7c92ec8f6502f38379c5ac2fe441435ff9490af01e5420d6bb05bb1c666dd612fc45204199a34afd533fd3de1390ca482bb554dfec7d3a22958a4bc  incremental-17.5.0.tar.gz"
-- 
2.15.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 15 Jan 2018 19:23:27 -0500

---
 testing/py-constantly/APKBUILD | 49 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 testing/py-constantly/APKBUILD

diff --git a/testing/py-constantly/APKBUILD b/testing/py-constantly/APKBUILD
new file mode 100644
index 0000000000..e80fe33f4d
--- /dev/null
+++ b/testing/py-constantly/APKBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Drew DeVault <[email-masked]>
+pkgname=py-constantly
+_pkgname=constantly
+pkgver=15.1.0
+pkgrel=0
+pkgdesc="A Python library that provides symbolic constant support."
+url="https://github.com/twisted/constantly"
+arch="noarch"
+license="MIT"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	python3 setup.py build
+}
+
+check() {
+	cd "$builddir"
+	python2 setup.py check
+	python3 setup.py check
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	_py python2
+}
+
+_py3() {
+	_py python3
+}
+
+_py() {
+	local python="$1"
+	pkgdesc="$pkgdesc (for $python)"
+	depends="$python"
+	install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+	cd "$builddir"
+	$python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="ccc6f41b0bd552d2bb5346cc9d64cd7b91a59dd30e0cf66b01e82f7e0e079c01c34bc6c66b69c5fee9d2eed35ae5455258d309e66278d708d5f576ddf2e00ac3  constantly-15.1.0.tar.gz"
-- 
2.15.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 15 Jan 2018 19:23:28 -0500

---
 main/py-twisted/APKBUILD | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/py-twisted/APKBUILD b/main/py-twisted/APKBUILD
index 24ba24e708..191dbfcad9 100644
--- a/main/py-twisted/APKBUILD
+++ b/main/py-twisted/APKBUILD
@@ -7,7 +7,7 @@ pkgdesc="Asynchronous networking framework written in Python."
 url="http://twistedmatrix.com/"
 arch="all"
 license="MIT"
-depends="py-crypto py-zope-interface"
+depends="py-crypto py-zope-interface py-constantly py-incremental"
 makedepends="python2-dev py-setuptools libtirpc-dev"
 install=""
 subpackages="$pkgname-doc"
-- 
2.15.0

---