1 |
commit: 777ed184b12aca9469ab2d8339a2f168e40f338a |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 1 07:30:07 2022 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 1 07:30:07 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=777ed184 |
7 |
|
8 |
dev-python/pydantic: add 1.9.0 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
dev-python/pydantic/Manifest | 1 + |
13 |
dev-python/pydantic/pydantic-1.9.0.ebuild | 49 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 50 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pydantic/Manifest b/dev-python/pydantic/Manifest |
17 |
index 52e9b8c45281..4fefdc7318ef 100644 |
18 |
--- a/dev-python/pydantic/Manifest |
19 |
+++ b/dev-python/pydantic/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST pydantic-1.8.2_p20210719.tar.gz 310729 BLAKE2B 1905ddd100e3a40b48eadc7beb75542f4a59ff8ef55115105041b0c06249ee67df1ca91003bc01f828c543c757ec8931ff2d31663d33ca16f356f62f71a61474 SHA512 c9d91788b3143b211755806e533ae0ccafa2ab101159f98eeba921ec9370956e8f8b0f210e6ddddcef2345ea391d2e1011ea5498d2f7985bd711f48d025e30d5 |
22 |
+DIST pydantic-1.9.0.tar.gz 299758 BLAKE2B f6c2b89e598fc94db74b8165c449c752f11166752b12bbd37c23902b74c1f895bbd49b8fc4dc8da86b10880ac2e37178275cc28a42964e1133397364ea268d02 SHA512 ace542ff12698d568f2bea6121afc889c51892042b1a1b98464a6da6f71e50ecd8aafff7abd7ffd16983769844f7c970099d1fee7aa788f2e78172c0d5c4f472 |
23 |
|
24 |
diff --git a/dev-python/pydantic/pydantic-1.9.0.ebuild b/dev-python/pydantic/pydantic-1.9.0.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..13d5081663e0 |
27 |
--- /dev/null |
28 |
+++ b/dev-python/pydantic/pydantic-1.9.0.ebuild |
29 |
@@ -0,0 +1,49 @@ |
30 |
+# Copyright 1999-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+PYTHON_COMPAT=( python3_{8..10} ) |
36 |
+inherit distutils-r1 |
37 |
+ |
38 |
+DESCRIPTION="Data parsing and validation using Python type hints" |
39 |
+HOMEPAGE="https://github.com/samuelcolvin/pydantic" |
40 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
41 |
+ |
42 |
+LICENSE="MIT" |
43 |
+SLOT="0" |
44 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ dev-python/typing-extensions[${PYTHON_USEDEP}] |
48 |
+" |
49 |
+BDEPEND=" |
50 |
+ dev-python/cython[${PYTHON_USEDEP}] |
51 |
+ test? ( |
52 |
+ dev-python/hypothesis[${PYTHON_USEDEP}] |
53 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
54 |
+ dev-python/python-dotenv[${PYTHON_USEDEP}] |
55 |
+ dev-python/python-email-validator[${PYTHON_USEDEP}] |
56 |
+ ) |
57 |
+" |
58 |
+ |
59 |
+distutils_enable_tests pytest |
60 |
+ |
61 |
+src_prepare() { |
62 |
+ sed -i -e '/CFLAGS/d' setup.py || die |
63 |
+ distutils-r1_src_prepare |
64 |
+} |
65 |
+ |
66 |
+python_test() { |
67 |
+ local EPYTEST_DESELECT=( |
68 |
+ # flaky test, known upstream |
69 |
+ tests/test_hypothesis_plugin.py::test_can_construct_models_with_all_fields |
70 |
+ ) |
71 |
+ [[ ${EPYTHON} == "python3.8" ]] && EPYTEST_DESELECT+=( |
72 |
+ # Those fail on python 3.8 as None changed typing semantic on >=3.9 |
73 |
+ "tests/test_types.py::test_none[value_type3]" |
74 |
+ tests/test_typing.py::test_is_none_type |
75 |
+ ) |
76 |
+ distutils_install_for_testing |
77 |
+ epytest |
78 |
+} |