From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1234462-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B62561382C5 for <garchives@archives.gentoo.org>; Sat, 26 Dec 2020 09:20:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B1CEE0C9F; Sat, 26 Dec 2020 09:20:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E418AE0C9F for <gentoo-commits@lists.gentoo.org>; Sat, 26 Dec 2020 09:20:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9C26C340D3C for <gentoo-commits@lists.gentoo.org>; Sat, 26 Dec 2020 09:20:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EC4C84E for <gentoo-commits@lists.gentoo.org>; Sat, 26 Dec 2020 09:20:03 +0000 (UTC) From: "Miroslav Šulc" <fordfrog@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" <fordfrog@gentoo.org> Message-ID: <1608974391.4ad700c6777d38c4312473076db545fed88f48cf.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyside2-tools/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pyside2-tools/Manifest dev-python/pyside2-tools/metadata.xml dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild X-VCS-Directories: dev-python/pyside2-tools/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: 4ad700c6777d38c4312473076db545fed88f48cf X-VCS-Branch: master Date: Sat, 26 Dec 2020 09:20:03 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 76a360da-626c-440a-a553-969d61e91fdf X-Archives-Hash: e8b48d83de8b2ebbffdf7dfcce54e5ac commit: 4ad700c6777d38c4312473076db545fed88f48cf Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> AuthorDate: Sat Dec 26 09:18:40 2020 +0000 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> CommitDate: Sat Dec 26 09:19:51 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ad700c6 dev-python/pyside2-tools: added new ebuild it will be needed for media-gfx/freecad once it gets back the the tree used ebuild by Cecil Curry (leycec/raiagent overlay) minor changes: 1) bump to 5.15.1 2) dropped py3_9 because it's missing on deps 3) moved from cmake-utils to cmake 4) skipping tests if tools USE flag is not set as the tests need the tools Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> dev-python/pyside2-tools/Manifest | 1 + dev-python/pyside2-tools/metadata.xml | 11 ++ .../pyside2-tools/pyside2-tools-5.15.1.ebuild | 125 +++++++++++++++++++++ 3 files changed, 137 insertions(+) diff --git a/dev-python/pyside2-tools/Manifest b/dev-python/pyside2-tools/Manifest new file mode 100644 index 00000000000..0d5e684462d --- /dev/null +++ b/dev-python/pyside2-tools/Manifest @@ -0,0 +1 @@ +DIST pyside-setup-opensource-src-5.15.1.tar.xz 3454052 BLAKE2B c7190dff493434064976a4604fb5858d2e20c1b98098ccd6e5c4c69d0b67ae9f4bf970e2ab42b634208ea96aab31b21f3dfb5f18fddd0bdaab655bba729e4449 SHA512 f14c7037367799005fff73d9fc8e7998db1895700911adf34dfabdeb4db486c7b28ba2afb3eaee37c58f4099b00e4a86917b8f7d85f274026bddfc090658b306 diff --git a/dev-python/pyside2-tools/metadata.xml b/dev-python/pyside2-tools/metadata.xml new file mode 100644 index 00000000000..e31c29a6f7d --- /dev/null +++ b/dev-python/pyside2-tools/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>fordfrog@gentoo.org</email> + <name>Miroslav Šulc</name> + </maintainer> + <use> + <flag name="tools">Install supplementary tools (rcc, uic, designer)</flag> + </use> +</pkgmetadata> diff --git a/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild b/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild new file mode 100644 index 00000000000..165134f5b6a --- /dev/null +++ b/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# TODO: Add PyPy once officially supported. See also: +# https://bugreports.qt.io/browse/PYSIDE-535 +PYTHON_COMPAT=( python3_{6..8} ) +CMAKE_IN_SOURCE_BUILD=1 + +inherit cmake python-r1 virtualx + +MY_P=pyside-setup-opensource-src-${PV} + +DESCRIPTION="PySide development tools (lupdate, rcc, uic)" +HOMEPAGE="https://wiki.qt.io/PySide2" +SRC_URI="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${PV}-src/${MY_P}.tar.xz" + +# Though "LICENSE-uic" suggests the "pyside2uic" directory to be dual-licensed +# under the BSD 3-clause and GPL v2 licenses, this appears to be an oversight; +# all files in this (and every) directory are licensed only under the GPL v2. +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test tools" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# Note that: +# * "pyside2uic" imports the "PySide2.QtGui" and "PySide2.QtWidgets" C +# extensions and hence requires "widgets", which includes "gui" as well. +# * "dev-qt/qtchooser" installs binaries conflicting with the "tools" USE flag. +COMMON_DEPEND="${PYTHON_DEPS} + >=dev-python/pyside2-${PV}[widgets,${PYTHON_USEDEP}] +" +RDEPEND="${COMMON_DEPEND} + tools? ( !dev-qt/qtchooser ) +" +DEPEND="${COMMON_DEPEND} + test? ( virtual/pkgconfig ) +" + +S=${WORKDIR}/${MY_P}/sources/${PN} +DOCS=( README.md ) + +src_prepare() { + cmake_src_prepare + + python_copy_sources + + pyside-tools_prepare() { + pushd "${BUILD_DIR}" >/dev/null || die + + if python_is_python3; then + # Remove Python 2-specific paths. + rm -rf pyside2uic/port_v2 || die + + # Generate proper Python 3 test interfaces with the "-py3" option. + sed -i -e \ + 's~${PYSIDERCC_EXECUTABLE}~"${PYSIDERCC_EXECUTABLE} -py3"~' \ + tests/rcc/CMakeLists.txt || die + else + # Remove Python 3-specific paths. + rm -rf pyside2uic/port_v3 || die + fi + + # Force testing against the current Python version. + sed -i -e "/pkg-config/ s:shiboken2:&-${EPYTHON}:" \ + tests/rcc/run_test.sh || die + + popd >/dev/null || die + } + + python_foreach_impl pyside-tools_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_TESTS=$(usex test) + ) + + pyside-tools_configure() { + local mycmakeargs=( + "${mycmakeargs[@]}" + -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" + ) + CMAKE_USE_DIR="${BUILD_DIR}" cmake_src_configure + } + + python_foreach_impl pyside-tools_configure +} + +src_compile() { + pyside-tools_compile() { + CMAKE_USE_DIR="${BUILD_DIR}" cmake_src_compile + } + + python_foreach_impl pyside-tools_compile +} + +src_test() { + # tests work only if tools USE flag enabled + if [ use tools ]; then + pyside-tools_test() { + local -x PYTHONDONTWRITEBYTECODE + CMAKE_USE_DIR="${BUILD_DIR}" virtx cmake_src_test + } + + python_foreach_impl pyside-tools_test + fi +} + +src_install() { + pyside-tools_install() { + CMAKE_USE_DIR="${BUILD_DIR}" cmake_src_install + } + + python_foreach_impl pyside-tools_install + + use tools || rm "${ED}"/usr/bin/{rcc,uic,designer} || die + + # Remove the broken "pyside_tool.py" script. By inspection, this script + # reduces to a noop. Moreover, this script raises the following exception: + # FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/../pyside_tool.py': '/usr/bin/../pyside_tool.py' + rm "${ED}"/usr/bin/pyside_tool.py +}