From 1df33dbe8afe67936340f11a37b4ed6e75aeebd3 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 7 Sep 2019 11:39:10 -0300 Subject: testing/py3-itypes: rename from py-itypes --- testing/py-itypes/APKBUILD | 59 --------------------------------- testing/py-itypes/disable-flake8.patch | 30 ----------------- testing/py3-itypes/APKBUILD | 59 +++++++++++++++++++++++++++++++++ testing/py3-itypes/disable-flake8.patch | 30 +++++++++++++++++ 4 files changed, 89 insertions(+), 89 deletions(-) delete mode 100644 testing/py-itypes/APKBUILD delete mode 100644 testing/py-itypes/disable-flake8.patch create mode 100644 testing/py3-itypes/APKBUILD create mode 100644 testing/py3-itypes/disable-flake8.patch (limited to 'testing') diff --git a/testing/py-itypes/APKBUILD b/testing/py-itypes/APKBUILD deleted file mode 100644 index 4fedee5405..0000000000 --- a/testing/py-itypes/APKBUILD +++ /dev/null @@ -1,59 +0,0 @@ -# Contributor: Leonardo Arena -# Maintainer: -pkgname=py-itypes -_pkgreal=${pkgname#*-} -pkgver=1.1.0 -pkgrel=2 -pkgdesc="Basic immutable container types for Python" -url="https://github.com/tomchristie/itypes" -arch="noarch" -license="BSD" -depends="" -makedepends="python2-dev python3-dev py2-setuptools" -checkdepends="py2-flake8 py3-flake8 py2-pytest py3-pytest py-enum34 - py2-pycodestyle py3-pycodestyle py2-pyflakes py3-pyflakes" -subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" -source="$pkgname-$pkgver.tar.gz::https://github.com/tomchristie/itypes/archive/$pkgver.tar.gz - disable-flake8.patch" -builddir="$srcdir"/$_pkgreal-$pkgver - -build() { - cd "$builddir" - python2 setup.py --quiet build - python3 setup.py --quiet build -} - -package() { - cd "$builddir" - mkdir -p "$pkgdir"/usr/bin -} - -check() { - cd "$builddir" - python2 runtests - python3 runtests -} - -_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="2f6dd5d655f1031059df8dcfd0a2f76875796a800144e887fb66cb5585949097edb6b9f5e973de2280f43cfeb25ab99d3ca428372fe239c8cd70f385304bcdd7 py-itypes-1.1.0.tar.gz -71421f34cf7c4303a2bb8dbbe48d7098f183ce41ed7bf454efa199d031a88c54c84a93eb84d0fa14b8231086709d2949eec7b6bbdb55af7aae4d62a734056d69 disable-flake8.patch" diff --git a/testing/py-itypes/disable-flake8.patch b/testing/py-itypes/disable-flake8.patch deleted file mode 100644 index 91ee70a28b..0000000000 --- a/testing/py-itypes/disable-flake8.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- itypes-1.1.0.orig/runtests -+++ itypes-1.1.0/runtests -@@ -6,7 +6,6 @@ - - - PYTEST_ARGS = ['tests.py', '--tb=short'] --FLAKE8_ARGS = ['itypes.py', 'tests.py', '--ignore=E501'] - COVERAGE_OPTIONS = { - 'include': ['itypes.py', 'tests.py'], - } -@@ -25,13 +24,6 @@ - sys.exit(ret) - - --def flake8_main(args): -- print('Running flake8 code linting') -- ret = subprocess.call(['flake8'] + args) -- print('flake8 failed' if ret else 'flake8 passed') -- return ret -- -- - def fail_if_lacking_coverage(cov): - precent_covered = cov.report( - file=NullFile(), **COVERAGE_OPTIONS -@@ -82,5 +74,4 @@ - # cov.start() - exit_on_failure(pytest.main(pytest_args)) - # cov.stop() -- exit_on_failure(flake8_main(FLAKE8_ARGS)) - # fail_if_lacking_coverage(cov) diff --git a/testing/py3-itypes/APKBUILD b/testing/py3-itypes/APKBUILD new file mode 100644 index 0000000000..4fedee5405 --- /dev/null +++ b/testing/py3-itypes/APKBUILD @@ -0,0 +1,59 @@ +# Contributor: Leonardo Arena +# Maintainer: +pkgname=py-itypes +_pkgreal=${pkgname#*-} +pkgver=1.1.0 +pkgrel=2 +pkgdesc="Basic immutable container types for Python" +url="https://github.com/tomchristie/itypes" +arch="noarch" +license="BSD" +depends="" +makedepends="python2-dev python3-dev py2-setuptools" +checkdepends="py2-flake8 py3-flake8 py2-pytest py3-pytest py-enum34 + py2-pycodestyle py3-pycodestyle py2-pyflakes py3-pyflakes" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$pkgname-$pkgver.tar.gz::https://github.com/tomchristie/itypes/archive/$pkgver.tar.gz + disable-flake8.patch" +builddir="$srcdir"/$_pkgreal-$pkgver + +build() { + cd "$builddir" + python2 setup.py --quiet build + python3 setup.py --quiet build +} + +package() { + cd "$builddir" + mkdir -p "$pkgdir"/usr/bin +} + +check() { + cd "$builddir" + python2 runtests + python3 runtests +} + +_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="2f6dd5d655f1031059df8dcfd0a2f76875796a800144e887fb66cb5585949097edb6b9f5e973de2280f43cfeb25ab99d3ca428372fe239c8cd70f385304bcdd7 py-itypes-1.1.0.tar.gz +71421f34cf7c4303a2bb8dbbe48d7098f183ce41ed7bf454efa199d031a88c54c84a93eb84d0fa14b8231086709d2949eec7b6bbdb55af7aae4d62a734056d69 disable-flake8.patch" diff --git a/testing/py3-itypes/disable-flake8.patch b/testing/py3-itypes/disable-flake8.patch new file mode 100644 index 0000000000..91ee70a28b --- /dev/null +++ b/testing/py3-itypes/disable-flake8.patch @@ -0,0 +1,30 @@ +--- itypes-1.1.0.orig/runtests ++++ itypes-1.1.0/runtests +@@ -6,7 +6,6 @@ + + + PYTEST_ARGS = ['tests.py', '--tb=short'] +-FLAKE8_ARGS = ['itypes.py', 'tests.py', '--ignore=E501'] + COVERAGE_OPTIONS = { + 'include': ['itypes.py', 'tests.py'], + } +@@ -25,13 +24,6 @@ + sys.exit(ret) + + +-def flake8_main(args): +- print('Running flake8 code linting') +- ret = subprocess.call(['flake8'] + args) +- print('flake8 failed' if ret else 'flake8 passed') +- return ret +- +- + def fail_if_lacking_coverage(cov): + precent_covered = cov.report( + file=NullFile(), **COVERAGE_OPTIONS +@@ -82,5 +74,4 @@ + # cov.start() + exit_on_failure(pytest.main(pytest_args)) + # cov.stop() +- exit_on_failure(flake8_main(FLAKE8_ARGS)) + # fail_if_lacking_coverage(cov) -- cgit v1.2.3