summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordobedobedo2022-01-22 17:32:34 +0300
committerdobedobedo2022-01-22 17:32:34 +0300
commitf5158fc7af6d6a85b73fbd555a3ab7b3020352b1 (patch)
tree2c9177322790e076099393b1db5ae4514b63cbfd
downloadaur-f5158fc7af6d6a85b73fbd555a3ab7b3020352b1.tar.gz
Initial commit
-rw-r--r--.SRCINFO26
-rw-r--r--Fix-wxGridEvent-GetRow-GetCol.patch117
-rw-r--r--PKGBUILD53
3 files changed, 196 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..53287c5155e1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = python-wxpython-dev
+ pkgdesc = Cross-platform GUI toolkit. Developer version
+ pkgver = 4.1.1
+ pkgrel = 1
+ url = https://www.wxpython.org
+ arch = x86_64
+ license = custom:wxWindows
+ checkdepends = xorg-server-xvfb
+ checkdepends = python-pytest-forked
+ checkdepends = python-numpy
+ makedepends = mesa
+ makedepends = glu
+ makedepends = webkit2gtk
+ makedepends = python-requests
+ makedepends = python-setuptools
+ depends = wxgtk3-dev
+ depends = python-six
+ optdepends = python-pypubsub: Alternative to the deprecated wx.lib.pubsub API
+ provides = python-wxpython
+ conflicts = python-wxpython
+ source = https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-4.1.1.tar.gz
+ source = Fix-wxGridEvent-GetRow-GetCol.patch
+ sha512sums = 00924008b97bbecb824c3fffd46fc76a5a3115d9346eb95baccc6cca99c080aa80b586af42fece8a3b4d234f2d07ffa8b66b50a164c41cbd95abc9b139c32809
+ sha512sums = 42523eeb28773538b07fe56346397ac7e26af554bd493bbffcde61b4a5557655b0f930447d3927c324ef674c7c1f0ae5b8b040d2324352388ed6ffc844d221e3
+
+pkgname = python-wxpython-dev
diff --git a/Fix-wxGridEvent-GetRow-GetCol.patch b/Fix-wxGridEvent-GetRow-GetCol.patch
new file mode 100644
index 000000000000..279e0732efea
--- /dev/null
+++ b/Fix-wxGridEvent-GetRow-GetCol.patch
@@ -0,0 +1,117 @@
+diff --git a/sip/cpp/sip_gridwxGridEvent.cpp b/sip/cpp/sip_gridwxGridEvent.cpp
+index 0830b67..9aca2c4 100644
+--- a/sip/cpp/sip_gridwxGridEvent.cpp
++++ b/sip/cpp/sip_gridwxGridEvent.cpp
+@@ -32,8 +32,6 @@ public:
+ * this class.
+ */
+ protected:
+- int GetRow() SIP_OVERRIDE;
+- int GetCol() SIP_OVERRIDE;
+ ::wxEvent* Clone() const SIP_OVERRIDE;
+ ::wxEventCategory GetEventCategory() const SIP_OVERRIDE;
+
+@@ -44,7 +42,7 @@ private:
+ sipwxGridEvent(const sipwxGridEvent &);
+ sipwxGridEvent &operator = (const sipwxGridEvent &);
+
+- char sipPyMethods[4];
++ char sipPyMethods[2];
+ };
+
+ sipwxGridEvent::sipwxGridEvent(): ::wxGridEvent(), sipPySelf(SIP_NULLPTR)
+@@ -67,42 +65,12 @@ sipwxGridEvent::~sipwxGridEvent()
+ sipInstanceDestroyedEx(&sipPySelf);
+ }
+
+-int sipwxGridEvent::GetRow()
+-{
+- sip_gilstate_t sipGILState;
+- PyObject *sipMeth;
+-
+- sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,SIP_NULLPTR,sipName_GetRow);
+-
+- if (!sipMeth)
+- return ::wxGridEvent::GetRow();
+-
+- extern int sipVH__grid_41(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
+-
+- return sipVH__grid_41(sipGILState, 0, sipPySelf, sipMeth);
+-}
+-
+-int sipwxGridEvent::GetCol()
+-{
+- sip_gilstate_t sipGILState;
+- PyObject *sipMeth;
+-
+- sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,SIP_NULLPTR,sipName_GetCol);
+-
+- if (!sipMeth)
+- return ::wxGridEvent::GetCol();
+-
+- extern int sipVH__grid_41(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
+-
+- return sipVH__grid_41(sipGILState, 0, sipPySelf, sipMeth);
+-}
+-
+ ::wxEvent* sipwxGridEvent::Clone() const
+ {
+ sip_gilstate_t sipGILState;
+ PyObject *sipMeth;
+
+- sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[2]),sipPySelf,SIP_NULLPTR,sipName_Clone);
++ sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_Clone);
+
+ if (!sipMeth)
+ return ::wxGridEvent::Clone();
+@@ -117,7 +85,7 @@ int sipwxGridEvent::GetCol()
+ sip_gilstate_t sipGILState;
+ PyObject *sipMeth;
+
+- sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[3]),sipPySelf,SIP_NULLPTR,sipName_GetEventCategory);
++ sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,SIP_NULLPTR,sipName_GetEventCategory);
+
+ if (!sipMeth)
+ return ::wxGridEvent::GetEventCategory();
+@@ -206,10 +174,9 @@ extern "C" {static PyObject *meth_wxGridEvent_GetCol(PyObject *, PyObject *);}
+ static PyObject *meth_wxGridEvent_GetCol(PyObject *sipSelf, PyObject *sipArgs)
+ {
+ PyObject *sipParseErr = SIP_NULLPTR;
+- bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
+
+ {
+- ::wxGridEvent *sipCpp;
++ const ::wxGridEvent *sipCpp;
+
+ if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridEvent, &sipCpp))
+ {
+@@ -218,7 +185,7 @@ static PyObject *meth_wxGridEvent_GetCol(PyObject *sipSelf, PyObject *sipArgs)
+ PyErr_Clear();
+
+ Py_BEGIN_ALLOW_THREADS
+- sipRes = (sipSelfWasArg ? sipCpp-> ::wxGridEvent::GetCol() : sipCpp->GetCol());
++ sipRes = sipCpp->GetCol();
+ Py_END_ALLOW_THREADS
+
+ if (PyErr_Occurred())
+@@ -277,10 +244,9 @@ extern "C" {static PyObject *meth_wxGridEvent_GetRow(PyObject *, PyObject *);}
+ static PyObject *meth_wxGridEvent_GetRow(PyObject *sipSelf, PyObject *sipArgs)
+ {
+ PyObject *sipParseErr = SIP_NULLPTR;
+- bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
+
+ {
+- ::wxGridEvent *sipCpp;
++ const ::wxGridEvent *sipCpp;
+
+ if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridEvent, &sipCpp))
+ {
+@@ -289,7 +255,7 @@ static PyObject *meth_wxGridEvent_GetRow(PyObject *sipSelf, PyObject *sipArgs)
+ PyErr_Clear();
+
+ Py_BEGIN_ALLOW_THREADS
+- sipRes = (sipSelfWasArg ? sipCpp-> ::wxGridEvent::GetRow() : sipCpp->GetRow());
++ sipRes = sipCpp->GetRow();
+ Py_END_ALLOW_THREADS
+
+ if (PyErr_Occurred())
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..14f913b77fa8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Yu-Hsuan Tu <dobe0331 at gmail dot com>
+# Contributor: Qirui Wang <wqr.prg@gmail.com>
+# Contributor: Filipe Laíns (FFY00) <lains@archlinux.org>
+# Contributor: Morten Linderud <foxboron@archlinux.org>
+# Contributor: Eric Bélanger <eric@archlinux.org>
+
+pkgname=python-wxpython-dev
+_pkgname=wxPython
+pkgver=4.1.1
+pkgrel=1
+pkgdesc='Cross-platform GUI toolkit. Developer version'
+arch=('x86_64')
+license=('custom:wxWindows')
+url='https://www.wxpython.org'
+depends=('wxgtk3-dev' 'python-six')
+optdepends=('python-pypubsub: Alternative to the deprecated wx.lib.pubsub API')
+makedepends=('mesa' 'glu' 'webkit2gtk' 'python-requests' 'python-setuptools')
+checkdepends=('xorg-server-xvfb' 'python-pytest-forked' 'python-numpy')
+provides=('python-wxpython')
+conflicts=('python-wxpython')
+source=("https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-$pkgver.tar.gz"
+ 'Fix-wxGridEvent-GetRow-GetCol.patch')
+sha512sums=('00924008b97bbecb824c3fffd46fc76a5a3115d9346eb95baccc6cca99c080aa80b586af42fece8a3b4d234f2d07ffa8b66b50a164c41cbd95abc9b139c32809'
+ '42523eeb28773538b07fe56346397ac7e26af554bd493bbffcde61b4a5557655b0f930447d3927c324ef674c7c1f0ae5b8b040d2324352388ed6ffc844d221e3')
+
+prepare() {
+ cd "$_pkgname-$pkgver"
+
+ # Fix https://github.com/wxWidgets/Phoenix/issues/1909
+ patch -p1 -i ../Fix-wxGridEvent-GetRow-GetCol.patch
+}
+
+build() {
+ cd "$_pkgname-$pkgver"
+
+ python build.py build --use_syswx --release
+}
+
+check() {
+ cd "$_pkgname-$pkgver"
+
+ # there are segfaulting tests so --forked ensures we get sensible results
+ PYTHONPATH=$PWD xvfb-run pytest --forked unittests || echo "==> WARNING: tests usually fail randomly"
+}
+
+package() {
+ cd "$_pkgname-$pkgver"
+
+ python build.py install --destdir="$pkgdir"
+
+ install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+ find "$pkgdir/usr/lib" -type f | xargs chmod 644
+}