Subject: [alpine-aports] [PATCH] testing/pygal: New aport

From: Marian Buschsieweke <[email-masked]>
Date: Wed, 2 May 2018 16:52:22 +0200

pygal is a dynamic SVG charting library written in python
https://pygal.org
---
 testing/pygal/APKBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 testing/pygal/APKBUILD

diff --git a/testing/pygal/APKBUILD b/testing/pygal/APKBUILD
new file mode 100644
index 0000000000..e459f22ec6
--- /dev/null
+++ b/testing/pygal/APKBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Marian Buschsieweke <[email-masked]>
+pkgname=pygal
+pkgver=2.4.0
+pkgrel=0
+pkgdesc="pygal is a dynamic SVG charting library written in python"
+url="https://pygal.org"
+arch="noarch"
+license="LGPL3"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname}:_py2 py3-${pkgname}:_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 || return 1
+	python3 setup.py build || return 1
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	_py python2
+}
+
+_py3() {
+	_py python3
+}
+
+_py() {
+	local python="$1"
+	pkgdesc="$pkgdesc (for $python)"
+	depends="$depends $python"
+	install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+	cd "$builddir"
+	$python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="5cb95ca5c0cf74ae476953f3503154a305a0b5e42c69191b0b46f6e6cfea8c806713fe175329a69b393654d055997b2063cf3b641e91009a2b7bef219bb49ddb  pygal-2.4.0.tar.gz"
-- 
2.17.0

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

---

From: Leonardo Arena <[email-masked]>
Date: Wed, 30 May 2018 15:35:04 +0200

Hi,

please see some comments below.

> +++ b/testing/pygal/APKBUILD

I think we should call it "py-gal" regardless of the actual upstream name,
for the sake of naming consistency of all pyhon packages.

> +       python3 setup.py build || return 1

"|| return 1" can be omitted

Thanks!

/eo

---

From: Marian Buschsieweke <[email-masked]>
Date: Wed, 30 May 2018 16:34:17 +0200

Hi,

thanks for the feedback. I attached the fixed patch.

Kind regards,
Marian

-------------------------------------------------------------
M.Sc. Marian Buschsieweke
Dept. Communication and Networked Systems (ComSys)
Institute for Intelligent Cooperating Systems (IKS)
Otto-von-Guericke-University of Magdeburg
Universitätsplatz 2, Building 29, Room 314
39106 Magdeburg
Germany

http://www.comsys.ovgu.de/Team/Marian+Buschsieweke.html
Tel.: +49 - 391 - 67 - 52673
Fax:  +49 - 391 - 67 - 41161

-------------------------------------------------------------

On Wed, 30 May 2018 15:35:04 +0200

> "|| return 1" can be omitted

From 14b81a20e7d7a527bf45742f7ff62ff24e0e4bd7 Mon Sep 17 00:00:00 2001
From: Marian Buschsieweke <[email-masked]>
Date: Wed, 30 May 2018 16:32:16 +0200
Subject: [PATCH] testing/pygal: New aport

pygal is a dynamic SVG charting library written in python
https://pygal.org
---
 testing/py-gal/APKBUILD | 43 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 testing/py-gal/APKBUILD

diff --git a/testing/py-gal/APKBUILD b/testing/py-gal/APKBUILD
new file mode 100644
index 0000000000..6d13d20502
--- /dev/null
+++ b/testing/py-gal/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Marian Buschsieweke <[email-masked]>
+pkgname=py-gal
+_realname=pygal
+pkgver=2.4.0
+pkgrel=0
+pkgdesc="pygal is a dynamic SVG charting library written in python"
+url="https://pygal.org"
+arch="noarch"
+license="LGPL3"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_realname:0:1}/$_realname/$_realname-$pkgver.tar.gz"
+builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	python3 setup.py build
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	_py python2
+}
+
+_py3() {
+	_py python3
+}
+
+_py() {
+	local python="$1"
+	pkgdesc="$pkgdesc (for $python)"
+	depends="$depends $python"
+	install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+	cd "$builddir"
+	$python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="5cb95ca5c0cf74ae476953f3503154a305a0b5e42c69191b0b46f6e6cfea8c806713fe175329a69b393654d055997b2063cf3b641e91009a2b7bef219bb49ddb  pygal-2.4.0.tar.gz"
-- 
2.17.0

---

From: Leonardo Arena <[email-masked]>
Date: Mon, 15 Oct 2018 08:40:24 +0200

Hi,

applied with further modifications.

> thanks for the feedback. I attached the fixed patch.

Looking at other packages whose name start with "py", I kept the "py" in
the name and added the prefix "py-".
So the package name is actually py-pygal.

> > > +pkgdesc="pygal is a dynamic SVG charting library written in python"

Fixed license ID.

> > > +source="
> https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$
> > > pkgname/$pkgname-$pkgver.tar.gz"

Disabled tests since there aren't any.

 Thanks

/eo