summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2020-12-28 05:47:03 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2020-12-28 05:47:03 +0100
commit61f1c976ee026dab3cc8e8be9179f203a5002dd8 (patch)
tree2d4adedf14abdfd075d50b440506b7d64218dec6 /dev-python/pyside2-tools
parentacct-user/freenet: drop pointless KEYWORDS assignment (diff)
downloadgentoo-61f1c976ee026dab3cc8e8be9179f203a5002dd8.tar.gz
gentoo-61f1c976ee026dab3cc8e8be9179f203a5002dd8.tar.bz2
gentoo-61f1c976ee026dab3cc8e8be9179f203a5002dd8.zip
dev-python/pyside2-tools: removed tools keeping only pyside2-lupdate
Closes: https://bugs.gentoo.org/761748 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-python/pyside2-tools')
-rw-r--r--dev-python/pyside2-tools/files/pyside2-tools-5.15.1-dont-install-tools.patch58
-rw-r--r--dev-python/pyside2-tools/metadata.xml3
-rw-r--r--dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild75
3 files changed, 70 insertions, 66 deletions
diff --git a/dev-python/pyside2-tools/files/pyside2-tools-5.15.1-dont-install-tools.patch b/dev-python/pyside2-tools/files/pyside2-tools-5.15.1-dont-install-tools.patch
new file mode 100644
index 000000000000..60de6aa07ee7
--- /dev/null
+++ b/dev-python/pyside2-tools/files/pyside2-tools-5.15.1-dont-install-tools.patch
@@ -0,0 +1,58 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 20a5e19..575c1df 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -55,38 +55,6 @@ else()
+ set(DESIGNER_PATH "${TOOLS_PATH}/designer${EXE_EXT}")
+ endif()
+
+-install(FILES "${UIC_PATH}"
+- DESTINATION bin
+- PERMISSIONS
+- OWNER_EXECUTE OWNER_WRITE OWNER_READ
+- GROUP_EXECUTE GROUP_READ
+- WORLD_EXECUTE WORLD_READ)
+-
+-install(FILES "${RCC_PATH}"
+- DESTINATION bin
+- PERMISSIONS
+- OWNER_EXECUTE OWNER_WRITE OWNER_READ
+- GROUP_EXECUTE GROUP_READ
+- WORLD_EXECUTE WORLD_READ)
+-
+-if (EXISTS ${DESIGNER_PATH})
+- if (APPLE)
+- install(DIRECTORY "${DESIGNER_PATH}"
+- DESTINATION bin
+- FILE_PERMISSIONS
+- OWNER_EXECUTE OWNER_WRITE OWNER_READ
+- GROUP_EXECUTE GROUP_READ
+- WORLD_EXECUTE WORLD_READ)
+- else()
+- install(FILES "${DESIGNER_PATH}"
+- DESTINATION bin
+- PERMISSIONS
+- OWNER_EXECUTE OWNER_WRITE OWNER_READ
+- GROUP_EXECUTE GROUP_READ
+- WORLD_EXECUTE WORLD_READ)
+- endif()
+-endif()
+-
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+@@ -113,14 +81,6 @@ endif()
+
+ add_subdirectory(pylupdate)
+
+-# pyside2-rcc, pyside2-uic, pyside2-designer, shiboken and pyside2-lupdate entrypoints
+-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside_tool.py
+- DESTINATION bin
+- PERMISSIONS
+- OWNER_EXECUTE OWNER_WRITE OWNER_READ
+- GROUP_EXECUTE GROUP_READ
+- WORLD_EXECUTE WORLD_READ)
+-
+ if (BUILD_TESTS)
+ enable_testing()
+ add_subdirectory(tests)
diff --git a/dev-python/pyside2-tools/metadata.xml b/dev-python/pyside2-tools/metadata.xml
index e31c29a6f7d7..11287d1296cc 100644
--- a/dev-python/pyside2-tools/metadata.xml
+++ b/dev-python/pyside2-tools/metadata.xml
@@ -5,7 +5,4 @@
<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
index 165134f5b6a3..facd56296493 100644
--- a/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild
+++ b/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild
@@ -8,74 +8,42 @@ EAPI=7
PYTHON_COMPAT=( python3_{6..8} )
CMAKE_IN_SOURCE_BUILD=1
-inherit cmake python-r1 virtualx
+inherit cmake python-r1
MY_P=pyside-setup-opensource-src-${PV}
-DESCRIPTION="PySide development tools (lupdate, rcc, uic)"
+DESCRIPTION="PySide development tools (pyside2-lupdate with support for Python)"
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 )
+CDEPEND="${PYTHON_DEPS}
+ >=dev-python/pyside2-${PV}[${PYTHON_USEDEP}]
"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}"
S=${WORKDIR}/${MY_P}/sources/${PN}
DOCS=( README.md )
+PATCHES=(
+ "${FILESDIR}/${P}-dont-install-tools.patch"
+)
+
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() {
+ # The tests are only related to the tools that we don't install
local mycmakeargs=(
- -DBUILD_TESTS=$(usex test)
+ -DBUILD_TESTS=OFF
)
pyside-tools_configure() {
@@ -97,29 +65,10 @@ 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
}