summaryrefslogtreecommitdiff
path: root/dev-python/pydantic
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-16 13:07:24 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-16 13:07:24 +0100
commit0c100b7dd2b30e75b799d806df4ef899fd98e1ea (patch)
tree464c922e949c7e4d5d891fb2cdda5daee5612537 /dev-python/pydantic
parente68d405c5d712af4387159df07e226217bdda049 (diff)
gentoo resync : 16.04.2022
Diffstat (limited to 'dev-python/pydantic')
-rw-r--r--dev-python/pydantic/Manifest3
-rw-r--r--dev-python/pydantic/pydantic-1.9.0-r1.ebuild73
-rw-r--r--dev-python/pydantic/pydantic-1.9.0.ebuild30
3 files changed, 98 insertions, 8 deletions
diff --git a/dev-python/pydantic/Manifest b/dev-python/pydantic/Manifest
index a7c55569e4e8..43fc67a3f0c5 100644
--- a/dev-python/pydantic/Manifest
+++ b/dev-python/pydantic/Manifest
@@ -2,5 +2,6 @@ AUX pydantic-1.8.2_p20210719-update-py3.10rc1.patch 5461 BLAKE2B 991dc2438ebe9db
DIST pydantic-1.8.2_p20210719.tar.gz 310729 BLAKE2B 1905ddd100e3a40b48eadc7beb75542f4a59ff8ef55115105041b0c06249ee67df1ca91003bc01f828c543c757ec8931ff2d31663d33ca16f356f62f71a61474 SHA512 c9d91788b3143b211755806e533ae0ccafa2ab101159f98eeba921ec9370956e8f8b0f210e6ddddcef2345ea391d2e1011ea5498d2f7985bd711f48d025e30d5
DIST pydantic-1.9.0.tar.gz 299758 BLAKE2B f6c2b89e598fc94db74b8165c449c752f11166752b12bbd37c23902b74c1f895bbd49b8fc4dc8da86b10880ac2e37178275cc28a42964e1133397364ea268d02 SHA512 ace542ff12698d568f2bea6121afc889c51892042b1a1b98464a6da6f71e50ecd8aafff7abd7ffd16983769844f7c970099d1fee7aa788f2e78172c0d5c4f472
EBUILD pydantic-1.8.2_p20210719.ebuild 1200 BLAKE2B e5d8f312a83e62fc82617211cebc670f32a140b97ab40a3be8cbc6a1a4fecec6d61a98189d2a63e938b9bff5eecbdb4cc4cfd679da2db404768aa2555e099419 SHA512 e7765492c554d4e7696f9eb115ca0505e05146c3b7c19104074986b8512bed6c56b737d91b4537df934ab35e2b923db7c34d97f8f53dd198b33251fff91f5be8
-EBUILD pydantic-1.9.0.ebuild 1258 BLAKE2B 7ed0cbfb13119fe7539c4491a86f9f99f88e2ac9288bc6745212eb8bb11282c0f4a69b30d2f2d26f4db77d885ed1515f3b8985856bc28fc41621dc0f5fbf007b SHA512 2cfaec6d09dd4dc084a664d9389a08ba9bf96118af02ba096e16814e96c8343c19c185a053df24643006bfbef12d697e90e0442ad9a8da652d0f579f979ba804
+EBUILD pydantic-1.9.0-r1.ebuild 1952 BLAKE2B d6a7d28fa73e7db97fee6465451d959f4bb8579581f7b8bc4d890383f61457246a749adc89bbe0ff54fd93516a0323ec8050d13e5cdc590d3687520c06755871 SHA512 19b445f9e2885344c03cd8c198ef50b6dec6348a8458a3485ad92da4bfd6efc555fb060d340cf9e13698c2c6540a2c6cd657a039e8a6b664d3697e3ea1b40fe5
+EBUILD pydantic-1.9.0.ebuild 1776 BLAKE2B 2ffe4da260a2dbbca936bbd7597bfa6b712a70c5fe2345da527727ca256bf240650f929792e72b09450cb98c102d880d1850fa0e706208fe3904e7932d414e90 SHA512 fbdf19ac48623242e32d5ecb4e2e9ad306868ef28a6bcea3d022f64dc5f40beffebaa49f774cd589dd5acdfccc0e38ce14cbf9f9d1014cad71f007ecb0af2778
MISC metadata.xml 492 BLAKE2B e21bc5a40669b2b321ba310df9dd4c6ff424e77d9d961b3aebc1f62b579444c7f505c19dae02590de999cfd8168ac522034275583fb4835e97e8db9b153fefda SHA512 bfb9c7a069a79735543dc12101af7cca16acc5fd93cae01515dc35a106c16a419c0e0e3a97a6bc8426c3db776417f7d29231022cb6ac27020f97e5dcfe0d0cbb
diff --git a/dev-python/pydantic/pydantic-1.9.0-r1.ebuild b/dev-python/pydantic/pydantic-1.9.0-r1.ebuild
new file mode 100644
index 000000000000..1e26b96ea70b
--- /dev/null
+++ b/dev-python/pydantic/pydantic-1.9.0-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Data parsing and validation using Python type hints"
+HOMEPAGE="https://github.com/samuelcolvin/pydantic"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ dev-python/typing-extensions[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/python-dotenv[${PYTHON_USEDEP}]
+ dev-python/python-email-validator[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ sed -i -e '/CFLAGS/d' setup.py || die
+ distutils-r1_src_prepare
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ # "setup.py clean" is broken
+ # TODO: remove this if distutils-r1.eclass is updated to do rm
+ rm -rf build || die
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x PYTEST_PLUGINS=pytest_mock
+
+ local EPYTEST_DESELECT=(
+ # flaky test, known upstream
+ tests/test_hypothesis_plugin.py::test_can_construct_models_with_all_fields
+ )
+ case ${EPYTHON} in
+ python3.8)
+ EPYTEST_DESELECT+=(
+ # Those fail on python 3.8 as None changed typing semantic on >=3.9
+ "tests/test_types.py::test_none[value_type3]"
+ tests/test_typing.py::test_is_none_type
+ )
+ ;;
+ pypy3)
+ EPYTEST_DESELECT+=(
+ tests/test_private_attributes.py::test_private_attribute
+ tests/test_private_attributes.py::test_private_attribute_annotation
+ tests/test_private_attributes.py::test_private_attribute_factory
+ tests/test_private_attributes.py::test_private_attribute_multiple_inheritance
+ tests/test_private_attributes.py::test_underscore_attrs_are_private
+ )
+ ;;
+ esac
+ epytest
+}
diff --git a/dev-python/pydantic/pydantic-1.9.0.ebuild b/dev-python/pydantic/pydantic-1.9.0.ebuild
index 970f223a617f..958836539afa 100644
--- a/dev-python/pydantic/pydantic-1.9.0.ebuild
+++ b/dev-python/pydantic/pydantic-1.9.0.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Data parsing and validation using Python type hints"
@@ -12,7 +12,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="amd64 arm arm64 hppa ppc ppc64 ~riscv sparc x86"
+KEYWORDS="amd64 arm arm64 hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86"
RDEPEND="
dev-python/typing-extensions[${PYTHON_USEDEP}]
@@ -35,15 +35,31 @@ src_prepare() {
}
python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x PYTEST_PLUGINS=pytest_mock
+
local EPYTEST_DESELECT=(
# flaky test, known upstream
tests/test_hypothesis_plugin.py::test_can_construct_models_with_all_fields
)
- [[ ${EPYTHON} == "python3.8" ]] && EPYTEST_DESELECT+=(
- # Those fail on python 3.8 as None changed typing semantic on >=3.9
- "tests/test_types.py::test_none[value_type3]"
- tests/test_typing.py::test_is_none_type
- )
+ case ${EPYTHON} in
+ python3.8)
+ EPYTEST_DESELECT+=(
+ # Those fail on python 3.8 as None changed typing semantic on >=3.9
+ "tests/test_types.py::test_none[value_type3]"
+ tests/test_typing.py::test_is_none_type
+ )
+ ;;
+ pypy3)
+ EPYTEST_DESELECT+=(
+ tests/test_private_attributes.py::test_private_attribute
+ tests/test_private_attributes.py::test_private_attribute_annotation
+ tests/test_private_attributes.py::test_private_attribute_factory
+ tests/test_private_attributes.py::test_private_attribute_multiple_inheritance
+ tests/test_private_attributes.py::test_underscore_attrs_are_private
+ )
+ ;;
+ esac
distutils_install_for_testing
epytest
}