summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-07-25 06:42:07 +0200
committerMichał Górny <mgorny@gentoo.org>2023-07-25 07:20:29 +0200
commit06faeb34681941cfd1bf8b42d2aaf134dd173de1 (patch)
treeda12205d8475de70cf5a3d8dbef50105b91d0ac3
parentdev-python/sphinx: Bump to 7.1.0 (diff)
downloadgentoo-06faeb34.tar.gz
gentoo-06faeb34.tar.bz2
gentoo-06faeb34.zip
dev-python/pydantic: Bump to 1.10.12
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/pydantic/Manifest1
-rw-r--r--dev-python/pydantic/pydantic-1.10.12.ebuild91
2 files changed, 92 insertions, 0 deletions
diff --git a/dev-python/pydantic/Manifest b/dev-python/pydantic/Manifest
index e0a5c338b8b3..996d93ed8693 100644
--- a/dev-python/pydantic/Manifest
+++ b/dev-python/pydantic/Manifest
@@ -1,3 +1,4 @@
DIST pydantic-1.10.11.gh.tar.gz 766203 BLAKE2B 5ab426a805a471baac409c82d5a0cdaa9eae0bc46c0c0643ab653db68ccd5bd6db2c2e6aa12113f513e35d590b291986d463e776515f495991e9818541ab2553 SHA512 494e692781dd8fe3980e06ba975fa0c86ad32e36bffead8c836e1680ff3c43de458ef5a344182950060fc3616208d82ad77fd9098811384208f25a9b72c0fe42
+DIST pydantic-1.10.12.gh.tar.gz 766366 BLAKE2B b00885b86ef331f3f8531d1514f4e3e1ef10d009b35453c6d5a6295ecfe2d2b842f66c7ea2a79ca1d235d54fa38b42432e14804163f944c4455f05c06869815a SHA512 413d433decfa3bb7173d6f4e6e06f746cfbf95f6d27c6a17098216ba81d64d7f8bb956cda195d0676559f96278f3800c77be53ecf46496ac009f130120642cc2
DIST pydantic-1.10.9.gh.tar.gz 765868 BLAKE2B 802c542d75b41ff2926215bf4f6bd68a906d581db7b08ed85577f9021d259717f3ef8dbacfe381723aa042aab8720ad182c57fee188f2436b33d21164e24ba23 SHA512 d376a302eac3427cdc8da0ed2fab01c0b5e7a059447777a53c394a60dac5fa0066488be8553022bb5aa89367d5a2e80e5d6e3cb39d9272843718dd07f6acd11e
DIST pydantic-2.0.3.tar.gz 593215 BLAKE2B eff4de5d45e623e91df43eb89c3d350fdbb22adc1e05417cbb65c0dc3d58475d5e77bad046498d403a1663f7327ca6e5db517fd00f59d554532a53f4f1bbbbb6 SHA512 081f47e8948178a9cc5cf4aa17f0fb1f45d4fab28f5b89e2a56f5812c38a87ab97fb6758236fb64fc44553230807d51a9c7451c2bdbb8b77a9b0fc9083385391
diff --git a/dev-python/pydantic/pydantic-1.10.12.ebuild b/dev-python/pydantic/pydantic-1.10.12.ebuild
new file mode 100644
index 000000000000..742af7f9f99e
--- /dev/null
+++ b/dev-python/pydantic/pydantic-1.10.12.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+
+inherit distutils-r1
+
+MY_P=${P/_beta/b}
+DESCRIPTION="Data parsing and validation using Python type hints"
+HOMEPAGE="
+ https://github.com/pydantic/pydantic/
+ https://pypi.org/project/pydantic/
+"
+SRC_URI="
+ https://github.com/pydantic/pydantic/archive/v${PV/_beta/b}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="native-extensions"
+
+RDEPEND="
+ >=dev-python/typing-extensions-4.1.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ native-extensions? (
+ <dev-python/cython-3[${PYTHON_USEDEP}]
+ )
+ test? (
+ >=dev-python/email-validator-1.2.1[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/python-dotenv[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ sed -i -e '/CFLAGS/d' setup.py || die
+ distutils-r1_src_prepare
+}
+
+python_compile() {
+ if [[ ${EPYTHON} == pypy3 ]] || ! use native-extensions; then
+ # do not build extensions on PyPy to workaround
+ # https://github.com/cython/cython/issues/4763
+ local -x SKIP_CYTHON=1
+ fi
+ distutils-r1_python_compile
+}
+
+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
+ # mypy linting causes regressions with new mypy versions
+ tests/mypy
+ )
+ case ${EPYTHON} in
+ 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
+ )
+ ;;
+ python3.12)
+ EPYTEST_DESELECT+=(
+ tests/test_abc.py::test_model_subclassing_abstract_base_classes_without_implementation_raises_exception
+ tests/test_generics.py::test_partial_specification_name
+ tests/test_generics.py::test_parse_generic_json
+ tests/test_types.py::test_secretfield
+ )
+ ;;
+ esac
+ rm -rf pydantic || die
+ epytest
+}