Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyside2-tools/, dev-python/pyside2-tools/files/
Date: Mon, 28 Dec 2020 04:47:16
Message-Id: 1609130823.61f1c976ee026dab3cc8e8be9179f203a5002dd8.fordfrog@gentoo
1 commit: 61f1c976ee026dab3cc8e8be9179f203a5002dd8
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 28 04:47:03 2020 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 28 04:47:03 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61f1c976
7
8 dev-python/pyside2-tools: removed tools keeping only pyside2-lupdate
9
10 Closes: https://bugs.gentoo.org/761748
11 Package-Manager: Portage-3.0.12, Repoman-3.0.2
12 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
13
14 .../pyside2-tools-5.15.1-dont-install-tools.patch | 58 +++++++++++++++++
15 dev-python/pyside2-tools/metadata.xml | 3 -
16 .../pyside2-tools/pyside2-tools-5.15.1.ebuild | 75 ++++------------------
17 3 files changed, 70 insertions(+), 66 deletions(-)
18
19 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
20 new file mode 100644
21 index 00000000000..60de6aa07ee
22 --- /dev/null
23 +++ b/dev-python/pyside2-tools/files/pyside2-tools-5.15.1-dont-install-tools.patch
24 @@ -0,0 +1,58 @@
25 +diff --git a/CMakeLists.txt b/CMakeLists.txt
26 +index 20a5e19..575c1df 100644
27 +--- a/CMakeLists.txt
28 ++++ b/CMakeLists.txt
29 +@@ -55,38 +55,6 @@ else()
30 + set(DESIGNER_PATH "${TOOLS_PATH}/designer${EXE_EXT}")
31 + endif()
32 +
33 +-install(FILES "${UIC_PATH}"
34 +- DESTINATION bin
35 +- PERMISSIONS
36 +- OWNER_EXECUTE OWNER_WRITE OWNER_READ
37 +- GROUP_EXECUTE GROUP_READ
38 +- WORLD_EXECUTE WORLD_READ)
39 +-
40 +-install(FILES "${RCC_PATH}"
41 +- DESTINATION bin
42 +- PERMISSIONS
43 +- OWNER_EXECUTE OWNER_WRITE OWNER_READ
44 +- GROUP_EXECUTE GROUP_READ
45 +- WORLD_EXECUTE WORLD_READ)
46 +-
47 +-if (EXISTS ${DESIGNER_PATH})
48 +- if (APPLE)
49 +- install(DIRECTORY "${DESIGNER_PATH}"
50 +- DESTINATION bin
51 +- FILE_PERMISSIONS
52 +- OWNER_EXECUTE OWNER_WRITE OWNER_READ
53 +- GROUP_EXECUTE GROUP_READ
54 +- WORLD_EXECUTE WORLD_READ)
55 +- else()
56 +- install(FILES "${DESIGNER_PATH}"
57 +- DESTINATION bin
58 +- PERMISSIONS
59 +- OWNER_EXECUTE OWNER_WRITE OWNER_READ
60 +- GROUP_EXECUTE GROUP_READ
61 +- WORLD_EXECUTE WORLD_READ)
62 +- endif()
63 +-endif()
64 +-
65 + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
66 + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
67 + IMMEDIATE @ONLY)
68 +@@ -113,14 +81,6 @@ endif()
69 +
70 + add_subdirectory(pylupdate)
71 +
72 +-# pyside2-rcc, pyside2-uic, pyside2-designer, shiboken and pyside2-lupdate entrypoints
73 +-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside_tool.py
74 +- DESTINATION bin
75 +- PERMISSIONS
76 +- OWNER_EXECUTE OWNER_WRITE OWNER_READ
77 +- GROUP_EXECUTE GROUP_READ
78 +- WORLD_EXECUTE WORLD_READ)
79 +-
80 + if (BUILD_TESTS)
81 + enable_testing()
82 + add_subdirectory(tests)
83
84 diff --git a/dev-python/pyside2-tools/metadata.xml b/dev-python/pyside2-tools/metadata.xml
85 index e31c29a6f7d..11287d1296c 100644
86 --- a/dev-python/pyside2-tools/metadata.xml
87 +++ b/dev-python/pyside2-tools/metadata.xml
88 @@ -5,7 +5,4 @@
89 <email>fordfrog@g.o</email>
90 <name>Miroslav Šulc</name>
91 </maintainer>
92 - <use>
93 - <flag name="tools">Install supplementary tools (rcc, uic, designer)</flag>
94 - </use>
95 </pkgmetadata>
96
97 diff --git a/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild b/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild
98 index 165134f5b6a..facd5629649 100644
99 --- a/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild
100 +++ b/dev-python/pyside2-tools/pyside2-tools-5.15.1.ebuild
101 @@ -8,74 +8,42 @@ EAPI=7
102 PYTHON_COMPAT=( python3_{6..8} )
103 CMAKE_IN_SOURCE_BUILD=1
104
105 -inherit cmake python-r1 virtualx
106 +inherit cmake python-r1
107
108 MY_P=pyside-setup-opensource-src-${PV}
109
110 -DESCRIPTION="PySide development tools (lupdate, rcc, uic)"
111 +DESCRIPTION="PySide development tools (pyside2-lupdate with support for Python)"
112 HOMEPAGE="https://wiki.qt.io/PySide2"
113 SRC_URI="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${PV}-src/${MY_P}.tar.xz"
114
115 -# Though "LICENSE-uic" suggests the "pyside2uic" directory to be dual-licensed
116 -# under the BSD 3-clause and GPL v2 licenses, this appears to be an oversight;
117 -# all files in this (and every) directory are licensed only under the GPL v2.
118 LICENSE="GPL-2"
119 SLOT="0"
120 KEYWORDS="~amd64 ~x86"
121 -IUSE="test tools"
122 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
123
124 -# Note that:
125 -# * "pyside2uic" imports the "PySide2.QtGui" and "PySide2.QtWidgets" C
126 -# extensions and hence requires "widgets", which includes "gui" as well.
127 -# * "dev-qt/qtchooser" installs binaries conflicting with the "tools" USE flag.
128 -COMMON_DEPEND="${PYTHON_DEPS}
129 - >=dev-python/pyside2-${PV}[widgets,${PYTHON_USEDEP}]
130 -"
131 -RDEPEND="${COMMON_DEPEND}
132 - tools? ( !dev-qt/qtchooser )
133 -"
134 -DEPEND="${COMMON_DEPEND}
135 - test? ( virtual/pkgconfig )
136 +CDEPEND="${PYTHON_DEPS}
137 + >=dev-python/pyside2-${PV}[${PYTHON_USEDEP}]
138 "
139 +RDEPEND="${CDEPEND}"
140 +DEPEND="${CDEPEND}"
141
142 S=${WORKDIR}/${MY_P}/sources/${PN}
143 DOCS=( README.md )
144
145 +PATCHES=(
146 + "${FILESDIR}/${P}-dont-install-tools.patch"
147 +)
148 +
149 src_prepare() {
150 cmake_src_prepare
151
152 python_copy_sources
153 -
154 - pyside-tools_prepare() {
155 - pushd "${BUILD_DIR}" >/dev/null || die
156 -
157 - if python_is_python3; then
158 - # Remove Python 2-specific paths.
159 - rm -rf pyside2uic/port_v2 || die
160 -
161 - # Generate proper Python 3 test interfaces with the "-py3" option.
162 - sed -i -e \
163 - 's~${PYSIDERCC_EXECUTABLE}~"${PYSIDERCC_EXECUTABLE} -py3"~' \
164 - tests/rcc/CMakeLists.txt || die
165 - else
166 - # Remove Python 3-specific paths.
167 - rm -rf pyside2uic/port_v3 || die
168 - fi
169 -
170 - # Force testing against the current Python version.
171 - sed -i -e "/pkg-config/ s:shiboken2:&-${EPYTHON}:" \
172 - tests/rcc/run_test.sh || die
173 -
174 - popd >/dev/null || die
175 - }
176 -
177 - python_foreach_impl pyside-tools_prepare
178 }
179
180 src_configure() {
181 + # The tests are only related to the tools that we don't install
182 local mycmakeargs=(
183 - -DBUILD_TESTS=$(usex test)
184 + -DBUILD_TESTS=OFF
185 )
186
187 pyside-tools_configure() {
188 @@ -97,29 +65,10 @@ src_compile() {
189 python_foreach_impl pyside-tools_compile
190 }
191
192 -src_test() {
193 - # tests work only if tools USE flag enabled
194 - if [ use tools ]; then
195 - pyside-tools_test() {
196 - local -x PYTHONDONTWRITEBYTECODE
197 - CMAKE_USE_DIR="${BUILD_DIR}" virtx cmake_src_test
198 - }
199 -
200 - python_foreach_impl pyside-tools_test
201 - fi
202 -}
203 -
204 src_install() {
205 pyside-tools_install() {
206 CMAKE_USE_DIR="${BUILD_DIR}" cmake_src_install
207 }
208
209 python_foreach_impl pyside-tools_install
210 -
211 - use tools || rm "${ED}"/usr/bin/{rcc,uic,designer} || die
212 -
213 - # Remove the broken "pyside_tool.py" script. By inspection, this script
214 - # reduces to a noop. Moreover, this script raises the following exception:
215 - # FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/../pyside_tool.py': '/usr/bin/../pyside_tool.py'
216 - rm "${ED}"/usr/bin/pyside_tool.py
217 }