require PyQt5-sip-py* package [release 5.14.2-5mamba;Mon Apr 13 2020]
This commit is contained in:
parent
a7312a6f09
commit
9b63c4c0c4
@ -1,254 +0,0 @@
|
||||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 03_qreal_float_support.dpatch by Michael Casadevall <sonicmctails@gmail.com>
|
||||
##
|
||||
## DP: Corrects a configure test, and adds explicate double handling
|
||||
## to qlist.sip on architectures where qreal != double
|
||||
|
||||
@DPATCH@
|
||||
Index: python-qt4-4.7.2/configure.py
|
||||
===================================================================
|
||||
--- python-qt4-4.7.2.orig/configure.py 2010-03-17 19:29:19.000000000 +0100
|
||||
+++ python-qt4-4.7.2/configure.py 2010-03-25 23:53:55.468631945 +0100
|
||||
@@ -1915,8 +1915,9 @@
|
||||
out << "PyQt_NoOpenGLES\\n";
|
||||
#endif
|
||||
|
||||
- if (sizeof (qreal) != sizeof (double))
|
||||
+#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
|
||||
out << "PyQt_qreal_double\\n";
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
Index: python-qt4-4.7.2/sip/QtCore/qlist.sip
|
||||
===================================================================
|
||||
--- python-qt4-4.7.2.orig/sip/QtCore/qlist.sip 2010-03-17 19:29:26.000000000 +0100
|
||||
+++ python-qt4-4.7.2/sip/QtCore/qlist.sip 2010-03-25 23:53:55.468631945 +0100
|
||||
@@ -749,3 +749,227 @@
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
+
|
||||
+// If we're on an architecture where qreal != double, then we need to also
|
||||
+// explicately handle doubles. On architectures where qreal == double, they
|
||||
+// will automaticially be cast upwards
|
||||
+
|
||||
+%If (!PyQt_qreal_double)
|
||||
+
|
||||
+%If (Qt_4_3_0 -)
|
||||
+// QList<QPair<double, double> > is implemented as a Python list of 2-element tuples.
|
||||
+%MappedType QList<QPair<double, double> >
|
||||
+{
|
||||
+%TypeHeaderCode
|
||||
+#include <qlist.h>
|
||||
+#include <qpair.h>
|
||||
+%End
|
||||
+
|
||||
+%ConvertFromTypeCode
|
||||
+ // Create the list.
|
||||
+ PyObject *l;
|
||||
+
|
||||
+ if ((l = PyList_New(sipCpp->size())) == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ // Set the list elements.
|
||||
+ for (int i = 0; i < sipCpp->size(); ++i)
|
||||
+ {
|
||||
+ const QPair<double, double> &p = sipCpp->at(i);
|
||||
+ PyObject *pobj;
|
||||
+
|
||||
+ if ((pobj = Py_BuildValue((char *)"dd", p.first, p.second)) == NULL)
|
||||
+ {
|
||||
+ Py_DECREF(l);
|
||||
+
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ PyList_SET_ITEM(l, i, pobj);
|
||||
+ }
|
||||
+
|
||||
+ return l;
|
||||
+%End
|
||||
+
|
||||
+%ConvertToTypeCode
|
||||
+ SIP_SSIZE_T len;
|
||||
+
|
||||
+ // Check the type if that is all that is required.
|
||||
+ if (sipIsErr == NULL)
|
||||
+ {
|
||||
+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ {
|
||||
+ PyObject *tup = PySequence_ITEM(sipPy, i);
|
||||
+
|
||||
+ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ QList<QPair<double, double> > *ql = new QList<QPair<double, double> >;
|
||||
+ len = PySequence_Size(sipPy);
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ {
|
||||
+ PyObject *tup = PySequence_ITEM(sipPy, i);
|
||||
+
|
||||
+ double first = PyFloat_AsDouble(PySequence_ITEM(tup, 0));
|
||||
+ double second = PyFloat_AsDouble(PySequence_ITEM(tup, 1));
|
||||
+
|
||||
+ ql->append(QPair<double, double>(first, second));
|
||||
+ }
|
||||
+
|
||||
+ *sipCppPtr = ql;
|
||||
+
|
||||
+ return sipGetState(sipTransferObj);
|
||||
+%End
|
||||
+};
|
||||
+%End
|
||||
+%If (Qt_4_3_0 -)
|
||||
+// QList<QPair<double, TYPE> > is implemented as a Python list of 2-element tuples.
|
||||
+template<double, TYPE>
|
||||
+%MappedType QList<QPair<double, TYPE> >
|
||||
+{
|
||||
+%TypeHeaderCode
|
||||
+#include <qlist.h>
|
||||
+#include <qpair.h>
|
||||
+%End
|
||||
+
|
||||
+%ConvertFromTypeCode
|
||||
+ // Create the list.
|
||||
+ PyObject *l;
|
||||
+
|
||||
+ if ((l = PyList_New(sipCpp->size())) == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ // Set the list elements.
|
||||
+ for (int i = 0; i < sipCpp->size(); ++i)
|
||||
+ {
|
||||
+ const QPair<double, TYPE> &p = sipCpp->at(i);
|
||||
+ TYPE *t = new TYPE(p.second);
|
||||
+ PyObject *pobj;
|
||||
+
|
||||
+ if ((pobj = sipBuildResult(NULL, "(dB)", p.first, t, sipClass_TYPE, sipTransferObj)) == NULL)
|
||||
+ {
|
||||
+ Py_DECREF(l);
|
||||
+ delete t;
|
||||
+
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ PyList_SET_ITEM(l, i, pobj);
|
||||
+ }
|
||||
+
|
||||
+ return l;
|
||||
+%End
|
||||
+
|
||||
+%ConvertToTypeCode
|
||||
+ SIP_SSIZE_T len;
|
||||
+
|
||||
+ // Check the type if that is all that is required.
|
||||
+ if (sipIsErr == NULL)
|
||||
+ {
|
||||
+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ {
|
||||
+ PyObject *tup = PySequence_ITEM(sipPy, i);
|
||||
+
|
||||
+ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (!sipCanConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, SIP_NOT_NONE))
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ QList<QPair<double, TYPE> > *ql = new QList<QPair<double, TYPE> >;
|
||||
+ len = PySequence_Size(sipPy);
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ {
|
||||
+ PyObject *tup = PySequence_ITEM(sipPy, i);
|
||||
+ double d;
|
||||
+ int state;
|
||||
+
|
||||
+ d = PyFloat_AsDouble(PySequence_ITEM(tup, 0));
|
||||
+ TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
|
||||
+
|
||||
+ if (*sipIsErr)
|
||||
+ {
|
||||
+ sipReleaseInstance(t, sipClass_TYPE, state);
|
||||
+
|
||||
+ delete ql;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ ql->append(QPair<double, TYPE>(d, *t));
|
||||
+
|
||||
+ sipReleaseInstance(t, sipClass_TYPE, state);
|
||||
+ }
|
||||
+
|
||||
+ *sipCppPtr = ql;
|
||||
+
|
||||
+ return sipGetState(sipTransferObj);
|
||||
+%End
|
||||
+};
|
||||
+%End
|
||||
+
|
||||
+// QList<double> is implemented as a Python list of doubles.
|
||||
+%MappedType QList<double>
|
||||
+{
|
||||
+%TypeHeaderCode
|
||||
+#include <qlist.h>
|
||||
+%End
|
||||
+
|
||||
+%ConvertFromTypeCode
|
||||
+ // Create the list.
|
||||
+ PyObject *l;
|
||||
+
|
||||
+ if ((l = PyList_New(sipCpp->size())) == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ // Set the list elements.
|
||||
+ for (int i = 0; i < sipCpp->size(); ++i)
|
||||
+ {
|
||||
+ PyObject *pobj;
|
||||
+
|
||||
+ if ((pobj = PyFloat_FromDouble(sipCpp->value(i))) == NULL)
|
||||
+ {
|
||||
+ Py_DECREF(l);
|
||||
+
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ PyList_SET_ITEM(l, i, pobj);
|
||||
+ }
|
||||
+
|
||||
+ return l;
|
||||
+%End
|
||||
+
|
||||
+%ConvertToTypeCode
|
||||
+ // Check the type if that is all that is required.
|
||||
+ if (sipIsErr == NULL)
|
||||
+ return (PySequence_Check(sipPy) && PySequence_Size(sipPy) >= 0);
|
||||
+
|
||||
+ QList<double> *ql = new QList<double>;
|
||||
+ SIP_SSIZE_T len = PySequence_Size(sipPy);
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ ql->append(PyFloat_AsDouble(PySequence_ITEM(sipPy, i)));
|
||||
+
|
||||
+ *sipCppPtr = ql;
|
||||
+
|
||||
+ return sipGetState(sipTransferObj);
|
||||
+%End
|
||||
+};
|
||||
+
|
||||
+%End
|
@ -1,29 +0,0 @@
|
||||
diff -Nru PyQt-x11-gpl-4.9.4/configure.py PyQt-x11-gpl-4.9.4.buono/configure.py
|
||||
--- PyQt-x11-gpl-4.9.4/configure.py 2012-09-26 10:57:20.302056510 +0000
|
||||
+++ PyQt-x11-gpl-4.9.4.buono/configure.py 2012-09-26 10:56:12.418802710 +0000
|
||||
@@ -966,6 +966,7 @@
|
||||
else:
|
||||
# Use distutils to get the additional configuration.
|
||||
from distutils.sysconfig import get_config_vars
|
||||
+ from distutils.sysconfig import get_python_lib
|
||||
ducfg = get_config_vars()
|
||||
|
||||
config_args = ducfg.get("CONFIG_ARGS", "")
|
||||
@@ -980,16 +981,7 @@
|
||||
dynamic_pylib = "--enable-shared" in config_args
|
||||
|
||||
if dynamic_pylib:
|
||||
- if glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor)):
|
||||
- lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
|
||||
- elif glob.glob("%s/libpython%d.%d*" % (ducfg["LIBDIR"], py_major, py_minor)):
|
||||
- lib_dir_flag = quote("-L%s" % ducfg["LIBDIR"])
|
||||
- else:
|
||||
- sipconfig.inform("Qt Designer plugin disabled because Python library couldn't be found")
|
||||
- lib_dir_flag = ''
|
||||
- opts.designer_plugin = False
|
||||
-
|
||||
- link = "%s -lpython%d.%d%s" % (lib_dir_flag, py_major, py_minor, abi)
|
||||
+ link = "-L%s -lpython%d.%d" % (get_python_lib(plat_specific=1, standard_lib=1), py_major, py_minor)
|
||||
else:
|
||||
sipconfig.inform("Qt Designer plugin disabled because Python library is static")
|
||||
opts.designer_plugin = False
|
@ -1,16 +0,0 @@
|
||||
--- sip/QtOpenGL/qgl.sip 2010-12-04 17:15:10.497601234 +0200
|
||||
+++ sip/QtOpenGL/qgl.sip 2010-12-04 17:15:46.138746235 +0200
|
||||
@@ -255,13 +255,6 @@
|
||||
%End
|
||||
GLuint bindTexture(const QString &);
|
||||
|
||||
-protected:
|
||||
-%If (WS_X11)
|
||||
-%If (PyQt_NoOpenGLES)
|
||||
- virtual void *chooseVisual();
|
||||
-%End
|
||||
-%End
|
||||
-
|
||||
public:
|
||||
void deleteTexture(GLuint);
|
||||
static void setTextureCacheLimit(int);
|
90
PyQt5.spec
90
PyQt5.spec
@ -1,19 +1,17 @@
|
||||
%define pythonsip_ver %(sip -V)
|
||||
|
||||
Name: PyQt5
|
||||
Version: 5.13.1
|
||||
Release: 1mamba
|
||||
Version: 5.14.2
|
||||
Release: 5mamba
|
||||
Summary: Python bindings for the Qt5 cross platform GUI toolkit
|
||||
Group: System/Libraries
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://www.riverbankcomputing.com/software/pyqt
|
||||
Source: https://www.riverbankcomputing.com/static/Downloads/PyQt5/%{version}/PyQt5_gpl-%{version}.tar.gz
|
||||
Source: https://pypi.debian.net/PyQt5/PyQt5-%{version}.tar.gz
|
||||
#Source: https://www.riverbankcomputing.com/static/Downloads/PyQt5/%{version}/PyQt5_gpl-%{version}.tar.gz
|
||||
#Source: http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-%{version}/PyQt5_gpl-%{version}.tar.gz
|
||||
Patch0: PyQt4-egl.patch
|
||||
Patch1: PyQt4-4.7.3-qreal_float_support.patch
|
||||
Patch2: PyQt4-4.9.4-x86_64.patch
|
||||
Patch3: PyQt5-5.3.2-python-sip-4.16.1.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
@ -28,20 +26,15 @@ BuildRequires: libstdc++6-devel
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: libXcursor-devel
|
||||
BuildRequires: libdbus-devel
|
||||
BuildRequires: python-dbus
|
||||
BuildRequires: python-dbus-devel
|
||||
# WARNING: do not parametrize python-sip-devel version or it will be useless for ports
|
||||
BuildRequires: python-sip-devel >= 4.19.18
|
||||
%if "%?with_pyver"
|
||||
BuildRequires: python-dbus-py%{with_pyver} >= 1.2.8-3mamba
|
||||
BuildRequires: python-sip-py%{with_pyver}-devel >= 4.19.19
|
||||
%endif
|
||||
BuildRequires: python-dbus-py3 >= 1.2.8-3mamba
|
||||
BuildRequires: python-sip-py3 >= 5.1.2
|
||||
BuildRequires: python-dbus-py36 >= 1.2.8-3mamba
|
||||
BuildRequires: python-sip-py36 >= 5.1.2
|
||||
BuildRequires: libqt5-devel >= %{version}
|
||||
%ifnarch arm
|
||||
BuildRequires: libQt5WebEngine-devel >= %{version}
|
||||
%endif
|
||||
Requires: python-dbus
|
||||
Requires: %{name}-qmlplugin
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
@ -61,6 +54,13 @@ PyQt5 is a comprehensive set of Python bindings for Nokia's Qt5 cross platform G
|
||||
%package py%{pyver}
|
||||
Group: System/Libraries/Python
|
||||
Summary: Python %{pyver} bindings for the Qt5 cross platform GUI toolkit
|
||||
Requires: python-dbus-py%{pyver}
|
||||
Requires: %{name}-qmlplugin
|
||||
Requires: PyQt5-sip-py%{pyver}
|
||||
%if "%{pyver}" == "3"
|
||||
Provides: PyQt5
|
||||
Obsoletes: PyQt5
|
||||
%endif
|
||||
%py_requires
|
||||
|
||||
%description py%{pyver}
|
||||
@ -70,11 +70,11 @@ PyQt5 is a comprehensive set of Python bindings for Qt5 cross platform GUI toolk
|
||||
%package devel
|
||||
Summary: Development files for PyQt5
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Requires: %{name}-QtDesigner = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Requires: %{name}-py3 = %{?epoch:%epoch:}%{version}-%{release}
|
||||
#Requires: %{name}-QtDesigner = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description devel
|
||||
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.
|
||||
PyQt5 is a comprehensive set of Python bindings for Nokia's Qt5 cross platform GUI toolkit.
|
||||
|
||||
This package contains files needed for development.
|
||||
|
||||
@ -83,31 +83,30 @@ Summary: Qml plugin for PyQt5
|
||||
Group: System/Libraries
|
||||
|
||||
%description qmlplugin
|
||||
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.
|
||||
PyQt5 is a comprehensive set of Python bindings for Nokia's Qt5 cross platform GUI toolkit.
|
||||
|
||||
This package contains the QML plugin.
|
||||
|
||||
%package %{?with_pyver:py%{pyver}-}QtDesigner
|
||||
Summary: QtDesigner support components for PyQt4
|
||||
%package QtDesigner%{?with_pyver:-py%{pyver}}
|
||||
Summary: QtDesigner support components for PyQt5
|
||||
Group: System/Libraries
|
||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Requires: PyQt5%{?with_pyver:-py%{pyver}} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Provides: PyQt5%{?with_pyver:-py%{pyver}}-QtDesigner
|
||||
Obsoletes: PyQt5%{?with_pyver:-py%{pyver}}-QtDesigner
|
||||
%if "%{pyver}" == "3"
|
||||
Provides: PyQt5-QtDesigner
|
||||
Obsoletes: PyQt5-QtDesigner
|
||||
%endif
|
||||
|
||||
%description %{?with_pyver:py%{pyver}-}QtDesigner
|
||||
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.
|
||||
%description QtDesigner%{?with_pyver:-py%{pyver}}
|
||||
PyQt5 is a comprehensive set of Python bindings for Nokia's Qt5 cross platform GUI toolkit.
|
||||
|
||||
This package contains the QtDesigner support components for PyQt4.
|
||||
This package contains the QtDesigner support components for PyQt5.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyQt5_gpl-%{version}
|
||||
%setup -q
|
||||
#-D -T
|
||||
#:<< _EOF
|
||||
#%patch0 -p0
|
||||
#% ifarch arm
|
||||
#% patch1 -p1
|
||||
#% endif
|
||||
#%ifarch x86_64
|
||||
#%patch2 -p1
|
||||
#%endif
|
||||
#%patch3 -p1
|
||||
|
||||
%build
|
||||
@ -130,14 +129,16 @@ sed -i "/generate_code(\"phonon\")/s:phonon\":&, extra_include_dirs=[\"%{_includ
|
||||
# Fix documentation permissions
|
||||
find examples/ -type f -exec chmod 0644 {} ';'
|
||||
|
||||
%if "%{pyver}" != "3"
|
||||
rm -f %{buildroot}%{_libdir}/qt5/plugins/PyQt5/libpyqt5qmlplugin.so
|
||||
%endif
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%files %{?with_pyver:py%{pyver}}
|
||||
%defattr(-,root,root)
|
||||
#%if "%{?pyver}" != "3"
|
||||
%{python_sitelib}/dbus/mainloop/pyqt5.so
|
||||
#%endif
|
||||
%dir %{python_sitearch}/PyQt5-%{version}.dist-info
|
||||
%{python_sitearch}/PyQt5-%{version}.dist-info/*
|
||||
%dir %{python_sitearch}/PyQt5
|
||||
@ -146,9 +147,11 @@ find examples/ -type f -exec chmod 0644 {} ';'
|
||||
%dir %{_qt5_plugindir}/PyQt5
|
||||
%doc LICENSE*
|
||||
|
||||
%if "%{pyver}" == "3"
|
||||
%files qmlplugin
|
||||
%defattr(-,root,root)
|
||||
%{_qt5_plugindir}/PyQt5/libpyqt5qmlplugin.so
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
@ -159,12 +162,27 @@ find examples/ -type f -exec chmod 0644 {} ';'
|
||||
%doc examples
|
||||
%doc NEWS README
|
||||
|
||||
%files %{?with_pyver:py%{pyver}-}QtDesigner
|
||||
%files QtDesigner%{?with_pyver:-py%{pyver}}
|
||||
%defattr(-,root,root)
|
||||
%{python_sitearch}/PyQt5/QtDesigner.so
|
||||
%{_qt5_plugindir}/designer/*
|
||||
|
||||
%changelog
|
||||
* Mon Apr 13 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.14.2-5mamba
|
||||
- require PyQt5-sip-py* package
|
||||
|
||||
* Sun Apr 12 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.14.2-4mamba
|
||||
- fix other internal requirements
|
||||
|
||||
* Sat Apr 11 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.14.2-3mamba
|
||||
- PyQt5-devel: remove requirement for PyQt5-QtDesigner
|
||||
|
||||
* Sat Apr 11 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.14.2-2mamba
|
||||
- PyQt5-devel: require PyQt5-py3
|
||||
|
||||
* Fri Apr 10 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.14.2-1mamba
|
||||
- update to 5.14.2
|
||||
|
||||
* Sat Oct 26 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 5.13.1-1mamba
|
||||
- update to 5.13.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user