mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-12 18:59:50 +03:00
main/py3-parsing: upgrade to 3.2.3 and enable unit tests
This commit is contained in:
parent
c5c407bf59
commit
cacf81a04f
2 changed files with 26 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=py3-parsing
|
||||
_pkgname=pyparsing
|
||||
pkgver=3.2.0
|
||||
pkgver=3.2.3
|
||||
pkgrel=0
|
||||
pkgdesc="Object-oriented approach to text processing"
|
||||
url="https://github.com/pyparsing/pyparsing"
|
||||
|
@ -10,9 +10,10 @@ license="MIT"
|
|||
depends="python3"
|
||||
makedepends="py3-flit-core py3-gpep517"
|
||||
subpackages="$pkgname-pyc"
|
||||
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
|
||||
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
|
||||
skip-railroad.patch
|
||||
"
|
||||
builddir="$srcdir"/$_pkgname-$pkgver
|
||||
options="!check" # too low level, and needs unpackaged railroad
|
||||
|
||||
replaces="py-parsing" # Backwards compatibility
|
||||
provides="py-parsing=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
@ -24,7 +25,13 @@ build() {
|
|||
}
|
||||
|
||||
check() {
|
||||
python3 -m unittest
|
||||
python3 -m venv --clear --without-pip --system-site-packages test-env
|
||||
test-env/bin/python3 -m installer .dist/*.whl
|
||||
# no pytest yet
|
||||
test-env/bin/python3 -m unittest -b \
|
||||
tests/test_simple_unit.py \
|
||||
tests/test_unit.py \
|
||||
tests/test_examples.py
|
||||
}
|
||||
|
||||
package() {
|
||||
|
@ -33,5 +40,6 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
0a3096f07c41d3ff954c9aba8bd259a1c8af7ecb391add863e5743262b34778d32f05a617736295dcadbda80d94ca9af2e395a2077f616ac4d1557459a0b7cff pyparsing-3.2.0.tar.gz
|
||||
ef01403a158f15215b3be7f7c4aad2ceb6020d578dac68351b732df3447c685aa478d23ab645d554070ad2aec14ee565a0407f428b91f398e4429c0e53eb4a6d pyparsing-3.2.3.tar.gz
|
||||
e8ae66707d5278d11c26c9cf0da8e68897187589bdf8eaba74462eebe298e33cbebd69da75dcc9f5452b11d2d077a937fa7b469ee1688c4ff18c0dc0bef3b200 skip-railroad.patch
|
||||
"
|
||||
|
|
13
main/py3-parsing/skip-railroad.patch
Normal file
13
main/py3-parsing/skip-railroad.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- a/tests/test_examples.py
|
||||
+++ b/tests/test_examples.py
|
||||
@@ -56,6 +56,10 @@
|
||||
self._run("lucene_grammar")
|
||||
|
||||
def test_range_check(self):
|
||||
+ try:
|
||||
+ import railroad
|
||||
+ except ModuleNotFoundError:
|
||||
+ self.skipTest("no diagram/railroad")
|
||||
self._run("range_check")
|
||||
|
||||
def test_stackish(self):
|
Loading…
Add table
Add a link
Reference in a new issue