3 2

[alpine-aports] [PATCH 1/3] New aport: testing/py-sh

Marian Buschsieweke
Details
Message ID
<20181016140333.14793-1-marian.buschsieweke@ovgu.de>
Sender timestamp
1539698611
DKIM signature
missing
Download raw message
Patch: +51 -0
Call any program from python as if it were a function
https://github.com/amoffat/sh
---
 testing/py-sh/APKBUILD | 51 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 testing/py-sh/APKBUILD

diff --git a/testing/py-sh/APKBUILD b/testing/py-sh/APKBUILD
new file mode 100644
index 0000000000..9a6c7cf5a4
--- /dev/null
+++ b/testing/py-sh/APKBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
+pkgname=py-sh
+_pkgname="${pkgname#py-}"
+pkgver=1.12.14
+pkgrel=0
+pkgdesc="Call any program from python as if it were a function"
+url="https://github.com/amoffat/sh"
+arch="noarch"
+license="MIT"
+makedepends="py-setuptools python2-dev python3-dev"
+# Units rely on peculiarities of the "real" core utils
+checkdepends="py-coverage coreutils"
+subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/amoffat/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$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"
+}
+
+check() {
+	cd "$builddir"
+	python2 setup.py test
+	python3 setup.py test
+}
+
+sha512sums="a20abed5c84430e413c885eb616e69c66b2f9487c49b483ef4f7af6af01954b5ca9da0e6bdf6d1fc0cf97efbc84721fafef0a1e0e2d0c39756a3d4ef2612f64a  sh-1.12.14.tar.gz"
-- 
2.19.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 2/3] New aport: testing/py-dotenv

Marian Buschsieweke
Details
Message ID
<20181016140333.14793-2-marian.buschsieweke@ovgu.de>
In-Reply-To
<20181016140333.14793-1-marian.buschsieweke@ovgu.de> (view parent)
Sender timestamp
1539698612
DKIM signature
missing
Download raw message
Patch: +52 -0
Get and set values in your .env file in local and production servers
https://github.com/theskumar/python-dotenv
---
 testing/py-dotenv/APKBUILD | 52 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 testing/py-dotenv/APKBUILD

diff --git a/testing/py-dotenv/APKBUILD b/testing/py-dotenv/APKBUILD
new file mode 100644
index 0000000000..5d03271311
--- /dev/null
+++ b/testing/py-dotenv/APKBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
+pkgname=py-dotenv
+_pkgname="python-${pkgname#py-}"
+pkgver=0.9.1
+pkgrel=0
+pkgdesc="Get and set values in your .env file in local and production servers"
+url="https://github.com/theskumar/python-dotenv"
+arch="noarch"
+license="BSD-3-Clause"
+makedepends="py-setuptools python2-dev python3-dev"
+checkdepends="pytest py-sh ipython"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/theskumar/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$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"
+}
+
+check() {
+	cd "$builddir"
+	# Python2 test requires ipython version for Python2, which is not packed
+	# yet. The motivation to package it for an obsolete version of Python is not
+	# big enough.
+	python3 setup.py test
+}
+
+sha512sums="11f5f3f07b7673d2c78cb0d73594a640789b0cb973c0b5326a317cd4e8cec062f1d2a513b9acd119679d64b9ed6c6812715c23766e41a0f8b40721bfce1aacda  python-dotenv-0.9.1.tar.gz"
-- 
2.19.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 3/3] testing/ampy: Update to version 1.0.5

Marian Buschsieweke
Details
Message ID
<20181016140333.14793-3-marian.buschsieweke@ovgu.de>
In-Reply-To
<20181016140333.14793-1-marian.buschsieweke@ovgu.de> (view parent)
Sender timestamp
1539698613
DKIM signature
missing
Download raw message
Patch: +6 -7
---
 testing/ampy/APKBUILD | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/testing/ampy/APKBUILD b/testing/ampy/APKBUILD
index 6298668ce5..6752037b35 100644
--- a/testing/ampy/APKBUILD
+++ b/testing/ampy/APKBUILD
@@ -1,19 +1,18 @@
 # Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
 pkgname=ampy
-pkgver=0.20171212
+pkgver=1.0.5
 pkgrel=0
 pkgdesc="Utility to interact with a MicroPython board over a serial connection"
 url="https://github.com/adafruit/ampy"
 arch="noarch"
 license="MIT"
-depends="python3 py3-serial py3-click py-setuptools"
-makedepends="python3-dev"
+depends="python3 py3-serial py3-click py3-dotenv"
+makedepends="python3-dev py-setuptools"
 install=""
 subpackages="$pkgname-doc"
-_commit="d3df5f57398c581f8a6c1b930b740fd7060e6833"
-source="https://github.com/adafruit/${pkgname}/archive/${_commit}/master.tar.gz"
+source="${pkgname}-${pkgver}.tar.gz::https://github.com/adafruit/${pkgname}/archive/${pkgver}.tar.gz"
 
-builddir="${srcdir}/${pkgname}-${_commit}"
+builddir="${srcdir}/${pkgname}-${pkgver}"
 
 prepare() {
 	cd "$builddir"
@@ -35,4 +34,4 @@ package() {
 		"$pkgdir"/usr/share/doc/$pkgname/ || return 1
 }
 
-sha512sums="b075745030e924be6bc0eb83fbb2960f27932dd44399a8fe6ce1e54bfbb2bdeba9c159db1add337023327a86ca3808479873afc92ff99b9c024e244cb53bafd5  master.tar.gz"
+sha512sums="e20adc957db6756352faa221ad33633d2550784734c25dae6f10aca217f9a4f2ba07a563ed70aebc158efa60d8295f1df4fd81e9be1487043474fc82a09e4856  ampy-1.0.5.tar.gz"
-- 
2.19.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Leonardo Arena
Details
Message ID
<CAGG_d8DV6A0JRgRU4gnzztNKBP6busfSSW_7euYJ1mxAhRLMTA@mail.gmail.com>
In-Reply-To
<20181016140333.14793-1-marian.buschsieweke@ovgu.de> (view parent)
Sender timestamp
1539853549
DKIM signature
missing
Download raw message
Hi,

On Tue, Oct 16, 2018 at 4:03 PM Marian Buschsieweke <
marian.buschsieweke@ovgu.de> wrote:

> Call any program from python as if it were a function
> https://github.com/amoffat/sh
> ---
>  testing/py-sh/APKBUILD | 51 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 51 insertions(+)
>  create mode 100644 testing/py-sh/APKBUILD
>


it fails for me with:


======================================================================
FAIL: test_no_fd_leak (test.MiscTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/larena/aports/testing/py-sh/src/sh-1.12.14/test.py", line
2715, in test_no_fd_leak
    self.assertEqual(baseline, num_fds)
AssertionError: 920 != 919

----------------------------------------------------------------------
Ran 156 tests in 38.952s

FAILED (failures=1, skipped=3)
Test failed: <unittest.runner.TextTestResult run=156 errors=0 failures=1>
error: Test failed: <unittest.runner.TextTestResult run=156 errors=0
failures=1>


Thanks!

/eo