diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-09-07 15:48:29 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-07 16:08:17 -0300 |
commit | ac0391c44b65ba4605807776df593c215b793bb5 (patch) | |
tree | 1a1e60623681f22b415cc40db01eea1fa5604b6f /community/py3-udev | |
parent | 65a8e46b21dad2c08110d155c86edb43e1e9f537 (diff) | |
download | aports-ac0391c44b65ba4605807776df593c215b793bb5.tar.bz2 aports-ac0391c44b65ba4605807776df593c215b793bb5.tar.xz |
community/py3-udev: drop py2
Diffstat (limited to 'community/py3-udev')
-rw-r--r-- | community/py3-udev/APKBUILD | 51 | ||||
-rw-r--r-- | community/py3-udev/pytest.patch | 13 |
2 files changed, 32 insertions, 32 deletions
diff --git a/community/py3-udev/APKBUILD b/community/py3-udev/APKBUILD index 2ea5eb22da..09cbb34e3d 100644 --- a/community/py3-udev/APKBUILD +++ b/community/py3-udev/APKBUILD @@ -1,47 +1,34 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> -pkgname=py-udev +pkgname=py3-udev pkgver=0.21.0 -pkgrel=2 +pkgrel=3 pkgdesc="Python bindings to libudev" +options="!check" # tries to use pytest_namespace url="http://pyudev.readthedocs.org" arch="noarch" -license="LGPL-2.1" -depends="eudev py-six" -makedepends="python2-dev python3-dev py-setuptools" -install="" -subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" -source="py-udev-$pkgver.tar.gz::https://github.com/pyudev/pyudev/archive/v$pkgver.tar.gz" +license="LGPL-2.1-or-later" +depends="eudev py3-six" +makedepends="py3-setuptools" +checkdepends="py3-docutils py3-pytest py3-mock py3-hypothesis" +source="py-udev-$pkgver.tar.gz::https://github.com/pyudev/pyudev/archive/v$pkgver.tar.gz + pytest.patch + " builddir="$srcdir/pyudev-$pkgver" +replaces="py-udev" # Backwards compatibility +provides="py-udev=$pkgver-r$pkgrel" # Backwards compatibility + build() { - cd "$builddir" - python2 setup.py build python3 setup.py build } -package() { - mkdir -p "$pkgdir" -} - -_py2() { - replaces="$pkgname" - depends="${depends//py-/py2-}" - _py python2 +check() { + PYTHONPATH="$PWD/build/lib" py.test-3 } -_py3() { - depends="${depends//py-/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" +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" } -sha512sums="c6cc8786c69de2a07eeae39cb57e33db6ca5fea83c38fdab277070bf052c97bd053911ab08a11fe65cb56c463492111e74451801390d89dc7f00fd00e68bba19 py-udev-0.21.0.tar.gz" +sha512sums="c6cc8786c69de2a07eeae39cb57e33db6ca5fea83c38fdab277070bf052c97bd053911ab08a11fe65cb56c463492111e74451801390d89dc7f00fd00e68bba19 py-udev-0.21.0.tar.gz +4275228caa5a079b0a9db77efab4ccd5c817c85c7cfdf65f10b793085e8636d17616be55225ecf87de1018c350722adcd642ebd811feaf6a09445d200d17f892 pytest.patch" diff --git a/community/py3-udev/pytest.patch b/community/py3-udev/pytest.patch new file mode 100644 index 0000000000..8a3bad504c --- /dev/null +++ b/community/py3-udev/pytest.patch @@ -0,0 +1,13 @@ +diff --git a/setup.cfg b/setup.cfg +index 151f5e6..78f6d64 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -8,6 +8,6 @@ release = egg_info -RDb '' + [upload_docs] + upload_dir = build/sphinx/html + +-[pytest] ++[tool:pytest] + # do not search for tests in build directory + norecursedirs = .* _* build + |