diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-04-05 06:50:21 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-04-05 06:50:21 +0000 |
| commit | 20e9076f1be511fb2cfd93b574ceb4306f6c45fe (patch) | |
| tree | 31ecfbc39ed1626ffe07c740e06594f95c4473ec /dev-python | |
| parent | e5e8bab3346a9a93a8acb773e397e67814a1ef37 (diff) | |
| download | baldeagleos-repo-20e9076f1be511fb2cfd93b574ceb4306f6c45fe.tar.gz baldeagleos-repo-20e9076f1be511fb2cfd93b574ceb4306f6c45fe.tar.xz baldeagleos-repo-20e9076f1be511fb2cfd93b574ceb4306f6c45fe.zip | |
Adding metadata
Diffstat (limited to 'dev-python')
| -rw-r--r-- | dev-python/gherkin-official/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/gherkin-official/gherkin-official-32.1.0.ebuild (renamed from dev-python/gherkin-official/gherkin-official-32.0.1.ebuild) | 0 | ||||
| -rw-r--r-- | dev-python/langdetect/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch | 13 | ||||
| -rw-r--r-- | dev-python/langdetect/langdetect-1.0.9.ebuild | 4 | ||||
| -rw-r--r-- | dev-python/langdetect/metadata.xml | 10 | ||||
| -rw-r--r-- | dev-python/pika/pika-1.3.2.ebuild | 2 | ||||
| -rw-r--r-- | dev-python/protobuf/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/protobuf/protobuf-6.30.2.ebuild | 29 | ||||
| -rw-r--r-- | dev-python/pyside/Manifest | 3 | ||||
| -rw-r--r-- | dev-python/pyside/pyside-6.8.2-r1.ebuild | 51 | ||||
| -rw-r--r-- | dev-python/pyside/pyside-6.8.3.ebuild | 27 | ||||
| -rw-r--r-- | dev-python/pyside/pyside-6.9.0.ebuild | 507 | ||||
| -rw-r--r-- | dev-python/pyside/pyside-6.9.9999.ebuild | 27 | ||||
| -rw-r--r-- | dev-python/pyside/pyside-6.9999.ebuild | 27 |
15 files changed, 633 insertions, 72 deletions
diff --git a/dev-python/gherkin-official/Manifest b/dev-python/gherkin-official/Manifest index 69feb54bbbe2..d875aae49328 100644 --- a/dev-python/gherkin-official/Manifest +++ b/dev-python/gherkin-official/Manifest @@ -1,3 +1,3 @@ DIST gherkin-30.0.4.gh.tar.gz 3858403 BLAKE2B bdf5cf80f1e06c9e8464d3fbc5a56a594b75f3d8ae6ff13dafcd583aa6571e1a6ba4aa4dd344f7c532174b09829bdaf9aae1e1e02339521e2836dbf9b3014108 SHA512 52cd5bab779e46d5d2c451558b545fb8ac408d1d5d11558e1dace94d77472ca271589eb183c412093fcbdef2574a495fdd11c98ce97d8146077a54b3369a9a6e DIST gherkin-32.0.0.gh.tar.gz 3842521 BLAKE2B b0afbf2638bd85817a141e2f89bd81e9ba564c96ddcbfa56f803d7239736864e1047bed6d0fa1a48edb0dac88553b8777e530b6fd06a82d71e4e971105f68020 SHA512 2ce444bde2d1e4ed3f1214205e4dd43cfa21c0f31d5194cfa9da6aeabdf2f0ac70966f1d98617b9d8f3633dadae6b773d67a6f050f0e37ae477c594b0e670aa9 -DIST gherkin-32.0.1.gh.tar.gz 3842698 BLAKE2B 8da8b41b08eb25df8ec55fb6c46f78d3d985a3ebded0cd0be2073f6c8a08f6e662ee53834830ed7e3f658cec86ae28f2e9f15777d39e4355e387b3b12ebccfbf SHA512 f1154a237f727aeea5c64363607d61bbf75338b4173134a58d6155749f1f555b05d3017cd247161c93fbc7952a933c9904d1a607de9a5251fe1e8318b3a4ca1b +DIST gherkin-32.1.0.gh.tar.gz 3846973 BLAKE2B 9d53b7d938765ee177952fb799c0abec16003875cdc5f93997460a0369f7c03bcbfd93afa629664480d38f5920239d6554a284ef68e027f68205a4ec26026a47 SHA512 e26663c1834579623f1ac15a54c2ede854aa60598d1941c8cda793147115347f46dc5c56f0012f661e5654f4c6ca6b665729431024e6acd9961f2024cb6c1d9c diff --git a/dev-python/gherkin-official/gherkin-official-32.0.1.ebuild b/dev-python/gherkin-official/gherkin-official-32.1.0.ebuild index 5eb5ba433d9f..5eb5ba433d9f 100644 --- a/dev-python/gherkin-official/gherkin-official-32.0.1.ebuild +++ b/dev-python/gherkin-official/gherkin-official-32.1.0.ebuild diff --git a/dev-python/langdetect/Manifest b/dev-python/langdetect/Manifest index 37a64204a00a..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 9b3521c5721afa49a58e0c35267f7d82bb56bd7e1d6d3152be0d36cd220180a526cb20b90b1113fbf0fff4a512137570f0b3bcf864498b7b7cc00403cb61ca27 SHA512 16d311400bf84a5f04e15f3da4b68b2810e4b005009f4d03dc8a487176dfc294403c976c412c83dcfa8084a49ef7b7d5389b43fb2ba446ce107ce4595e3558c6 -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..eb2586280d80 100644 --- a/dev-python/langdetect/langdetect-1.0.9.ebuild +++ b/dev-python/langdetect/langdetect-1.0.9.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022 Gentoo Authors +# Copyright 2022-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -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 @@ <!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>marcin.deranek@slonko.net</email> - <name>Marcin Deranek</name> + <email>pastalian46@gmail.com</email> + <name>Takuya Wakazono</name> </maintainer> - <upstream> - <bugs-to>https://github.com/Mimino666/langdetect/issues</bugs-to> - </upstream> - <origin>slonko-overlay</origin> + + <origin>gentoo-guru-overlay</origin> </pkgmetadata>
\ No newline at end of file diff --git a/dev-python/pika/pika-1.3.2.ebuild b/dev-python/pika/pika-1.3.2.ebuild index 78047381ce65..5613c19ef5c5 100644 --- a/dev-python/pika/pika-1.3.2.ebuild +++ b/dev-python/pika/pika-1.3.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 diff --git a/dev-python/protobuf/Manifest b/dev-python/protobuf/Manifest index f159ab88d003..252c57e23818 100644 --- a/dev-python/protobuf/Manifest +++ b/dev-python/protobuf/Manifest @@ -9,6 +9,7 @@ DIST protobuf-5.28.0.py.tar.gz 422388 BLAKE2B 208f92bdb2bc0b92dca76de4d13eda0c98 DIST protobuf-5.28.3.py.tar.gz 422479 BLAKE2B ce571a63641cbb9af0aafd21b140c0732028bf04ae5aafe60301b3b1e31defc9b4d7d1d8f088e5b01fa7911617230feb5f58e38c0909b8f88676e62c59385a69 SHA512 5c42d50c6fbccf03acb95872d3233f75ff20333924e4eba6b36c095824f850121c9aa1664a5826dcb3a7dc79e9647e4f7decdee0d78a1a8557373613645d6507 DIST protobuf-5.29.2.py.tar.gz 424901 BLAKE2B ea90ff2bda8e2d264b9870d34a2aecf3e86691d144b420c39db1bcfb425723ef91ece5a2d7d448d026160866ee93d2c5d0e506a99712a5c22165f7c07865dc54 SHA512 7b7a0b116f03e5c64e9342ac0f9143bf8a41fe716697bcd58e20a410fb5d1043a174e68b33209178c5e3605421a145a11a17338ca1171597194eb0a5cfd2e63d DIST protobuf-5.29.4.py.tar.gz 424902 BLAKE2B 54941b008ff5ebd007076448828564128d98e9a6a4613c87057c359124940d341358fe28107b929e3e842ac7e1b34ed54c30219ed95cbb418826592e2458a01f SHA512 634faf103ed8320762593689796d26e6b988e1b40277b12dc7356983c07d5d1da8cac1530e4f16c0a1494abfb885f26bf9884988029e863515cf535c62d96c77 +DIST protobuf-6.30.2.py.tar.gz 429315 BLAKE2B 6b56e23a8a962ce9da282ec49c4807877f4bfb677ad84bb6930b83cc436e9839f5791cfb19105678881c8361e27d62d3dde51e5e6c42f7a0e146d9e469282780 SHA512 48ddb2b63acc91759ba4243926c50bb0d16601aace9019129975701634b77a59415659751c69b06464afe994a0fbbd8da6640a208b743ba7df8bf6d60c5ec2b9 DIST protobuf-python-4.25.4.tar.gz 380283 BLAKE2B 3ded7b654fa4db54b0dff2309f096bcab634b9d587bd94dae4ab49fb2fe9dc8f821c52deed43b026e06189b3b7a1a6697074942c1fa732ec82257233bf1b2f90 SHA512 7b91a9473fafe62b723741faec8e8531c604b025a49ef8be79778f8a48c84c475518447b24f5a08a0a8a8ecb1ff22e2106a3183197b76be3b2b8c6c994d93920 DIST protobuf-python-5.27.2.tar.gz 401640 BLAKE2B 9d3420b75536ffd452cc2a3317a6ad1e16a62df36085f1e329f0178026032f5533e1a96f7b613f91093ac12a44d7ad4059ebededea636f38ded29da563afd075 SHA512 b3afcf13e223d7e855ac0aa000cc395e3ea1301b2e3dfe3c0d5435d8031be3726e6aec1fb6228c572aa1685f75aba2d97d2c9dfdb6d9e058a2e88321d6ba9180 DIST protobuf-python-5.27.4.tar.gz 401622 BLAKE2B 4a7f211a4f4b3e7a338f8be6a7c6cdec2df629d6f9b62dfc276d6029864dfb541468a5e4d221f4540ae9281e5fc622ee898daeb178f9d98bac9932af0c8625db SHA512 2b817947363ab8d31bd484c18d33234004c7f5e6cb7bff55657cc33e1f325e22c7ccf83c19e255e839d6061fc62d632af9b36bc4fef0d4b33623b278239043b2 diff --git a/dev-python/protobuf/protobuf-6.30.2.ebuild b/dev-python/protobuf/protobuf-6.30.2.ebuild new file mode 100644 index 000000000000..4417da5d09e0 --- /dev/null +++ b/dev-python/protobuf/protobuf-6.30.2.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/pyside/Manifest b/dev-python/pyside/Manifest index fa25a392610a..a0a8a1083f76 100644 --- a/dev-python/pyside/Manifest +++ b/dev-python/pyside/Manifest @@ -1,2 +1,3 @@ -DIST pyside-pyside-setup-6.8.2.gh.tar.gz 19305680 BLAKE2B d4da8ec63d35714bf4418cdc9ff5921fe554c1635a7c5c467657b64c2140208b4bba57fc9932f0f96426e1d15c124209b0b29eb9340261d34eed194128a03545 SHA512 30691d27afaeaa3117e68b60745918d9697c8d9e4ee8941eaab51995cb5128c56d44964511f2db731f448bf32219160032e4a4cd4773d3fccc4de8c0e509d1c1 +DIST pyside-setup-everywhere-src-6.8.2.tar.xz 16609596 BLAKE2B 7e4f12cf81d649e2d7e52ff31eedda55db29650230e5dac2a930d38827d7e43101309a601e0dc3ccebea0274f006f25c9a6be79baa3d0390526dbb8583920230 SHA512 cc522143974d08133d68d3259caa5127916534e16678693866d65965a546db98b5b1b07d92f7c0918b7c8fb10213d94ad50259b22cf9ebc2a63b985068d75452 DIST pyside-setup-everywhere-src-6.8.3.tar.xz 16611768 BLAKE2B 119696fc184c5caa450807dab6acae903a9a2b1e98b5c641659fdb77bfcb855e3a7cb8abb4fbc0d22c5df9312ce924599aff615e28bedd45b9ee30e88dee8b56 SHA512 a7d1bbd0edd8c42e6925bf880e5ee613391fb1d75f2880598577c49fe90d0c0b81907fd4cd3032ba665bcf70a6915e0ee1a8648c7012a28e598d5c7eb6da1bfe +DIST pyside-setup-everywhere-src-6.9.0.tar.xz 16652756 BLAKE2B 38c8580d4e0854d58853ac74568a234f4a9d352e26b49e35eb0b76baaad2e304786dc119bfd00b18b7df006a37d09f4a9a02b89c11f145a8b74b40ecd5c15106 SHA512 b5f574397e0e1a891a3d305d91dc8b91a149bfd6427dde29f2900052a63dc684f238eca511386fdd891d0e343615c1f1b05c050a4aa63f8fcae70075c2ab4f70 diff --git a/dev-python/pyside/pyside-6.8.2-r1.ebuild b/dev-python/pyside/pyside-6.8.2-r1.ebuild index 5a591c8a7ea5..7977390fc154 100644 --- a/dev-python/pyside/pyside-6.8.2-r1.ebuild +++ b/dev-python/pyside/pyside-6.8.2-r1.ebuild @@ -1,6 +1,11 @@ # Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# NOTE: We combine here several PyPI packages, we do this because +# pyside can and does break if it is compiled with a different +# toolchain then was used to build shiboken. This bundling ensures +# that we always use the same toolchain for all components. + EAPI=8 PYTHON_COMPAT=( python3_{9,10,11,12,13} ) @@ -10,17 +15,28 @@ DISTUTILS_EXT=1 inherit distutils-r1 llvm-r1 multiprocessing qmake-utils virtualx -MY_PN=pyside-pyside-setup +MY_PN=${PN}-setup-everywhere-src MY_P=${MY_PN}-${PV} DESCRIPTION="Python bindings for the Qt framework" HOMEPAGE="https://wiki.qt.io/PySide6" -SRC_URI="https://github.com/qtproject/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.gh.tar.gz" -S="${WORKDIR}/${MY_P}" + +if [[ ${PV} == *.9999 ]]; then + inherit git-r3 + EGIT_REPO_URI=( + "https://code.qt.io/${PN}/${PN}-setup.git" + "https://github.com/qtproject/${PN}-${PN}-setup.git" + ) + EGIT_BRANCH=dev + [[ ${PV} == 6.*.9999 ]] && EGIT_BRANCH=${PV%.9999} +else + SRC_URI="https://download.qt.io/official_releases/QtForPython/${PN}6/PySide6-${PV}-src/${MY_P}.tar.xz" + S="${WORKDIR}/${MY_P}" + KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv ~x86" +fi LICENSE="|| ( GPL-2 GPL-3 LGPL-3 )" SLOT="6/${PV}" -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv ~x86" # If a flag enables multiple Qt modules, they should be ordered # according to their dependencies, e.g. for 3d, 3DCore must be first. @@ -107,7 +123,7 @@ declare -A QT_REQUIREMENTS=( ["webchannel"]="core" ["webengine"]="core gui network printsupport quick webchannel" ["websockets"]="network" - ["webview"]="gui" + ["webview"]="gui quick webengine" ["widgets"]="gui" ["xml"]="core" ) @@ -345,9 +361,15 @@ python_compile() { --build-type=shiboken6 ) distutils-r1_python_compile + + # The build system uses its own build dir, find the name of this dir. + local pyside_build_dir=$(find "${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))" -maxdepth 1 -type d -name 'qfp-*' -printf "%f\n") + export BUILD_ID=${pyside_build_dir#qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-} + DISTUTILS_ARGS=( "${MAIN_DISTUTILS_ARGS[@]}" --reuse-build + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" --build-type=shiboken6-generator ) distutils-r1_python_compile @@ -356,7 +378,7 @@ python_compile() { DISTUTILS_ARGS=( "${MAIN_DISTUTILS_ARGS[@]}" --reuse-build - --shiboken-target-path="$(find "${BUILD_DIR}/build" -type d -name cmake)/../../" + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" --build-type=pyside6 ) distutils-r1_python_compile @@ -410,7 +432,7 @@ python_compile() { done # Install misc files from inner install dir - find "${BUILD_DIR}"/build/*/install -type f \ + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type f \ -name libPySidePlugin.so -exec \ mkdir -p "${BUILD_DIR}/install/$(qt6_get_plugindir)/designer/" \; \ -exec \ @@ -418,7 +440,7 @@ python_compile() { || die for dir in cmake pkgconfig; do - find "${BUILD_DIR}"/build/*/install -type d -name ${dir} \ + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type d -name ${dir} \ -exec cp -r "{}" "${BUILD_DIR}/install/usr/lib/" \; \ || die done @@ -470,18 +492,11 @@ python_compile() { } python_test() { - # figure out the build dir - local build_dir build_classifier - build_dir=$(ls -d "${BUILD_DIR}"/build/qfp-*/build/) - build_classifier="${build_dir##${BUILD_DIR}/build/qfp-}" - build_classifier="${build_dir%%/build}" - # Otherwise it picks the last built directory breaking assumption for multi target builds mkdir -p build_history/9999-99-99_999999/ || die - cat <<- EOF > build_history/9999-99-99_999999/build_dir.txt || die - ${build_dir} - ${build_classifier} - EOF + local pyside_build_dir=qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-${BUILD_ID} + echo "$(ls -d "${BUILD_DIR}"/build*/${pyside_build_dir}/build | sort -V | tail -n 1)" > build_history/9999-99-99_999999/build_dir.txt || die + echo "${pyside_build_dir}" >> build_history/9999-99-99_999999/build_dir.txt || die virtx ${EPYTHON} testrunner.py test --projects=shiboken6 $(usev core '--projects=pyside6') || die "Tests failed with ${EPYTHON}" diff --git a/dev-python/pyside/pyside-6.8.3.ebuild b/dev-python/pyside/pyside-6.8.3.ebuild index 5dcfb9bcdbe8..4d25a464be7f 100644 --- a/dev-python/pyside/pyside-6.8.3.ebuild +++ b/dev-python/pyside/pyside-6.8.3.ebuild @@ -30,7 +30,7 @@ if [[ ${PV} == *.9999 ]]; then EGIT_BRANCH=dev [[ ${PV} == 6.*.9999 ]] && EGIT_BRANCH=${PV%.9999} else - SRC_URI="https://download.qt.io/official_releases/QtForPython/${PN}6/PySide6-6.8.3-src/${MY_P}.tar.xz" + SRC_URI="https://download.qt.io/official_releases/QtForPython/${PN}6/PySide6-${PV}-src/${MY_P}.tar.xz" S="${WORKDIR}/${MY_P}" KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" fi @@ -359,9 +359,15 @@ python_compile() { --build-type=shiboken6 ) distutils-r1_python_compile + + # The build system uses its own build dir, find the name of this dir. + local pyside_build_dir=$(find "${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))" -maxdepth 1 -type d -name 'qfp-*' -printf "%f\n") + export BUILD_ID=${pyside_build_dir#qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-} + DISTUTILS_ARGS=( "${MAIN_DISTUTILS_ARGS[@]}" --reuse-build + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" --build-type=shiboken6-generator ) distutils-r1_python_compile @@ -370,7 +376,7 @@ python_compile() { DISTUTILS_ARGS=( "${MAIN_DISTUTILS_ARGS[@]}" --reuse-build - --shiboken-target-path="$(find "${BUILD_DIR}/build" -type d -name cmake)/../../" + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" --build-type=pyside6 ) distutils-r1_python_compile @@ -424,7 +430,7 @@ python_compile() { done # Install misc files from inner install dir - find "${BUILD_DIR}"/build/*/install -type f \ + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type f \ -name libPySidePlugin.so -exec \ mkdir -p "${BUILD_DIR}/install/$(qt6_get_plugindir)/designer/" \; \ -exec \ @@ -432,7 +438,7 @@ python_compile() { || die for dir in cmake pkgconfig; do - find "${BUILD_DIR}"/build/*/install -type d -name ${dir} \ + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type d -name ${dir} \ -exec cp -r "{}" "${BUILD_DIR}/install/usr/lib/" \; \ || die done @@ -484,18 +490,11 @@ python_compile() { } python_test() { - # figure out the build dir - local build_dir build_classifier - build_dir=$(ls -d "${BUILD_DIR}"/build/qfp-*/build/) - build_classifier="${build_dir##${BUILD_DIR}/build/qfp-}" - build_classifier="${build_dir%%/build}" - # Otherwise it picks the last built directory breaking assumption for multi target builds mkdir -p build_history/9999-99-99_999999/ || die - cat <<- EOF > build_history/9999-99-99_999999/build_dir.txt || die - ${build_dir} - ${build_classifier} - EOF + local pyside_build_dir=qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-${BUILD_ID} + echo "$(ls -d "${BUILD_DIR}"/build*/${pyside_build_dir}/build | sort -V | tail -n 1)" > build_history/9999-99-99_999999/build_dir.txt || die + echo "${pyside_build_dir}" >> build_history/9999-99-99_999999/build_dir.txt || die virtx ${EPYTHON} testrunner.py test --projects=shiboken6 $(usev core '--projects=pyside6') || die "Tests failed with ${EPYTHON}" diff --git a/dev-python/pyside/pyside-6.9.0.ebuild b/dev-python/pyside/pyside-6.9.0.ebuild new file mode 100644 index 000000000000..4d25a464be7f --- /dev/null +++ b/dev-python/pyside/pyside-6.9.0.ebuild @@ -0,0 +1,507 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# NOTE: We combine here several PyPI packages, we do this because +# pyside can and does break if it is compiled with a different +# toolchain then was used to build shiboken. This bundling ensures +# that we always use the same toolchain for all components. + +EAPI=8 + +PYTHON_COMPAT=( python3_{9,10,11,12,13} ) +LLVM_COMPAT=( {16..20} ) +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_EXT=1 + +inherit distutils-r1 llvm-r1 multiprocessing qmake-utils virtualx + +MY_PN=${PN}-setup-everywhere-src +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Python bindings for the Qt framework" +HOMEPAGE="https://wiki.qt.io/PySide6" + +if [[ ${PV} == *.9999 ]]; then + inherit git-r3 + EGIT_REPO_URI=( + "https://code.qt.io/${PN}/${PN}-setup.git" + "https://github.com/qtproject/${PN}-${PN}-setup.git" + ) + EGIT_BRANCH=dev + [[ ${PV} == 6.*.9999 ]] && EGIT_BRANCH=${PV%.9999} +else + SRC_URI="https://download.qt.io/official_releases/QtForPython/${PN}6/PySide6-${PV}-src/${MY_P}.tar.xz" + S="${WORKDIR}/${MY_P}" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +fi + +LICENSE="|| ( GPL-2 GPL-3 LGPL-3 )" +SLOT="6/${PV}" + +# If a flag enables multiple Qt modules, they should be ordered +# according to their dependencies, e.g. for 3d, 3DCore must be first. +# Widgets for various modules are handled as a special case later +declare -A QT_MODULES=( + ["3d"]="3DCore 3DRender 3DLogic 3DInput 3DAnimation 3DExtras" + ["bluetooth"]="Bluetooth" + ["charts"]="Charts" + ["+concurrent"]="Concurrent" + ["+core"]="Core" + ["+dbus"]="DBus" + ["designer"]="Designer" + ["+gui"]="Gui" + ["help"]="Help" + ["httpserver"]="HttpServer" + ["location"]="Location" + ["multimedia"]="Multimedia" # plus widgets + ["network-auth"]="NetworkAuth" + ["+network"]="Network" + ["nfc"]="Nfc" + ["+opengl"]="OpenGL" # plus widgets + ["pdfium"]="Pdf" # plus widgets + ["positioning"]="Positioning" + ["+printsupport"]="PrintSupport" + ["qml"]="Qml" + ["quick3d"]="Quick3D" + ["quick"]="Quick" # plus widgets + ["remoteobjects"]="RemoteObjects" + ["scxml"]="Scxml" + ["sensors"]="Sensors" + ["serialbus"]="SerialBus" + ["serialport"]="SerialPort" + ["spatialaudio"]="SpatialAudio" + ["+sql"]="Sql" + ["svg"]="Svg" # plus widgets + ["speech"]="TextToSpeech" + ["+testlib"]="Test" + ["uitools"]="UiTools" + ["webchannel"]="WebChannel" + ["webengine"]="WebEngineCore" # plus widgets and quick + ["websockets"]="WebSockets" + ["webview"]="WebView" + ["+widgets"]="Widgets" + ["+xml"]="Xml" +) + +# Manually reextract these requirements on version bumps by running the +# following one-liner from within "${S}": +# $ grep 'set.*_deps' PySide6/Qt*/CMakeLists.txt +declare -A QT_REQUIREMENTS=( + ["3d"]="gui network opengl" + ["bluetooth"]="core" + ["charts"]="core gui widgets" + ["concurrent"]="core" + ["dbus"]="core" + ["designer"]="widgets" + ["gles2-only"]="gui" + ["gui"]="core" + ["help"]="widgets" + ["httpserver"]="core concurrent network websockets" + ["location"]="core positioning" + ["multimedia"]="core gui network" + ["network-auth"]="network" + ["network"]="core" + ["nfc"]="core" + ["opengl"]="gui" + ["pdfium"]="core gui network" + ["positioning"]="core" + ["printsupport"]="widgets" + ["qml"]="network" + ["quick"]="gui network qml opengl" + ["quick3d"]="gui network qml quick" + ["remoteobjects"]="core network" + ["scxml"]="core" + ["sensors"]="core" + ["serialbus"]="core network serialport" + ["serialport"]="core" + ["spatialaudio"]="core gui network multimedia" + ["speech"]="core multimedia" + ["sql"]="widgets" + ["svg"]="gui" + ["testlib"]="widgets" + ["uitools"]="widgets" + ["webchannel"]="core" + ["webengine"]="core gui network printsupport quick webchannel" + ["websockets"]="network" + ["webview"]="gui quick webengine" + ["widgets"]="gui" + ["xml"]="core" +) + +IUSE="${!QT_MODULES[@]} debug doc gles2-only numpy test tools" +RESTRICT="!test? ( test )" + +# majority of QtQml tests require QtQuick support +REQUIRED_USE=" + test? ( + qml? ( quick ) + ) +" +for requirement in ${!QT_REQUIREMENTS[@]}; do + REQUIRED_USE+=" ${requirement}? ( ${QT_REQUIREMENTS[${requirement}]} ) " +done + +# Minimal supported version of Qt. +QT_PV="$(ver_cut 1-3)*:6" + +# WebEngine needs sound support, so enable either pulseaudio or alsa +RDEPEND=" + =dev-qt/qtbase-${QT_PV}[concurrent?,dbus?,gles2-only=,network?,opengl?,sql?,widgets?,xml?] + 3d? ( =dev-qt/qt3d-${QT_PV}[qml?,gles2-only=] ) + bluetooth? ( =dev-qt/qtconnectivity-${QT_PV}[bluetooth] ) + charts? ( =dev-qt/qtcharts-${QT_PV} ) + designer? ( =dev-qt/qttools-${QT_PV}[designer,widgets,gles2-only=] ) + gui? ( + =dev-qt/qtbase-${QT_PV}[gui,jpeg(+)] + x11-libs/libxkbcommon + ) + help? ( =dev-qt/qttools-${QT_PV}[assistant,gles2-only=] ) + httpserver? ( =dev-qt/qthttpserver-${QT_PV} ) + location? ( =dev-qt/qtlocation-${QT_PV} ) + multimedia? ( =dev-qt/qtmultimedia-${QT_PV}[widgets(+)?] ) + network? ( =dev-qt/qtbase-${QT_PV}[ssl] ) + network-auth? ( =dev-qt/qtnetworkauth-${QT_PV} ) + nfc? ( =dev-qt/qtconnectivity-${QT_PV}[nfc] ) + numpy? ( >=dev-python/numpy-2.1.3[${PYTHON_USEDEP}] ) + pdfium? ( =dev-qt/qtwebengine-${QT_PV}[pdfium(-),widgets?] ) + positioning? ( =dev-qt/qtpositioning-${QT_PV} ) + printsupport? ( =dev-qt/qtbase-${QT_PV}[gui,widgets] ) + qml? ( =dev-qt/qtdeclarative-${QT_PV}[opengl?,widgets?] ) + quick3d? ( =dev-qt/qtquick3d-${QT_PV}[opengl?] ) + remoteobjects? ( =dev-qt/qtremoteobjects-${QT_PV} ) + scxml? ( =dev-qt/qtscxml-${QT_PV} ) + sensors? ( =dev-qt/qtsensors-${QT_PV}[qml?] ) + speech? ( =dev-qt/qtspeech-${QT_PV} ) + serialbus? ( =dev-qt/qtserialbus-${QT_PV} ) + serialport? ( =dev-qt/qtserialport-${QT_PV} ) + svg? ( =dev-qt/qtsvg-${QT_PV} ) + testlib? ( =dev-qt/qtbase-${QT_PV}[gui] ) + tools? ( + =dev-qt/qtbase-${QT_PV} + =dev-qt/qtdeclarative-${QT_PV}[qmlls] + =dev-qt/qttools-${QT_PV}[assistant,designer,linguist] + dev-python/pkginfo[${PYTHON_USEDEP}] + ) + uitools? ( =dev-qt/qttools-${QT_PV}[gles2-only=,widgets] ) + webchannel? ( =dev-qt/qtwebchannel-${QT_PV} ) + webengine? ( || ( + =dev-qt/qtwebengine-${QT_PV}[alsa,widgets?] + =dev-qt/qtwebengine-${QT_PV}[pulseaudio,widgets?] + ) + ) + websockets? ( =dev-qt/qtwebsockets-${QT_PV} ) + webview? ( =dev-qt/qtwebview-${QT_PV} ) + !dev-python/pyside:0 + !dev-python/shiboken6 + !dev-python/pyside6-tools +" + +DEPEND="${RDEPEND} + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + dev-util/vulkan-headers + test? ( =dev-qt/qtbase-${QT_PV}[gui] ) +" # testlib is toggled by the gui flag on qtbase + +BDEPEND=" + dev-build/cmake + dev-python/distro[${PYTHON_USEDEP}] + dev-util/patchelf + doc? ( + >=dev-libs/libxml2-2.6.32 + >=dev-libs/libxslt-1.1.19 + media-gfx/graphviz + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/myst-parser[${PYTHON_USEDEP}] + ) + numpy? ( dev-python/numpy[${PYTHON_USEDEP}] ) +" + +PATCHES=( + # Needs porting to newer wheel and setuptools + "${FILESDIR}/${PN}-6.8.2-quick-fix-build-wheel.patch" +) + +# Build system duplicates system libraries. TODO: fix +QA_PREBUILT=( + "/usr/lib/python*/site-packages/PySide6/*" +) + +python_prepare_all() { + distutils-r1_python_prepare_all + + # Shiboken6 assumes Vulkan headers live under either "$VULKAN_SDK/include" + # or "$VK_SDK_PATH/include" rather than "${EPREFIX}/usr/include/vulkan". + sed -i -e "s~\bdetectVulkan(&headerPaths);~headerPaths.append(HeaderPath{QByteArrayLiteral(\"${EPREFIX}/usr/include/vulkan\"), HeaderType::System});~" \ + sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp || die + + # Shiboken6 assumes the "/usr/lib/clang/${CLANG_NEWEST_VERSION}/include/" + # subdirectory provides Clang builtin includes (e.g., "stddef.h") for the + # currently installed version of Clang, where ${CLANG_NEWEST_VERSION} is + # the largest version specifier that exists under the "/usr/lib/clang/" + # subdirectory. This assumption is false in edge cases, including when + # users downgrade from newer Clang versions but fail to remove those + # versions with "emerge --depclean". See also: + # https://github.com/leycec/raiagent/issues/85 + # + # Sadly, the clang-* family of functions exported by the "toolchain-funcs" + # eclass are defective, returning nonsensical placeholder strings if the + # end user has *NOT* explicitly configured their C++ compiler to be Clang. + # PySide6 does *NOT* care whether the end user has done so or not, as + # PySide6 unconditionally requires Clang in either case. See also: + # https://bugs.gentoo.org/619490 + sed -e \ + 's~(findClangBuiltInIncludesDir())~(QStringLiteral("'"${EPREFIX}"'/usr/lib/clang/'"${LLVM_SLOT}"'/include"))~' \ + -i sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp || die + + # blacklist.txt works like XFAIL + cat <<- EOF >> build_history/blacklist.txt || die + # segfaults with QOpenGLContext::create + [pysidetest::qapp_like_a_macro_test] + linux + # Tries to execute pip install + [pyside6-deploy::test_pyside6_deploy] + linux + [pyside6-android-deploy::test_pyside6_android_deploy] + linux + EOF + + if ! use numpy; then + cat <<- EOF >> build_history/blacklist.txt || die + # Requires numpy support to pass + [sample::array_numpy] + linux + [sample::nontypetemplate] + linux + [QtGui::qpainter_test] + linux + EOF + fi +} + +python_configure_all() { + ENABLED_QT_MODULES=() + + # The order matters, dependencies must come first so process + # REQUIRED_USE and recursively enable modules + enable_qt_mod() { + local flag=${1} + local modules=${QT_MODULES[${flag}]} + if [[ -z ${modules} ]]; then + die "incorrect flag=${flag}, not registered" + fi + local dependencies=${QT_REQUIREMENTS[${flag//+}]} + if [[ -n ${dependencies} ]]; then + local depflag + for depflag in ${dependencies}; do + if use ${depflag}; then + if [[ -z ${QT_MODULES[${depflag}]} ]]; then + depflag=+${depflag} + fi + enable_qt_mod ${depflag} + else + die "${depflag} is required but not enabled" + fi + done + fi + if [[ "${ENABLED_QT_MODULES[*]}" != *${modules}* ]]; then + ENABLED_QT_MODULES+=( ${modules} ) + fi + } + # Enable specified qt modules + local flag + for flag in ${!QT_MODULES[@]}; do + if use ${flag//+}; then + enable_qt_mod ${flag} + fi + done + + # Special cases + if use widgets; then + use multimedia && ENABLED_QT_MODULES+=( MultimediaWidgets ) + use opengl && ENABLED_QT_MODULES+=( OpenGLWidgets ) + use pdfium && ENABLED_QT_MODULES+=( PdfWidgets ) + use quick && ENABLED_QT_MODULES+=( QuickWidgets ) + use svg && ENABLED_QT_MODULES+=( SvgWidgets ) + use webengine && ENABLED_QT_MODULES+=( WebEngineWidgets ) + fi + if use quick; then + use webengine && ENABLED_QT_MODULES+=( WebEngineQuick ) + use testlib && ENABLED_QT_MODULES+=( QuickTest ) + fi + + # Arguments listed in options.py + MAIN_DISTUTILS_ARGS=( + --cmake="${EPREFIX}/usr/bin/cmake" + --ignore-git + --limited-api=no + --module-subset="$(printf '%s,' "${ENABLED_QT_MODULES[@]}")" + --no-strip + --no-size-optimization + --openssl="${EPREFIX}/usr/bin/openssl" + --qt=$(ver_cut 1-3) + --qtpaths=$(qt6_get_bindir)/qtpaths + --verbose-build + --parallel=$(makeopts_jobs) + $(usex debug "--debug" "--relwithdebinfo") + $(usex doc "--build-docs" "--skip-docs") + $(usex numpy "--enable-numpy-support" "--disable-numpy-support") + $(usex test "--build-tests --use-xvfb" "") + $(usex tools "" "--no-qt-tools") + ) +} + +python_compile() { + DISTUTILS_ARGS=( + "${MAIN_DISTUTILS_ARGS[@]}" + --build-type=shiboken6 + ) + distutils-r1_python_compile + + # The build system uses its own build dir, find the name of this dir. + local pyside_build_dir=$(find "${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))" -maxdepth 1 -type d -name 'qfp-*' -printf "%f\n") + export BUILD_ID=${pyside_build_dir#qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-} + + DISTUTILS_ARGS=( + "${MAIN_DISTUTILS_ARGS[@]}" + --reuse-build + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" + --build-type=shiboken6-generator + ) + distutils-r1_python_compile + # If no pyside modules enabled, build just shiboken + if [[ ${#ENABLED_QT_MODULES[@]} -gt 0 ]]; then + DISTUTILS_ARGS=( + "${MAIN_DISTUTILS_ARGS[@]}" + --reuse-build + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" + --build-type=pyside6 + ) + distutils-r1_python_compile + fi + + # Link libraries to the usual location for backwards compatibility + pushd "${BUILD_DIR}/install/$(python_get_sitedir)" >/dev/null || + die + mkdir -p "${BUILD_DIR}/install/usr/$(get_libdir)" || die + local lib + for lib in */*.cpython-*.so + do + local base=${lib##*/} + ln -s "${base}" "${lib%/*}/${base%%.*}-${EPYTHON}.so" || + die + done + for lib in */*.cpython-*.so.$(ver_cut 1-2) + do + local base=${lib##*/} + ln -s "${base}" "${lib%/*}/${base%%.*}-${EPYTHON}.so.$(ver_cut 1-2)" || + die + done + for lib in */*.so*; do + ln -s "../../$(python_get_sitedir)/${lib}" \ + "${BUILD_DIR}/install/usr/$(get_libdir)/${lib#*/}" || die + done + popd >/dev/null || die + + # Symlinks for compatibility with pypi wheels + local dir + if [[ -d ${BUILD_DIR}/install/$(python_get_sitedir)/PySide6 ]] + then + pushd "${BUILD_DIR}/install/$(python_get_sitedir)/PySide6" \ + >/dev/null || die + mkdir -p "${BUILD_DIR}/install/usr/share/PySide6" || die + for dir in doc glue typesystems; do + ln -s "../../../$(python_get_sitedir)/PySide6/${dir}" \ + "${BUILD_DIR}/install/usr/share/PySide6/${dir}" || + die + done + popd >/dev/null || die + fi + mkdir -p "${BUILD_DIR}/install/usr/include" + for dir in PySide6 shiboken6_generator; do + if [[ -d ${BUILD_DIR}/install/$(python_get_sitedir)/${dir}/include ]] + then + ln -s "../../$(python_get_sitedir)/${dir}/include" \ + "${BUILD_DIR}/install/usr/include/${dir//_generator}" || + die + fi + done + + # Install misc files from inner install dir + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type f \ + -name libPySidePlugin.so -exec \ + mkdir -p "${BUILD_DIR}/install/$(qt6_get_plugindir)/designer/" \; \ + -exec \ + cp "{}" "${BUILD_DIR}/install/$(qt6_get_plugindir)/designer/" \; \ + || die + + for dir in cmake pkgconfig; do + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type d -name ${dir} \ + -exec cp -r "{}" "${BUILD_DIR}/install/usr/lib/" \; \ + || die + done + + # Uniquify the pkgconfigs file for the current Python target, + # preserving an unversioned "shiboken6.pc" file arbitrarily + # associated with the last Python target. + if [[ -f ${BUILD_DIR}/install/usr/lib/pkgconfig/shiboken6.pc ]] + then + sed -e 's~prefix=.*~prefix=/usr~g' \ + -e 's~exec_prefix=.*~exec_prefix=${prefix}~g' \ + -e "s~libdir=.*~libdir=$(python_get_sitedir)/shiboken6~g" \ + -e "s~includedir=.*~includedir=$(python_get_sitedir)/shiboken6_generator/include~g" \ + -i "${BUILD_DIR}/install/usr/lib/pkgconfig/shiboken6.pc" || die + cp "${BUILD_DIR}/install/usr/lib/pkgconfig/"shiboken6{,-${EPYTHON}}.pc || die + fi + if [[ -f ${BUILD_DIR}/install/usr/lib/pkgconfig/pyside6.pc ]] + then + sed -e 's~^Requires: shiboken6$~&-'${EPYTHON}'~' \ + -e 's~prefix=.*~prefix=/usr~g' \ + -e 's~exec_prefix=.*~exec_prefix=${prefix}~g' \ + -e "s~libdir=.*~libdir=$(python_get_sitedir)/PySide6~g" \ + -e "s~includedir=.*~includedir=$(python_get_sitedir)/PySide6/include~g" \ + -e "s~typesystemdir=.*~typesystemdir=$(python_get_sitedir)/PySide6/typesystems~g" \ + -e "s~gluedir=.*~gluedir=$(python_get_sitedir)/PySide6/glue~g" \ + -e "s~pythonpath=.*~pythonpath=$(python_get_sitedir)~g" \ + -i "${BUILD_DIR}/install/usr/lib/pkgconfig/pyside6.pc" || die + cp "${BUILD_DIR}/install/usr/lib/pkgconfig/"pyside6{,-${EPYTHON}}.pc || die + fi + + sed \ + -e "s~/lib/libshiboken6\.cpython~/$(get_libdir)/libshiboken6\.cpython~g" \ + -e "s~/lib/libpyside6\.cpython~/$(get_libdir)/libpyside6\.cpython~g" \ + -e "s~/lib/libpyside6qml\.cpython~/$(get_libdir)/libpyside6qml\.cpython~g" \ + -e "s~libshiboken6\.cpython.*\.so\.$(ver_cut 1-3)~libshiboken6\${PYTHON_CONFIG_SUFFIX}\.so\.$(ver_cut 1-2)~g" \ + -e "s~libpyside6\.cpython.*\.so\.$(ver_cut 1-3)~libpyside6\${PYTHON_CONFIG_SUFFIX}\.so\.$(ver_cut 1-2)~g" \ + -e "s~libpyside6qml\.cpython.*\.so\.$(ver_cut 1-3)~libpyside6qml\${PYTHON_CONFIG_SUFFIX}\.so\.$(ver_cut 1-2)~g" \ + -e "s~libshiboken6\.cpython.*\.so\.$(ver_cut 1-2)~libshiboken6\${PYTHON_CONFIG_SUFFIX}\.so\.$(ver_cut 1-2)~g" \ + -e "s~libpyside6\.cpython.*\.so\.$(ver_cut 1-2)~libpyside6\${PYTHON_CONFIG_SUFFIX}\.so\.$(ver_cut 1-2)~g" \ + -e "s~libpyside6qml\.cpython.*\.so\.$(ver_cut 1-2)~libpyside6qml\${PYTHON_CONFIG_SUFFIX}\.so\.$(ver_cut 1-2)~g" \ + -i "${BUILD_DIR}/install/usr/lib/cmake/"*/*.cmake || die + local file + for file in "${BUILD_DIR}/install/usr/lib/cmake/"*/*.cpython-*.cmake + do + local base=${file##*/} + ln -s "${base}" "${file%/*}/${base%%.*}-${EPYTHON}.cmake" || + die + done +} + +python_test() { + # Otherwise it picks the last built directory breaking assumption for multi target builds + mkdir -p build_history/9999-99-99_999999/ || die + local pyside_build_dir=qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-${BUILD_ID} + echo "$(ls -d "${BUILD_DIR}"/build*/${pyside_build_dir}/build | sort -V | tail -n 1)" > build_history/9999-99-99_999999/build_dir.txt || die + echo "${pyside_build_dir}" >> build_history/9999-99-99_999999/build_dir.txt || die + + virtx ${EPYTHON} testrunner.py test --projects=shiboken6 $(usev core '--projects=pyside6') || + die "Tests failed with ${EPYTHON}" +} + +pkg_preinst() { + # Avoid symlinks being blocked by directories + rm -rf "${EROOT}/usr/include/"{PySide6,shiboken6} || die + rm -rf "${EROOT}/usr/share/PySide6" || die +} diff --git a/dev-python/pyside/pyside-6.9.9999.ebuild b/dev-python/pyside/pyside-6.9.9999.ebuild index 5dcfb9bcdbe8..4d25a464be7f 100644 --- a/dev-python/pyside/pyside-6.9.9999.ebuild +++ b/dev-python/pyside/pyside-6.9.9999.ebuild @@ -30,7 +30,7 @@ if [[ ${PV} == *.9999 ]]; then EGIT_BRANCH=dev [[ ${PV} == 6.*.9999 ]] && EGIT_BRANCH=${PV%.9999} else - SRC_URI="https://download.qt.io/official_releases/QtForPython/${PN}6/PySide6-6.8.3-src/${MY_P}.tar.xz" + SRC_URI="https://download.qt.io/official_releases/QtForPython/${PN}6/PySide6-${PV}-src/${MY_P}.tar.xz" S="${WORKDIR}/${MY_P}" KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" fi @@ -359,9 +359,15 @@ python_compile() { --build-type=shiboken6 ) distutils-r1_python_compile + + # The build system uses its own build dir, find the name of this dir. + local pyside_build_dir=$(find "${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))" -maxdepth 1 -type d -name 'qfp-*' -printf "%f\n") + export BUILD_ID=${pyside_build_dir#qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-} + DISTUTILS_ARGS=( "${MAIN_DISTUTILS_ARGS[@]}" --reuse-build + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" --build-type=shiboken6-generator ) distutils-r1_python_compile @@ -370,7 +376,7 @@ python_compile() { DISTUTILS_ARGS=( "${MAIN_DISTUTILS_ARGS[@]}" --reuse-build - --shiboken-target-path="$(find "${BUILD_DIR}/build" -type d -name cmake)/../../" + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" --build-type=pyside6 ) distutils-r1_python_compile @@ -424,7 +430,7 @@ python_compile() { done # Install misc files from inner install dir - find "${BUILD_DIR}"/build/*/install -type f \ + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type f \ -name libPySidePlugin.so -exec \ mkdir -p "${BUILD_DIR}/install/$(qt6_get_plugindir)/designer/" \; \ -exec \ @@ -432,7 +438,7 @@ python_compile() { || die for dir in cmake pkgconfig; do - find "${BUILD_DIR}"/build/*/install -type d -name ${dir} \ + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type d -name ${dir} \ -exec cp -r "{}" "${BUILD_DIR}/install/usr/lib/" \; \ || die done @@ -484,18 +490,11 @@ python_compile() { } python_test() { - # figure out the build dir - local build_dir build_classifier - build_dir=$(ls -d "${BUILD_DIR}"/build/qfp-*/build/) - build_classifier="${build_dir##${BUILD_DIR}/build/qfp-}" - build_classifier="${build_dir%%/build}" - # Otherwise it picks the last built directory breaking assumption for multi target builds mkdir -p build_history/9999-99-99_999999/ || die - cat <<- EOF > build_history/9999-99-99_999999/build_dir.txt || die - ${build_dir} - ${build_classifier} - EOF + local pyside_build_dir=qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-${BUILD_ID} + echo "$(ls -d "${BUILD_DIR}"/build*/${pyside_build_dir}/build | sort -V | tail -n 1)" > build_history/9999-99-99_999999/build_dir.txt || die + echo "${pyside_build_dir}" >> build_history/9999-99-99_999999/build_dir.txt || die virtx ${EPYTHON} testrunner.py test --projects=shiboken6 $(usev core '--projects=pyside6') || die "Tests failed with ${EPYTHON}" diff --git a/dev-python/pyside/pyside-6.9999.ebuild b/dev-python/pyside/pyside-6.9999.ebuild index 5dcfb9bcdbe8..4d25a464be7f 100644 --- a/dev-python/pyside/pyside-6.9999.ebuild +++ b/dev-python/pyside/pyside-6.9999.ebuild @@ -30,7 +30,7 @@ if [[ ${PV} == *.9999 ]]; then EGIT_BRANCH=dev [[ ${PV} == 6.*.9999 ]] && EGIT_BRANCH=${PV%.9999} else - SRC_URI="https://download.qt.io/official_releases/QtForPython/${PN}6/PySide6-6.8.3-src/${MY_P}.tar.xz" + SRC_URI="https://download.qt.io/official_releases/QtForPython/${PN}6/PySide6-${PV}-src/${MY_P}.tar.xz" S="${WORKDIR}/${MY_P}" KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" fi @@ -359,9 +359,15 @@ python_compile() { --build-type=shiboken6 ) distutils-r1_python_compile + + # The build system uses its own build dir, find the name of this dir. + local pyside_build_dir=$(find "${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))" -maxdepth 1 -type d -name 'qfp-*' -printf "%f\n") + export BUILD_ID=${pyside_build_dir#qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-} + DISTUTILS_ARGS=( "${MAIN_DISTUTILS_ARGS[@]}" --reuse-build + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" --build-type=shiboken6-generator ) distutils-r1_python_compile @@ -370,7 +376,7 @@ python_compile() { DISTUTILS_ARGS=( "${MAIN_DISTUTILS_ARGS[@]}" --reuse-build - --shiboken-target-path="$(find "${BUILD_DIR}/build" -type d -name cmake)/../../" + --shiboken-target-path="${BUILD_DIR}/build$((${#DISTUTILS_WHEELS[@]}-1))/${pyside_build_dir}/install" --build-type=pyside6 ) distutils-r1_python_compile @@ -424,7 +430,7 @@ python_compile() { done # Install misc files from inner install dir - find "${BUILD_DIR}"/build/*/install -type f \ + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type f \ -name libPySidePlugin.so -exec \ mkdir -p "${BUILD_DIR}/install/$(qt6_get_plugindir)/designer/" \; \ -exec \ @@ -432,7 +438,7 @@ python_compile() { || die for dir in cmake pkgconfig; do - find "${BUILD_DIR}"/build/*/install -type d -name ${dir} \ + find "${BUILD_DIR}"/build*/${pyside_build_dir}/install -type d -name ${dir} \ -exec cp -r "{}" "${BUILD_DIR}/install/usr/lib/" \; \ || die done @@ -484,18 +490,11 @@ python_compile() { } python_test() { - # figure out the build dir - local build_dir build_classifier - build_dir=$(ls -d "${BUILD_DIR}"/build/qfp-*/build/) - build_classifier="${build_dir##${BUILD_DIR}/build/qfp-}" - build_classifier="${build_dir%%/build}" - # Otherwise it picks the last built directory breaking assumption for multi target builds mkdir -p build_history/9999-99-99_999999/ || die - cat <<- EOF > build_history/9999-99-99_999999/build_dir.txt || die - ${build_dir} - ${build_classifier} - EOF + local pyside_build_dir=qfp-py${EPYTHON#python}-qt$(ver_cut 1-3)-${BUILD_ID} + echo "$(ls -d "${BUILD_DIR}"/build*/${pyside_build_dir}/build | sort -V | tail -n 1)" > build_history/9999-99-99_999999/build_dir.txt || die + echo "${pyside_build_dir}" >> build_history/9999-99-99_999999/build_dir.txt || die virtx ${EPYTHON} testrunner.py test --projects=shiboken6 $(usev core '--projects=pyside6') || die "Tests failed with ${EPYTHON}" |
