1 |
commit: 55e377fa4910ecfccfc8ee002706d588324ffc81 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 26 11:08:49 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 26 11:16:53 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55e377fa |
7 |
|
8 |
dev-python/pyparsing: Use flit to ease bootstrap |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pyparsing/pyparsing-3.0.7-r1.ebuild | 60 ++++++++++++++++++++++++++ |
13 |
1 file changed, 60 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/pyparsing/pyparsing-3.0.7-r1.ebuild b/dev-python/pyparsing/pyparsing-3.0.7-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..7c5d85957f9a |
18 |
--- /dev/null |
19 |
+++ b/dev-python/pyparsing/pyparsing-3.0.7-r1.ebuild |
20 |
@@ -0,0 +1,60 @@ |
21 |
+# Copyright 2004-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+# please keep this ebuild at EAPI 7 -- sys-apps/portage dep |
25 |
+EAPI=7 |
26 |
+ |
27 |
+DISTUTILS_USE_PEP517=flit |
28 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
29 |
+inherit distutils-r1 |
30 |
+ |
31 |
+MY_P=${P/-/_} |
32 |
+DESCRIPTION="Easy-to-use Python module for text parsing" |
33 |
+HOMEPAGE="https://github.com/pyparsing/pyparsing https://pypi.org/project/pyparsing/" |
34 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/${MY_P}.tar.gz" |
35 |
+S="${WORKDIR}/${PN}-${MY_P}" |
36 |
+ |
37 |
+LICENSE="MIT" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
40 |
+IUSE="examples" |
41 |
+ |
42 |
+distutils_enable_tests pytest |
43 |
+ |
44 |
+EPYTEST_IGNORE=( |
45 |
+ # railroad-diagrams not packaged (and not suitable for packaging yet) |
46 |
+ tests/test_diagram.py |
47 |
+) |
48 |
+ |
49 |
+EPYTEST_DESELECT=( |
50 |
+ # also railroad-diagrams |
51 |
+ tests/test_unit.py::Test02_WithoutPackrat::testEmptyExpressionsAreHandledProperly |
52 |
+ tests/test_unit.py::Test04_WithPackrat::testEmptyExpressionsAreHandledProperly |
53 |
+ tests/test_unit.py::Test06_WithBoundedPackrat::testEmptyExpressionsAreHandledProperly |
54 |
+ tests/test_unit.py::Test08_WithUnboundedPackrat::testEmptyExpressionsAreHandledProperly |
55 |
+ tests/test_unit.py::Test09_WithLeftRecursionParsing::testEmptyExpressionsAreHandledProperly |
56 |
+ tests/test_unit.py::Test10_WithLeftRecursionParsingBoundedMemo::testEmptyExpressionsAreHandledProperly |
57 |
+) |
58 |
+ |
59 |
+src_configure() { |
60 |
+ [[ -e pyproject.toml ]] && |
61 |
+ die "Upstream added pyproject.toml, recheck" |
62 |
+ # write a custom pyproject.toml to ease setuptools bootstrap |
63 |
+ cat > pyproject.toml <<-EOF || die |
64 |
+ [build-system] |
65 |
+ requires = ["flit_core >=3.2,<4"] |
66 |
+ build-backend = "flit_core.buildapi" |
67 |
+ |
68 |
+ [project] |
69 |
+ name = "pyparsing" |
70 |
+ dynamic = ["version", "description"] |
71 |
+ EOF |
72 |
+} |
73 |
+ |
74 |
+python_install_all() { |
75 |
+ if use examples; then |
76 |
+ docompress -x /usr/share/doc/${PF}/examples |
77 |
+ dodoc -r examples |
78 |
+ fi |
79 |
+ distutils-r1_python_install_all |
80 |
+} |