From 03141b0eb5253631b0df0083bcca02424f7c3e3e Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Sun, 1 Jun 2025 19:00:37 +0000 Subject: Adding metadata --- .../dependency-groups-1.3.1.ebuild | 2 +- .../ensurepip-pip/ensurepip-pip-25.1.1.ebuild | 2 +- dev-python/langdetect/Manifest | 2 - .../files/langdetect-1.0.9-explicit-config.patch | 13 ++ dev-python/langdetect/langdetect-1.0.9.ebuild | 6 +- dev-python/langdetect/metadata.xml | 10 +- dev-python/pip/pip-25.1.1.ebuild | 2 +- dev-python/protobuf/Manifest | 3 + dev-python/protobuf/metadata.xml | 7 +- dev-python/protobuf/protobuf-5.29.4-r1.ebuild | 36 ----- dev-python/protobuf/protobuf-5.29.4-r2.ebuild | 29 ++++ dev-python/protobuf/protobuf-5.29.5-r1.ebuild | 29 ++++ dev-python/protobuf/protobuf-5.29.5.ebuild | 36 ----- dev-python/protobuf/protobuf-6.30.2-r2.ebuild | 145 ++++++++++++++++++++ dev-python/protobuf/protobuf-6.31.1.ebuild | 152 +++++++++++++++++++++ .../translate-toolkit-3.15.2.ebuild | 2 +- 16 files changed, 387 insertions(+), 89 deletions(-) create mode 100644 dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch delete mode 100644 dev-python/protobuf/protobuf-5.29.4-r1.ebuild create mode 100644 dev-python/protobuf/protobuf-5.29.4-r2.ebuild create mode 100644 dev-python/protobuf/protobuf-5.29.5-r1.ebuild delete mode 100644 dev-python/protobuf/protobuf-5.29.5.ebuild create mode 100644 dev-python/protobuf/protobuf-6.30.2-r2.ebuild create mode 100644 dev-python/protobuf/protobuf-6.31.1.ebuild (limited to 'dev-python') diff --git a/dev-python/dependency-groups/dependency-groups-1.3.1.ebuild b/dev-python/dependency-groups/dependency-groups-1.3.1.ebuild index 48bbfd60515b..b654348d1229 100644 --- a/dev-python/dependency-groups/dependency-groups-1.3.1.ebuild +++ b/dev-python/dependency-groups/dependency-groups-1.3.1.ebuild @@ -16,7 +16,7 @@ HOMEPAGE=" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86" RDEPEND=" dev-python/packaging[${PYTHON_USEDEP}] diff --git a/dev-python/ensurepip-pip/ensurepip-pip-25.1.1.ebuild b/dev-python/ensurepip-pip/ensurepip-pip-25.1.1.ebuild index 793cd9fb17f1..800de63e5998 100644 --- a/dev-python/ensurepip-pip/ensurepip-pip-25.1.1.ebuild +++ b/dev-python/ensurepip-pip/ensurepip-pip-25.1.1.ebuild @@ -12,7 +12,7 @@ S=${DISTDIR} LICENSE="Apache-2.0 BSD BSD-2 ISC LGPL-2.1+ MIT MPL-2.0 PSF-2" SLOT="0" -KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" src_install() { insinto /usr/lib/python/ensurepip diff --git a/dev-python/langdetect/Manifest b/dev-python/langdetect/Manifest index d12ab8aeaca8..a11d7c268c91 100644 --- a/dev-python/langdetect/Manifest +++ b/dev-python/langdetect/Manifest @@ -1,3 +1 @@ DIST langdetect-1.0.9.tar.gz 981474 BLAKE2B ea8a9c3f16a2987c080742473bff4f2c1503f53fb3c2b40b0b1d6212bb6133ea22dce7864ffcfb8968c3a46b157d45cb3e2cf6f84bdbed0266cc716a853b032c SHA512 7558d674c47b080c79e43a00a25d2c7f77188cf60bea2cecb3bebb803d75e1aa42b43c74bd26ea1b541f4cb927421908882cbec01a91f0913984217e71ccc8db -EBUILD langdetect-1.0.9.ebuild 494 BLAKE2B 9cd8a2a93a8d45bf51fe2324402b175d641762ea591fcb99459427f977a95eccffa6ca4777ca4df39814eea6eac62711567faa654456d32f79023a4685804504 SHA512 d973b85ba1a44389a4275f02a779a93a005f7c2e096467b94b072862e4984d5b42cf33f9821ac68aa5b85b12c98983a90b96049989d8c84497969174b6bb838e -MISC metadata.xml 457 BLAKE2B 630128a3e982b6d60cc7b9f74c79fcb5ee47a71a02c73a50af9da8cedb6fad8e20a7f74b881e5b25c6483b92c9edbd56552cd38b2d9cbfa8b3eb4530facea969 SHA512 674f4f5cd809c6c77bc14e0f5687fa972bef14bdfa0b3343c5d66b7163eef1906eb87d060c8288732f825de71dce291ad0b841a5f2f0dd230f957b5687e45d45 diff --git a/dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch b/dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch new file mode 100644 index 000000000000..637368d2f237 --- /dev/null +++ b/dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch @@ -0,0 +1,13 @@ +Fix "Package 'langdetect.profiles' is absent from the `packages` configuration." + +--- a/setup.py ++++ b/setup.py +@@ -18,7 +18,7 @@ setup( + author_email='michal.danilak@gmail.com', + url='https://github.com/Mimino666/langdetect', + keywords='language detection library', +- packages=['langdetect', 'langdetect.utils', 'langdetect.tests'], ++ packages=['langdetect', 'langdetect.utils', 'langdetect.tests', 'langdetect.profiles'], + include_package_data=True, + install_requires=['six'], + license='MIT', diff --git a/dev-python/langdetect/langdetect-1.0.9.ebuild b/dev-python/langdetect/langdetect-1.0.9.ebuild index 56733bbffc48..99577c43fc3e 100644 --- a/dev-python/langdetect/langdetect-1.0.9.ebuild +++ b/dev-python/langdetect/langdetect-1.0.9.ebuild @@ -1,9 +1,9 @@ -# Copyright 2022 Gentoo Authors +# Copyright 2022-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{9,10,11,12,13} pypy3 ) +PYTHON_COMPAT=( python3_{9,10,11,12,13} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 pypi @@ -19,4 +19,6 @@ KEYWORDS="~amd64" RDEPEND="dev-python/six[${PYTHON_USEDEP}]" +PATCHES=( "${FILESDIR}/${P}-explicit-config.patch" ) + distutils_enable_tests unittest diff --git a/dev-python/langdetect/metadata.xml b/dev-python/langdetect/metadata.xml index 020e07f2a3dd..c0f74ac187e2 100644 --- a/dev-python/langdetect/metadata.xml +++ b/dev-python/langdetect/metadata.xml @@ -2,11 +2,9 @@ - marcin.deranek@slonko.net - Marcin Deranek + pastalian46@gmail.com + Takuya Wakazono - - https://github.com/Mimino666/langdetect/issues - - slonko-overlay + + gentoo-guru-overlay \ No newline at end of file diff --git a/dev-python/pip/pip-25.1.1.ebuild b/dev-python/pip/pip-25.1.1.ebuild index daba9108b903..ddbe15c05831 100644 --- a/dev-python/pip/pip-25.1.1.ebuild +++ b/dev-python/pip/pip-25.1.1.ebuild @@ -24,7 +24,7 @@ SRC_URI=" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86" IUSE="test test-rust" RESTRICT="!test? ( test )" diff --git a/dev-python/protobuf/Manifest b/dev-python/protobuf/Manifest index dbb057902755..1358c221b7d6 100644 --- a/dev-python/protobuf/Manifest +++ b/dev-python/protobuf/Manifest @@ -1,3 +1,6 @@ DIST protobuf-5.29.4.py.tar.gz 424902 BLAKE2B 54941b008ff5ebd007076448828564128d98e9a6a4613c87057c359124940d341358fe28107b929e3e842ac7e1b34ed54c30219ed95cbb418826592e2458a01f SHA512 634faf103ed8320762593689796d26e6b988e1b40277b12dc7356983c07d5d1da8cac1530e4f16c0a1494abfb885f26bf9884988029e863515cf535c62d96c77 DIST protobuf-5.29.5.py.tar.gz 425226 BLAKE2B 1d7461e94ba8bc097d6f52170678665e3cd97ef44e4757e6c20bcb1bdfbfe673d26cd4a63f8e6972af964e381dfffedeb9a4959ec7a7d5a3a3f87f917c8aa329 SHA512 cbb39efe7f6499362b3e4cc9f073df921c8b83d3aafde245a2ca3432f3e744a428e946799c48b2797e08312342e164eced0bf2b8865b8d042b54913855abb1c8 +DIST protobuf-6.30.2.gh.tar.gz 9523913 BLAKE2B d3950abfe8b3b61dc2bb61f683b014de29451252c46b670dee75a81eb0b8ed30a3209227aa9483800244af16058469deb281521609d769a3456a798ca8a9a4a3 SHA512 f2ee857a36b49f87257a306b3f3c361770d74aaf24c4650b9d00994e1e1a0b09079fb0ce5ffb4d5a4a32d8ca46e3247d6db454918fa0b104fc8d58e8a0546a96 DIST protobuf-6.30.2.py.tar.gz 429315 BLAKE2B 6b56e23a8a962ce9da282ec49c4807877f4bfb677ad84bb6930b83cc436e9839f5791cfb19105678881c8361e27d62d3dde51e5e6c42f7a0e146d9e469282780 SHA512 48ddb2b63acc91759ba4243926c50bb0d16601aace9019129975701634b77a59415659751c69b06464afe994a0fbbd8da6640a208b743ba7df8bf6d60c5ec2b9 +DIST protobuf-6.31.1.gh.tar.gz 9602805 BLAKE2B 349a528acaad6bae8c39be2888fcfe855dc71605d2b52e20c24e63b3171a855b0f16c60e4fa8a69bcad8b484edd46232132e7b0256634f420aea2dd207da129e SHA512 9138ac1b1c248246ed9840ab3879a6e18da60c709454ede2cb8e45e66e949998ab6e2c8aba557f0bb0b650ec430caeb546695b23387321ced5bc288866e04ad7 +DIST protobuf-6.31.1.py.tar.gz 441797 BLAKE2B 867ee81473a733020098f76c2ccf22161a73b3a1219e08f0f339f202cff871447d874cc6c13d42ef314a0134d65c56631ba4ab6feb806749f3d18443f666f5d9 SHA512 595c125a116020344d5706adf444e1a3259eae5bce3ca61b92c1ab4cb63c167f97210c71e5e24b8c49c6489777ca6de95abdd398125ba3925313ad5ebe09cc18 diff --git a/dev-python/protobuf/metadata.xml b/dev-python/protobuf/metadata.xml index af249ed82217..853174b8f2ab 100644 --- a/dev-python/protobuf/metadata.xml +++ b/dev-python/protobuf/metadata.xml @@ -1,9 +1,10 @@ + + python@gentoo.org + Python + gentoo-staging - - Soname version number of Protobuf - \ No newline at end of file diff --git a/dev-python/protobuf/protobuf-5.29.4-r1.ebuild b/dev-python/protobuf/protobuf-5.29.4-r1.ebuild deleted file mode 100644 index e24e0ab5c21f..000000000000 --- a/dev-python/protobuf/protobuf-5.29.4-r1.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2008-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Default implementation currently is upb, which doesn't match dev-libs/protobuf -# https://github.com/protocolbuffers/protobuf/blob/main/python/README.md#implementation-backends - -DISTUTILS_EXT=1 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9,10,11,12,13} ) -PYPI_PN="protobuf" - -inherit distutils-r1 pypi - -DESCRIPTION="Google's Protocol Buffers - Python bindings" -HOMEPAGE=" - https://protobuf.dev/ - https://pypi.org/project/protobuf/ -" - -# Rename sdist to avoid conflicts with dev-libs/protobuf -SRC_URI=" - $(pypi_sdist_url) -> ${P}.py.tar.gz -" - -LICENSE="BSD" -SLOT="0/$(ver_cut 1-3)" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" - -src_prepare() { - distutils-r1_src_prepare - - # strip old-style namespace - rm google/__init__.py || die -} diff --git a/dev-python/protobuf/protobuf-5.29.4-r2.ebuild b/dev-python/protobuf/protobuf-5.29.4-r2.ebuild new file mode 100644 index 000000000000..dc190c2fdb57 --- /dev/null +++ b/dev-python/protobuf/protobuf-5.29.4-r2.ebuild @@ -0,0 +1,29 @@ +# Copyright 2008-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Default implementation currently is upb, which doesn't match dev-libs/protobuf +# https://github.com/protocolbuffers/protobuf/blob/main/python/README.md#implementation-backends + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9,10,11,12,13} ) +PYPI_PN="protobuf" + +inherit distutils-r1 pypi + +DESCRIPTION="Google's Protocol Buffers - Python bindings" +HOMEPAGE=" + https://protobuf.dev/ + https://pypi.org/project/protobuf/ +" + +# Rename sdist to avoid conflicts with dev-libs/protobuf +SRC_URI=" + $(pypi_sdist_url) -> ${P}.py.tar.gz +" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-3)" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" diff --git a/dev-python/protobuf/protobuf-5.29.5-r1.ebuild b/dev-python/protobuf/protobuf-5.29.5-r1.ebuild new file mode 100644 index 000000000000..4417da5d09e0 --- /dev/null +++ b/dev-python/protobuf/protobuf-5.29.5-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 2008-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Default implementation currently is upb, which doesn't match dev-libs/protobuf +# https://github.com/protocolbuffers/protobuf/blob/main/python/README.md#implementation-backends + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9,10,11,12,13} ) +PYPI_PN="protobuf" + +inherit distutils-r1 pypi + +DESCRIPTION="Google's Protocol Buffers - Python bindings" +HOMEPAGE=" + https://protobuf.dev/ + https://pypi.org/project/protobuf/ +" + +# Rename sdist to avoid conflicts with dev-libs/protobuf +SRC_URI=" + $(pypi_sdist_url) -> ${P}.py.tar.gz +" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-3)" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" diff --git a/dev-python/protobuf/protobuf-5.29.5.ebuild b/dev-python/protobuf/protobuf-5.29.5.ebuild deleted file mode 100644 index a3f9a2b24194..000000000000 --- a/dev-python/protobuf/protobuf-5.29.5.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2008-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Default implementation currently is upb, which doesn't match dev-libs/protobuf -# https://github.com/protocolbuffers/protobuf/blob/main/python/README.md#implementation-backends - -DISTUTILS_EXT=1 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9,10,11,12,13} ) -PYPI_PN="protobuf" - -inherit distutils-r1 pypi - -DESCRIPTION="Google's Protocol Buffers - Python bindings" -HOMEPAGE=" - https://protobuf.dev/ - https://pypi.org/project/protobuf/ -" - -# Rename sdist to avoid conflicts with dev-libs/protobuf -SRC_URI=" - $(pypi_sdist_url) -> ${P}.py.tar.gz -" - -LICENSE="BSD" -SLOT="0/$(ver_cut 1-3)" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" - -src_prepare() { - distutils-r1_src_prepare - - # strip old-style namespace - rm google/__init__.py || die -} diff --git a/dev-python/protobuf/protobuf-6.30.2-r2.ebuild b/dev-python/protobuf/protobuf-6.30.2-r2.ebuild new file mode 100644 index 000000000000..063c62022608 --- /dev/null +++ b/dev-python/protobuf/protobuf-6.30.2-r2.ebuild @@ -0,0 +1,145 @@ +# Copyright 2008-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Default implementation currently is upb, which doesn't match dev-libs/protobuf +# https://github.com/protocolbuffers/protobuf/blob/main/python/README.md#implementation-backends + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9,10,11,12,13} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Google's Protocol Buffers - Python bindings" +HOMEPAGE=" + https://protobuf.dev/ + https://pypi.org/project/protobuf/ +" +# Rename sdist to avoid conflicts with dev-libs/protobuf +SRC_URI=" + $(pypi_sdist_url) -> ${P}.py.tar.gz + test? ( + https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz + ) +" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-3)" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +# need protobuf compiler +BDEPEND=" + test? ( + dev-libs/protobuf + dev-python/absl-py[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +src_unpack() { + unpack "${P}.py.tar.gz" + + if use test; then + mkdir "${WORKDIR}/test" || die + cd "${WORKDIR}/test" || die + unpack "${P}.gh.tar.gz" + fi +} + +src_prepare() { + distutils-r1_src_prepare + + # strip old-style namespace + rm google/__init__.py || die +} + +python_test() { + local EPYTEST_IGNORE=( + # TODO: figure out how to build the pybind11 test extension + google/protobuf/internal/recursive_message_pybind11_test.py + ) + + case ${EPYTHON} in + python3.11) + EPYTEST_IGNORE+=( + # syntax error... + google/protobuf/internal/json_format_test.py + ) + ;; + python3.13) + # TODO: segfaults on exit + return + ;; + esac + + cp -r "${BUILD_DIR}"/{install,test} || die + local -x PATH="${BUILD_DIR}/test${EPREFIX}/usr/bin:${PATH}" + cd "${BUILD_DIR}/test$(python_get_sitedir)" || die + + # copy test files from the source tree + cp -r "${WORKDIR}/test/${P}/python/google/protobuf/internal/." \ + google/protobuf/internal/ || die + # link the test data for text_format_test.py + # (it traverses directories upwards until to finds src/google...) + ln -s "${WORKDIR}/test/${P}/src" ../src || die + + # compile test-related protobufs + local test_protos=( + # from src + any_test.proto + map_proto2_unittest.proto + map_unittest.proto + unittest.proto + unittest_custom_options.proto + unittest_delimited.proto + unittest_delimited_import.proto + unittest_features.proto + unittest_import.proto + unittest_import_public.proto + unittest_legacy_features.proto + unittest_mset.proto + unittest_mset_wire_format.proto + unittest_no_field_presence.proto + unittest_no_generic_services.proto + unittest_proto3.proto + unittest_proto3_arena.proto + unittest_proto3_extensions.proto + unittest_retention.proto + util/json_format.proto + util/json_format_proto3.proto + # from python + internal/descriptor_pool_test1.proto + internal/descriptor_pool_test2.proto + internal/factory_test1.proto + internal/factory_test2.proto + internal/file_options_test.proto + internal/import_test_package/import_public.proto + internal/import_test_package/import_public_nested.proto + internal/import_test_package/inner.proto + internal/import_test_package/outer.proto + internal/message_set_extensions.proto + internal/missing_enum_values.proto + internal/more_extensions.proto + internal/more_messages.proto + internal/no_package.proto + internal/packed_field_test.proto + internal/self_recursive.proto + internal/test_bad_identifiers.proto + internal/test_proto2.proto + internal/test_proto3_optional.proto + internal/well_known_types_test.proto + ) + local proto + for proto in "${test_protos[@]}"; do + protoc --python_out=. -I"${WORKDIR}/test/${P}/src" -I. \ + "google/protobuf/${proto}" || die + done + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest -s +} diff --git a/dev-python/protobuf/protobuf-6.31.1.ebuild b/dev-python/protobuf/protobuf-6.31.1.ebuild new file mode 100644 index 000000000000..2972fa556c7d --- /dev/null +++ b/dev-python/protobuf/protobuf-6.31.1.ebuild @@ -0,0 +1,152 @@ +# Copyright 2008-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Default implementation currently is upb, which doesn't match dev-libs/protobuf +# https://github.com/protocolbuffers/protobuf/blob/main/python/README.md#implementation-backends + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Google's Protocol Buffers - Python bindings" +HOMEPAGE=" + https://protobuf.dev/ + https://pypi.org/project/protobuf/ +" +# Rename sdist to avoid conflicts with dev-libs/protobuf +SRC_URI=" + $(pypi_sdist_url) -> ${P}.py.tar.gz + test? ( + https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz + ) +" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-3)" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +# need protobuf compiler +BDEPEND=" + test? ( + dev-libs/protobuf + dev-python/absl-py[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pytest-forked[${PYTHON_USEDEP}] + ) +" + +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +src_unpack() { + unpack "${P}.py.tar.gz" + + if use test; then + mkdir "${WORKDIR}/test" || die + cd "${WORKDIR}/test" || die + unpack "${P}.gh.tar.gz" + fi +} + +src_prepare() { + distutils-r1_src_prepare + + # strip old-style namespace + rm google/__init__.py || die +} + +python_test() { + local EPYTEST_DESELECT=() + local EPYTEST_IGNORE=( + # TODO: figure out how to build the pybind11 test extension + google/protobuf/internal/recursive_message_pybind11_test.py + ) + + case ${EPYTHON} in + python3.11) + EPYTEST_IGNORE+=( + # syntax error... + google/protobuf/internal/json_format_test.py + ) + ;; + python3.14*) + EPYTEST_DESELECT+=( + # exception message mismatch + google/protobuf/internal/json_format_test.py::JsonFormatTest::testInvalidTimestamp + google/protobuf/internal/well_known_types_test.py::TimeUtilTest::testInvalidTimestamp + ) + ;; + esac + + cp -r "${BUILD_DIR}"/{install,test} || die + local -x PATH="${BUILD_DIR}/test${EPREFIX}/usr/bin:${PATH}" + cd "${BUILD_DIR}/test$(python_get_sitedir)" || die + + # copy test files from the source tree + cp -r "${WORKDIR}/test/${P}/python/google/protobuf/internal/." \ + google/protobuf/internal/ || die + # link the test data for text_format_test.py + # (it traverses directories upwards until to finds src/google...) + ln -s "${WORKDIR}/test/${P}/src" ../src || die + + # compile test-related protobufs + local test_protos=( + # from src + any_test.proto + map_proto2_unittest.proto + map_unittest.proto + unittest.proto + unittest_custom_options.proto + unittest_delimited.proto + unittest_delimited_import.proto + unittest_features.proto + unittest_import.proto + unittest_import_public.proto + unittest_legacy_features.proto + unittest_mset.proto + unittest_mset_wire_format.proto + unittest_no_field_presence.proto + unittest_no_generic_services.proto + unittest_proto3.proto + unittest_proto3_arena.proto + unittest_proto3_extensions.proto + unittest_retention.proto + util/json_format.proto + util/json_format_proto3.proto + # from python + internal/descriptor_pool_test1.proto + internal/descriptor_pool_test2.proto + internal/factory_test1.proto + internal/factory_test2.proto + internal/file_options_test.proto + internal/import_test_package/import_public.proto + internal/import_test_package/import_public_nested.proto + internal/import_test_package/inner.proto + internal/import_test_package/outer.proto + internal/message_set_extensions.proto + internal/missing_enum_values.proto + internal/more_extensions.proto + internal/more_messages.proto + internal/no_package.proto + internal/packed_field_test.proto + internal/self_recursive.proto + internal/test_bad_identifiers.proto + internal/test_proto2.proto + internal/test_proto3_optional.proto + internal/well_known_types_test.proto + ) + local proto + for proto in "${test_protos[@]}"; do + protoc --python_out=. -I"${WORKDIR}/test/${P}/src" -I. \ + "google/protobuf/${proto}" || die + done + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + # pytest-forked prevents segfault on py3.13 + epytest -p pytest_forked --forked +} diff --git a/dev-python/translate-toolkit/translate-toolkit-3.15.2.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.15.2.ebuild index bb4e573c692e..31f6e0946ed1 100644 --- a/dev-python/translate-toolkit/translate-toolkit-3.15.2.ebuild +++ b/dev-python/translate-toolkit/translate-toolkit-3.15.2.ebuild @@ -23,7 +23,7 @@ S="${WORKDIR}"/${MY_P} LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" +KEYWORDS="amd64 arm64 x86" IUSE="+html +ical +ini +subtitles +yaml" RDEPEND=" -- cgit v1.3