X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mailauth4.nine.ch (mailauth4.nine.ch [94.230.211.190]) by lists.alpinelinux.org (Postfix) with ESMTP id 72DAB5C5649 for ; Mon, 18 Sep 2017 17:43:31 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mailauth4.nine.ch (Postfix) with ESMTP id 02C11BFD3E; Mon, 18 Sep 2017 19:43:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mailauth4.nine.ch X-Spam-Flag: NO X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-0.999 tagged_above=-999 required=5.6 tests=[ALL_TRUSTED=-1, HEADER_FROM_DIFFERENT_DOMAINS=0.001] autolearn=disabled Received: from mailauth4.nine.ch ([127.0.0.1]) by localhost (mailauth4.nine.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s-HdR2VM2Yr9; Mon, 18 Sep 2017 19:43:30 +0200 (CEST) Received: from vimes (office.adfinis.com [95.128.36.166]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: pf@1042.ch) by mailauth4.nine.ch (Postfix) with ESMTPSA; Mon, 18 Sep 2017 19:43:30 +0200 (CEST) Received: by vimes (Postfix, from userid 1000) id E34DF2040B; Mon, 18 Sep 2017 19:43:29 +0200 (CEST) From: Jean-Louis Fuchs To: alpine-aports@lists.alpinelinux.org Cc: Jean-Louis Fuchs Subject: [alpine-aports] [PATCH 3/4] testing/py3-attrs: new aport Date: Mon, 18 Sep 2017 19:43:17 +0200 Message-Id: <20170918174318.3993-4-ganwell@fangorn.ch> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170918174318.3993-1-ganwell@fangorn.ch> References: <20170918174318.3993-1-ganwell@fangorn.ch> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- testing/py3-attrs/APKBUILD | 29 +++++++++++++++++++++++++++++ testing/py3-attrs/check.py | 10 ++++++++++ 2 files changed, 39 insertions(+) create mode 100644 testing/py3-attrs/APKBUILD create mode 100644 testing/py3-attrs/check.py diff --git a/testing/py3-attrs/APKBUILD b/testing/py3-attrs/APKBUILD new file mode 100644 index 0000000000..80a9d31c68 --- /dev/null +++ b/testing/py3-attrs/APKBUILD @@ -0,0 +1,29 @@ +# Contributor: Jean-Louis Fuchs +# Maintainer: Jean-Louis Fuchs +pkgname=py3-attrs +pkgver=17.2.0 +pkgrel=0 +pkgdesc="Python classes without boilerplate" +url="http://www.attrs.org" +arch="noarch" +license="MIT" +depends="python3" +makedepends="python3-dev py3-pytest" +source="py3-attrs-$pkgver.tar.gz::https://github.com/python-attrs/attrs/archive/$pkgver.tar.gz" +builddir="$srcdir/attrs-$pkgver" + +build() { + cd "$builddir" + python3 setup.py build +} + +check() { + PYTHONPATH="$builddir/src" python3 check.py +} + +package() { + cd "$builddir" + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +sha512sums="0084f115d8013e63bd81118a9f4d7a5e9c0b398a1ca8596d81fa00db17b2c241243026ccc7a5af579aba1aa53027cabfa2ae8610ac310e7f037f7b0ef2b15542 py3-attrs-17.2.0.tar.gz" diff --git a/testing/py3-attrs/check.py b/testing/py3-attrs/check.py new file mode 100644 index 0000000000..08af9829fb --- /dev/null +++ b/testing/py3-attrs/check.py @@ -0,0 +1,10 @@ +import attr + +@attr.s +class SomeClass(object): + a_number = attr.ib(default=42) + list_of_numbers = attr.ib(default=attr.Factory(list)) + +a = SomeClass() +assert a.a_number == 42 +assert isinstance(a.list_of_numbers, list) -- 2.13.5 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---