aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2019-05-06 14:14:15 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-06-07 02:44:30 -0300
commit6980872bb015d97e40f8fcfd294a75729db28277 (patch)
treeeebac0f6fcaa9055c2b7669a73e67191c06b3e99
parentccfe3c11f6243774fa64ba64623fcb52a461d37c (diff)
downloadaports-6980872bb015d97e40f8fcfd294a75729db28277.tar.bz2
aports-6980872bb015d97e40f8fcfd294a75729db28277.tar.xz
testing/py3-graphviz: rename from py-graphviz
-rw-r--r--testing/py-graphviz/APKBUILD55
-rw-r--r--testing/py3-graphviz/APKBUILD30
2 files changed, 30 insertions, 55 deletions
diff --git a/testing/py-graphviz/APKBUILD b/testing/py-graphviz/APKBUILD
deleted file mode 100644
index 7d1e0095d1..0000000000
--- a/testing/py-graphviz/APKBUILD
+++ /dev/null
@@ -1,55 +0,0 @@
-# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
-# Maintainer:
-pkgname=py-graphviz
-pkgver=0.10.1
-pkgrel=1
-pkgdesc="Simple interface for Graphviz"
-url="https://github.com/xflr6/graphviz"
-arch="noarch"
-license="MIT"
-depends="graphviz"
-makedepends="python2-dev python3-dev py-setuptools"
-checkdepends="pytest pytest-cov py-mock pytest-mock"
-subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
-source="$pkgname-$pkgver.tar.gz::https://github.com/xflr6/graphviz/archive/$pkgver.tar.gz"
-builddir="$srcdir"/graphviz-$pkgver
-
-build() {
- cd "$builddir"
- python2 setup.py --quiet build
- python3 setup.py --quiet build
-}
-
-check() {
- cd "$builddir"
- python2 run-tests.py
- python3 run-tests.py
-}
-
-package() {
- cd "$builddir"
- mkdir -p "$pkgdir"/usr/bin
-}
-
-_py2() {
- depends="${depends//py-/py2-}"
- _py python2
-}
-
-_py3() {
- depends="${depends//py-/py3-}"
- _py python3
-}
-
-_py() {
- local python="$1"
- local pyver="${1:6:1}"
- pkgdesc="$pkgdesc (for $python)"
- depends="$depends $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
-
- cd "$builddir"
- $python setup.py --quiet install --prefix=/usr --root="$subpkgdir"
-}
-
-sha512sums="bbc41d22c0d20a1e93e7adf89a32e60e227b77892478c81b9df1d25ecbb5c00a92911604c8959184aa3b0e02cf33446610ae6d05840bced0e528658c9edb2cb0 py-graphviz-0.10.1.tar.gz"
diff --git a/testing/py3-graphviz/APKBUILD b/testing/py3-graphviz/APKBUILD
new file mode 100644
index 0000000000..1514010370
--- /dev/null
+++ b/testing/py3-graphviz/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=py3-graphviz
+pkgver=0.10.1
+pkgrel=2
+pkgdesc="Simple interface for Graphviz"
+url="https://github.com/xflr6/graphviz"
+arch="noarch"
+license="MIT"
+replaces="py-graphviz" # for backwards compatibility
+provides="py-graphviz=$pkgver-r$pkgrel" # for backwards compatibility
+depends="graphviz"
+makedepends="py3-setuptools"
+checkdepends="pytest py3-pytest-cov py3-mock py3-pytest-mock"
+source="$pkgname-$pkgver.tar.gz::https://github.com/xflr6/graphviz/archive/$pkgver.tar.gz"
+builddir="$srcdir"/graphviz-$pkgver
+
+build() {
+ python3 setup.py --quiet build
+}
+
+check() {
+ PYTHONPATH=. python3 run-tests.py
+}
+
+package() {
+ python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="bbc41d22c0d20a1e93e7adf89a32e60e227b77892478c81b9df1d25ecbb5c00a92911604c8959184aa3b0e02cf33446610ae6d05840bced0e528658c9edb2cb0 py3-graphviz-0.10.1.tar.gz"