From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Drop python 2 pyqt5
Date: Mon, 28 Sep 2020 17:04:11 +0200 [thread overview]
Message-ID: <20200928150411.ahi2IJIPTU7hnAkTRsn85hCUnTsxjz1MUZS6JJ4x-Kc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-25150@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages drop-python-2-pyqt5
https://github.com/void-linux/void-packages/pull/25150
Drop python 2 pyqt5
A patch file from https://github.com/void-linux/void-packages/pull/25150.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-drop-python-2-pyqt5-25150.patch --]
[-- Type: text/x-diff, Size: 15716 bytes --]
From 8f7d0059cf71b4acc98eb031cb8e2f42fc2968ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 28 Sep 2020 20:02:01 +0700
Subject: [PATCH 1/3] krita: build with python3-PyQt5-devel
---
srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch | 34 ++++++++++++++
srcpkgs/krita/patches/sip5.patch | 47 +++++++++++++++++++
srcpkgs/krita/template | 6 +--
3 files changed, 84 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch
create mode 100644 srcpkgs/krita/patches/sip5.patch
diff --git a/srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch b/srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch
new file mode 100644
index 00000000000..f9aa4e4a6f8
--- /dev/null
+++ b/srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch
@@ -0,0 +1,34 @@
+From c3cba340cfca43f216522464de5fd6f3e060718b Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Sat, 4 Jul 2020 13:01:27 +0300
+Subject: [PATCH] Update pyqt_sip_dir for pyqt5 compiled with sip5
+
+---
+ https://github.com/KDE/krita/commit/c3cba340cfca43f216522464de5fd6f3e060718b
+ cmake/modules/FindPyQt5.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git cmake/modules/FindPyQt5.py cmake/modules/FindPyQt5.py
+index e0ef9d7bdb..e138ad3107 100644
+--- cmake/modules/FindPyQt5.py
++++ cmake/modules/FindPyQt5.py
+@@ -4,6 +4,7 @@
+
+ import sys
+ import os
++from distutils.sysconfig import get_python_lib
+
+ try:
+ # On Windows and Python 3.8+ python doesn't load module DLL's
+@@ -40,8 +41,9 @@
+ except ValueError:
+ pass
+
+-# FIXME This next line is just a little bit too crude.
+-pyqt_sip_dir = os.path.join(sys.prefix, "share", "sip", "PyQt5")
++pyqt_sip_dir = os.path.join(get_python_lib(plat_specific=1), "PyQt5", "bindings")
++if not os.path.exists(pyqt_sip_dir): # Fallback for older PyQt5/SIP
++ pyqt_sip_dir = os.path.join(sys.prefix, "share", "sip", "PyQt5")
+ print("pyqt_sip_dir:%s" % pyqt_sip_dir)
+
+ print("pyqt_sip_flags:%s" % PyQt5.QtCore.PYQT_CONFIGURATION["sip_flags"])
diff --git a/srcpkgs/krita/patches/sip5.patch b/srcpkgs/krita/patches/sip5.patch
new file mode 100644
index 00000000000..f3143151a25
--- /dev/null
+++ b/srcpkgs/krita/patches/sip5.patch
@@ -0,0 +1,47 @@
+From 91b31ace2ef8bc0792cdef3aa351f6d835baf254 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Fri, 24 Jul 2020 20:18:13 +0300
+Subject: [PATCH] Make FindSIP.py compatible with SIP v5
+
+---
+ cmake/modules/FindSIP.py | 30 +++++++++++++++++++++---------
+ 1 file changed, 21 insertions(+), 9 deletions(-)
+
+diff --git cmake/modules/FindSIP.py cmake/modules/FindSIP.py
+index ecb734f2cc..9fb032f8e5 100644
+--- cmake/modules/FindSIP.py
++++ cmake/modules/FindSIP.py
+@@ -4,12 +4,24 @@
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+-import sys
+-import sipconfig
+-
+-sipcfg = sipconfig.Configuration()
+-print("sip_version:%06.0x" % sipcfg.sip_version)
+-print("sip_version_str:%s" % sipcfg.sip_version_str)
+-print("sip_bin:%s" % sipcfg.sip_bin)
+-print("default_sip_dir:%s" % sipcfg.default_sip_dir)
+-print("sip_inc_dir:%s" % sipcfg.sip_inc_dir)
++try:
++ import sipbuild
++except ImportError: # Code for SIP v4
++ import sipconfig
++
++ sipcfg = sipconfig.Configuration()
++ print("sip_version:%06.0x" % sipcfg.sip_version)
++ print("sip_version_str:%s" % sipcfg.sip_version_str)
++ print("sip_bin:%s" % sipcfg.sip_bin)
++ print("default_sip_dir:%s" % sipcfg.default_sip_dir)
++ print("sip_inc_dir:%s" % sipcfg.sip_inc_dir)
++else: # Code for SIP v5
++ print("sip_version:%06.0x" % sipbuild.version.SIP_VERSION)
++ print("sip_version_str:%s" % sipbuild.version.SIP_VERSION_STR)
++
++ import shutil
++ print("sip_bin:%s" % shutil.which("sip5"))
++
++ from distutils.sysconfig import get_python_lib
++ python_modules_dir = get_python_lib(plat_specific=1)
++ print("default_sip_dir:%s" % python_modules_dir)
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index a3f5f8fbe16..5891183d8c8 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,10 +1,10 @@
# Template file for 'krita'
pkgname=krita
version=4.3.0
-revision=1
+revision=2
build_style=cmake
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
-hostmakedepends="extra-cmake-modules gettext pkg-config python3
+hostmakedepends="extra-cmake-modules gettext pkg-config python3 sip5
qt5-qmake qt5-host-tools kcoreaddons"
makedepends="karchive-devel kconfig-devel kwidgetsaddons-devel kcompletion-devel
kcoreaddons-devel kguiaddons-devel ki18n-devel kitemmodels-devel kitemviews-devel
@@ -12,7 +12,7 @@ makedepends="karchive-devel kconfig-devel kwidgetsaddons-devel kcompletion-devel
boost-devel gsl-devel tiff-devel libjpeg-turbo-devel libraw-devel fftw-devel
opencolorio-devel eigen exiv2-devel libXi-devel libopenexr-devel libgomp-devel
poppler-qt5-devel giflib-devel python3-devel python3-sip-devel python3-PyQt5
- python-PyQt5-devel quazip-devel libheif-devel"
+ python3-PyQt5-devel quazip-devel libheif-devel"
short_desc="Painting and image editing program"
maintainer="John <me@johnnynator.dev>"
license="GPL-3.0-only"
From 791e1494938bda592e0e1fb155da540980402dc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 28 Sep 2020 20:03:47 +0700
Subject: [PATCH 2/3] python-Pillow: depends on python-tkinter
Since we're going to drop python-PyQt5
---
srcpkgs/python-Pillow/INSTALL.msg | 2 --
srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg | 2 --
srcpkgs/python-Pillow/template | 4 ++--
3 files changed, 2 insertions(+), 6 deletions(-)
delete mode 100644 srcpkgs/python-Pillow/INSTALL.msg
delete mode 100644 srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg
diff --git a/srcpkgs/python-Pillow/INSTALL.msg b/srcpkgs/python-Pillow/INSTALL.msg
deleted file mode 100644
index 256e374e98e..00000000000
--- a/srcpkgs/python-Pillow/INSTALL.msg
+++ /dev/null
@@ -1,2 +0,0 @@
-To use the Tk image interface install python-tkinter.
-To use the Qt image interface install python-PyQt5.
diff --git a/srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg b/srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg
deleted file mode 100644
index 8ce8ed66afd..00000000000
--- a/srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg
+++ /dev/null
@@ -1,2 +0,0 @@
-To use the Tk image interface install python3-tkinter.
-To use the Qt image interface install python3-PyQt5.
diff --git a/srcpkgs/python-Pillow/template b/srcpkgs/python-Pillow/template
index 1e36fc16e19..072f37b611b 100644
--- a/srcpkgs/python-Pillow/template
+++ b/srcpkgs/python-Pillow/template
@@ -1,13 +1,13 @@
# Template file for 'python-Pillow'
pkgname=python-Pillow
version=6.2.2
-revision=2
+revision=3
wrksrc="Pillow-${version}"
build_style=python2-module
hostmakedepends="python-setuptools"
makedepends="python-devel libjpeg-turbo-devel libopenjpeg2-devel
tiff-devel freetype-devel lcms2-devel libwebp-devel libimagequant-devel"
-depends="python"
+depends="python python-tkinter"
short_desc="Python Imaging Library (PIL) fork for Python2"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="custom:PIL"
From a3d850be74206526be19fe29de0ed596fd41ba2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 28 Sep 2020 20:05:40 +0700
Subject: [PATCH 3/3] python-PyQt5: drop package
---
srcpkgs/python-PyQt5/template | 250 ----------------------------------
srcpkgs/python-PyQt5/update | 1 -
2 files changed, 251 deletions(-)
delete mode 100644 srcpkgs/python-PyQt5/template
delete mode 100644 srcpkgs/python-PyQt5/update
diff --git a/srcpkgs/python-PyQt5/template b/srcpkgs/python-PyQt5/template
deleted file mode 100644
index 3848b368a05..00000000000
--- a/srcpkgs/python-PyQt5/template
+++ /dev/null
@@ -1,250 +0,0 @@
-# Template file for 'python-PyQt5'
-pkgname=python-PyQt5
-version=5.15.0
-revision=1
-_sipver=4.19.23
-wrksrc="PyQt5-${version}"
-hostmakedepends="pkg-config
- python-devel python-sip-devel python-dbus-devel qt5
- qt5-devel qt5-tools-devel qt5-connectivity-devel qt5-declarative-devel qt5-location-devel
- qt5-multimedia-devel qt5-qmake qt5-sensors-devel qt5-serialport-devel
- qt5-svg-devel qt5-webchannel-devel qt5-webkit-devel qt5-websockets-devel
- qt5-x11extras-devel qt5-xmlpatterns-devel qt5-networkauth-devel pulseaudio-devel
- python-enum34"
-makedepends="${hostmakedepends/pkg-config/}"
-depends="python-sip-PyQt5>=${_sipver} python-enum34"
-short_desc="Python 2 bindings for the Qt5 toolkit"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-3.0-only"
-homepage="https://riverbankcomputing.com/software/pyqt/intro"
-distfiles="${PYPI_SITE}/P/PyQt5/PyQt5-${version}.tar.gz"
-checksum=c6f75488ffd5365a65893bc64ea82a6957db126fbfe33654bcd43ae1c30c52f9
-lib32disabled=yes
-
-post_extract() {
- rm -rf pyuic/uic/port_v3
-}
-
-do_configure() {
- local _sysroot= _configuration= qt_version
- if [ "$CROSS_BUILD" ]; then
- qt_version=$(qmake -query QT_VERSION)
- _sysroot="--sysroot $XBPS_CROSS_BASE"
- _configuration="--configuration $wrksrc/pyqt5_${XBPS_CROSS_TRIPLET}.cfg"
- cat >pyqt5_${XBPS_CROSS_TRIPLET}.cfg <<EOF
-py_platform = linux
-py_inc_dir = %(sysroot)/usr/include/python%(py_major).%(py_minor)
-py_pyshlib = python%(py_major).%(py_minor).so
-pyqt_disabled_features = PyQt_Desktop_OpenGL
-
-qt_shared = True
-
-[Qt ${qt_version}]
-# _QOpenGLFunctions_ES2 doesn't work
-pyqt_modules = QtCore QtGui QtHelp QtMultimedia
- QtMultimediaWidgets QtNetwork QtOpenGL QtPrintSupport QtQml QtQuick
- QtSql QtSvg QtTest QtWebKit QtWebKitWidgets QtWidgets QtXml
- QtXmlPatterns QtDesigner QtDBus QtSensors QtSerialPort
- QtX11Extras QtBluetooth QtPositioning QtQuickWidgets QtWebSockets
- QtWebChannel QtLocation QtNfc QtNetworkAuth
-EOF
- fi
-
- python2 configure.py --confirm-license --assume-shared \
- $_sysroot $_configuration \
- QMAKE_CC="${CC}" QMAKE_CFLAGS="${CFLAGS}" \
- QMAKE_CXX="${CXX}" QMAKE_CXXFLAGS="${CXXFLAGS}" \
- QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" \
- QMAKE_LFLAGS="${LDFLAGS}" QMAKE_STRIP=""
-
- if [ "$CROSS_BUILD" ]; then
- # Fix location of libraries
- find . -name Makefile |
- xargs sed -i -E "s|(/usr/lib/libQt5[^ ]+so)|${XBPS_CROSS_BASE}\1|g"
- fi
-}
-
-do_build() {
- make ${makejobs}
-}
-
-do_install() {
- # install python-pyqt5
- make DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install
- for f in pylupdate5 pyrcc5 pyuic5; do
- sed -i 's,/usr/bin/python2.7,/usr/bin/python2,' ${DESTDIR}/usr/bin/${f}
- mv ${DESTDIR}/usr/bin/{,python2-}${f}
- done
-}
-
-python-PyQt5-devel-tools_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - development tools"
- alternatives="
- pyqt5:pylupdate5:/usr/bin/python2-pylupdate5
- pyqt5:pyrcc5:/usr/bin/python2-pyrcc5
- pyqt5:pyuic5:/usr/bin/python2-pyuic5"
- pkg_install() {
- vmove usr/bin/python2-*
- vmove ${py2_sitelib}/PyQt5/pylupdate.so
- vmove ${py2_sitelib}/PyQt5/pylupdate_main.py
- vmove ${py2_sitelib}/PyQt5/pyrcc.so
- vmove ${py2_sitelib}/PyQt5/pyrcc_main.py
- }
-}
-python-PyQt5-devel_package() {
- depends="python-sip-devel python-PyQt5-${version}_${revision}"
- short_desc+=" - development files"
- conflicts="python3-PyQt5-devel>=0"
- pkg_install() {
- vmove usr/share/sip
- }
-}
-python-PyQt5-dbus_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision} python-dbus"
- short_desc+=" - dbus support"
- pkg_install() {
- vmove ${py2_sitelib}/dbus/mainloop/pyqt5.so
- }
-}
-python-PyQt5-connectivity_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - connectivity module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtBluetooth.so
- vmove ${py2_sitelib}/PyQt5/QtNfc.so
- }
-}
-python-PyQt5-multimedia_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - multimedia module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtMultimedia.so
- vmove ${py2_sitelib}/PyQt5/QtMultimediaWidgets.so
- }
-}
-python-PyQt5-networkauth_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision} python-enum34"
- short_desc+=" - networkauth module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtNetworkAuth.so
- }
-}
-python-PyQt5-opengl_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - opengl module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtOpenGL.so
- if [ -z "$CROSS_BUILD" ]; then
- vmove ${py2_sitelib}/PyQt5/_QOpenGLFunctions_*.so
- fi
- }
-
-}
-python-PyQt5-location_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - location module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtLocation.so
- vmove ${py2_sitelib}/PyQt5/QtPositioning.so
- }
-}
-python-PyQt5-quick_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - quick module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtQml.so
- vmove ${py2_sitelib}/PyQt5/QtQuick.so
- vmove ${py2_sitelib}/PyQt5/QtQuickWidgets.so
- }
-}
-python-PyQt5-sensors_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - sensors module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtSensors.so
- }
-}
-python-PyQt5-serialport_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - serialport module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtSerialPort.so
- }
-}
-python-PyQt5-sql_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - sql module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtSql.so
- }
-}
-python-PyQt5-svg_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - svg module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtSvg.so
- }
-}
-python-PyQt5-tools_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - designer, help modules"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtHelp.so
- vmove ${py2_sitelib}/PyQt5/QtDesigner.so
- }
-}
-python-PyQt5-webchannel_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - webchannel module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtWebChannel.so
- }
-}
-python-PyQt5-webkit_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - webkit module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtWebKit.so
- vmove ${py2_sitelib}/PyQt5/QtWebKitWidgets.so
- }
-}
-python-PyQt5-websockets_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - websockets module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtWebSockets.so
- }
-}
-python-PyQt5-x11extras_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - x11extras module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtX11Extras.so
- }
-}
-python-PyQt5-xmlpatterns_package() {
- lib32disabled=yes
- depends="${sourcepkg}-${version}_${revision}"
- short_desc+=" - xmlpatterns module"
- pkg_install() {
- vmove ${py2_sitelib}/PyQt5/QtXmlPatterns.so
- }
-}
diff --git a/srcpkgs/python-PyQt5/update b/srcpkgs/python-PyQt5/update
deleted file mode 100644
index a0fae38330c..00000000000
--- a/srcpkgs/python-PyQt5/update
+++ /dev/null
@@ -1 +0,0 @@
-pkgname="PyQt5_gpl"
next prev parent reply other threads:[~2020-09-28 15:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 13:09 [PR PATCH] " sgn
2020-09-28 14:42 ` ericonr
2020-09-28 14:47 ` [PR PATCH] [Updated] " sgn
2020-09-28 15:04 ` sgn [this message]
2020-09-28 17:12 ` sgn
2020-09-30 13:58 ` sgn
2020-09-30 14:00 ` [PR PATCH] [Updated] " sgn
2020-09-30 14:14 ` sgn
2020-09-30 15:02 ` [PR PATCH] [Updated] Drop python 2 pyqt5 and related packages sgn
2020-09-30 15:23 ` sgn
2020-10-01 0:32 ` sgn
2020-10-01 15:37 ` sgn
2020-10-01 15:57 ` sgn
2020-10-01 16:42 ` [PR PATCH] [Closed]: " sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200928150411.ahi2IJIPTU7hnAkTRsn85hCUnTsxjz1MUZS6JJ4x-Kc@z \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).