diff --git a/README.md b/README.md index 0d0eea710..e615a8f65 100644 --- a/README.md +++ b/README.md @@ -576,11 +576,11 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E ## Licenses This repository itself is released under GPL-3 (like most Gentoo repositories), all work on the depending components under the licenses they came from. Perhaps you came here because I filed an issue at your component about a bad or missing license. It is easy to [assign a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository). During cleanups and license investigations I have been asked often which license to choose. I am not a lawyer, but I can offer the following table, counted over this repository, perhaps this helps your decision. If a package has more than one license listed, all of them are counted. -There are 1830 Ebuilds in total, 1819 of them have in total 1835 (36 different) licenses assigned. +There are 1831 Ebuilds in total, 1820 of them have in total 1836 (36 different) licenses assigned. |License| Ebuilds using it| |-------|-----| -|MIT|1068| +|MIT|1069| |Apache-2.0|395| |GPL-3|118| |BSD|96| diff --git a/dev-python/pydantic/Manifest b/dev-python/pydantic/Manifest new file mode 100644 index 000000000..d3c43e335 --- /dev/null +++ b/dev-python/pydantic/Manifest @@ -0,0 +1,3 @@ +DIST pydantic-1.10.5.gh.tar.gz 900106 BLAKE2B 6ad75bc0e58b2fea8e0e4c2e23e7b8de39779ec6f1acf05b693201f6ef63e2e6765cac2320ecf694086facdc5d38d9213cead7dc267b53bbec97f11e0f6ff67e SHA512 2f25e5ed3016a64af05674a21dd8dccf3af7e075237b0d078433fa347e58482113e243f9c21ddd55677432d22da692cbb24a682c5af2f09bfdb6fb5cbd53d408 +EBUILD pydantic-1.10.5.ebuild 2051 BLAKE2B 773f4595f4dd6eaae5908a05cfa5a56d812d6e83b929516263e0761ea9b1d156fa98e32aaef2ef8207cccc7b2a4a3d3f89cc40edebce613285a3bf526c48e356 SHA512 65423cf252437f7a6455574deacbab755c58a1f870af5109e58e6abaefcdd691ad2058434757bdb9ee5141923725d0a74a1394c1e8527ee090c759c811343d11 +MISC metadata.xml 561 BLAKE2B 9cb2851ece8c8bd005a45008efe6d14d990f82832700f641418c15921f368de9bf2b20f9713362f5308a871a10c60a54ddce4e095a4a60209c89bde964c71ef7 SHA512 2f26f32c0d937153966ffbc3b9bb67252043dabfd9ca96b2ba854b111300a0c8bc89a664e439cda3bcc39597c3a29d28b3aa84172ece0f1d818b49cda746ee33 diff --git a/dev-python/pydantic/metadata.xml b/dev-python/pydantic/metadata.xml new file mode 100644 index 000000000..908435493 --- /dev/null +++ b/dev-python/pydantic/metadata.xml @@ -0,0 +1,17 @@ + + + + + python@gentoo.org + Python + + + pydantic + pydantic/pydantic + https://github.com/pydantic/pydantic/issues + https://docs.pydantic.dev/ + + + Compiles native "C" extensions. + + diff --git a/dev-python/pydantic/pydantic-1.10.5.ebuild b/dev-python/pydantic/pydantic-1.10.5.ebuild new file mode 100644 index 000000000..7c145e104 --- /dev/null +++ b/dev-python/pydantic/pydantic-1.10.5.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) + +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="amd64 arm arm64 x86" +IUSE="+native-extensions" + +RDEPEND=" + >=dev-python/typing-extensions-4.1.0[${PYTHON_USEDEP}] +" +BDEPEND=" + native-extensions? ( + 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-1.2.1[${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 + ) + ;; + esac + rm -rf pydantic || die + epytest +}