diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2018-02-14 18:29:20 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2018-02-14 18:29:25 +0000 |
commit | e66c440d4a1063d6f9949eb41d20115b5e073784 (patch) | |
tree | 86c4244d40009ece9a68dc01cac0bdccb060ef00 /community/py3-attrs | |
parent | a2dbbd6f87f77df234b8f8218e888f3e63fcbc13 (diff) | |
download | aports-e66c440d4a1063d6f9949eb41d20115b5e073784.tar.bz2 aports-e66c440d4a1063d6f9949eb41d20115b5e073784.tar.xz |
community/py3-attrs: moved from testing
Diffstat (limited to 'community/py3-attrs')
-rw-r--r-- | community/py3-attrs/APKBUILD | 29 | ||||
-rw-r--r-- | community/py3-attrs/check.py | 10 |
2 files changed, 39 insertions, 0 deletions
diff --git a/community/py3-attrs/APKBUILD b/community/py3-attrs/APKBUILD new file mode 100644 index 0000000000..9a8070c466 --- /dev/null +++ b/community/py3-attrs/APKBUILD @@ -0,0 +1,29 @@ +# Contributor: Jean-Louis Fuchs <ganwell@fangorn.ch> +# Maintainer: Jean-Louis Fuchs <ganwell@fangorn.ch> +pkgname=py3-attrs +pkgver=17.4.0 +pkgrel=0 +pkgdesc="Python classes without boilerplate" +url="http://www.attrs.org" +arch="noarch" +license="MIT" +depends="python3" +makedepends="python3-dev py3-pytest py3-setuptools" +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="14a512009cefbadc66972380f3beeb80e28daebeef467838c3506fd33a65e555666434a2d8f7294291b431e8b787aea370e267045f30a2253463e79d0e6caa3a py3-attrs-17.4.0.tar.gz" diff --git a/community/py3-attrs/check.py b/community/py3-attrs/check.py new file mode 100644 index 0000000000..08af9829fb --- /dev/null +++ b/community/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) |