summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwereii2021-10-29 15:51:51 +0200
committerwereii2022-01-24 22:38:23 +0100
commitc73b86ce81ff1b2205d4395379331e9ec26a7641 (patch)
tree41d8ee327642ca93702d79a01a398a0235c00727
parent02e0994ac9f28776f6fd3007a986426d506f5492 (diff)
downloadaur-c73b86ce81ff1b2205d4395379331e9ec26a7641.tar.gz
Fix compatibility with python310 and wxPython
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore1
-rw-r--r--0001-python-3.10-compatibility.patch520
-rw-r--r--PKGBUILD14
4 files changed, 535 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 83db115ab0b2..3cdcdc5092d4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pyfa
pkgdesc = EVE Online Fitting Assistant
pkgver = 2.39.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/pyfa-org/Pyfa
arch = any
license = GPL3
@@ -28,8 +28,10 @@ pkgbase = pyfa
source = pyfa-2.39.2.tar.gz::https://github.com/pyfa-org/Pyfa/archive/v2.39.2.tar.gz
source = pyfa.desktop
source = pyfa-start.sh
+ source = 0001-python-3.10-compatibility.patch
sha256sums = 2a16ca0f1c2c34aebe9698aa84cae3695eea509eaa7496011d1bab0f8ac78a1f
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = SKIP
pkgname = pyfa
diff --git a/.gitignore b/.gitignore
index fa338a4f0b32..bd7081496a1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
!*.sh
!PKGBUILD
!.SRCINFO
+!*.patch
diff --git a/0001-python-3.10-compatibility.patch b/0001-python-3.10-compatibility.patch
new file mode 100644
index 000000000000..16cb1f2849b2
--- /dev/null
+++ b/0001-python-3.10-compatibility.patch
@@ -0,0 +1,520 @@
+From d3e85ab762682e290525768388213959461e3088 Mon Sep 17 00:00:00 2001
+From: Martin Petrus <martin.petrus@example.com>
+Date: Tue, 4 Jan 2022 13:27:30 +0100
+Subject: [PATCH] python 3.10 compatibility
+
+---
+ gui/builtinMarketBrowser/pfSearchBox.py | 6 +++---
+ gui/builtinShipBrowser/categoryItem.py | 4 ++--
+ gui/builtinShipBrowser/fitItem.py | 16 +++++++-------
+ gui/builtinShipBrowser/navigationPanel.py | 6 +++---
+ gui/builtinShipBrowser/pfListPane.py | 12 +++++------
+ gui/builtinShipBrowser/pfWidgetContainer.py | 4 ++--
+ gui/builtinShipBrowser/raceSelector.py | 8 +++----
+ gui/builtinShipBrowser/sfBrowserItem.py | 6 +++---
+ gui/builtinShipBrowser/shipItem.py | 18 ++++++++--------
+ gui/chrome_tabs.py | 24 ++++++++++-----------
+ gui/pyfa_gauge.py | 12 +++++------
+ gui/utils/anim.py | 2 +-
+ gui/utils/color.py | 10 ++++-----
+ gui/utils/draw.py | 6 +++---
+ 14 files changed, 67 insertions(+), 67 deletions(-)
+
+diff --git a/gui/builtinMarketBrowser/pfSearchBox.py b/gui/builtinMarketBrowser/pfSearchBox.py
+index d1e8f2f40..ea068a08f 100644
+--- a/gui/builtinMarketBrowser/pfSearchBox.py
++++ b/gui/builtinMarketBrowser/pfSearchBox.py
+@@ -220,15 +220,15 @@ class PFSearchBox(wx.Window):
+ cheight = rect.height
+
+ self.searchButtonX = self.padding
+- self.searchButtonY = (cheight - sh) / 2
++ self.searchButtonY = (cheight - sh) // 2
+ self.cancelButtonX = cwidth - self.padding - cw
+- self.cancelButtonY = (cheight - ch) / 2
++ self.cancelButtonY = (cheight - ch) // 2
+
+ self.editX = self.searchButtonX + self.padding + sw
+
+ editWidth, editHeight = self.EditBox.GetSize()
+
+- self.editY = (cheight - editHeight) / 2
++ self.editY = (cheight - editHeight) // 2
+ self.EditBox.SetPosition((self.editX, self.editY))
+ self.EditBox.SetSize((self.cancelButtonX - self.padding - self.editX, -1))
+
+diff --git a/gui/builtinShipBrowser/categoryItem.py b/gui/builtinShipBrowser/categoryItem.py
+index b88557d22..d5559660a 100644
+--- a/gui/builtinShipBrowser/categoryItem.py
++++ b/gui/builtinShipBrowser/categoryItem.py
+@@ -85,7 +85,7 @@ class CategoryItem(SFBrowserItem):
+ def UpdateElementsPos(self, mdc):
+ rect = self.GetRect()
+ self.shipBmpx = self.padding
+- self.shipBmpy = (rect.height - self.shipBmp.GetWidth()) / 2
++ self.shipBmpy = (rect.height - self.shipBmp.GetWidth()) // 2
+
+ self.shipBmpx -= self.animCount
+
+@@ -94,7 +94,7 @@ class CategoryItem(SFBrowserItem):
+ wtext, htext = mdc.GetTextExtent(categoryName)
+
+ self.catx = self.shipBmpx + self.shipBmp.GetWidth() + self.padding
+- self.caty = (rect.height - htext) / 2
++ self.caty = (rect.height - htext) // 2
+
+ def DrawItem(self, mdc):
+ # rect = self.GetRect()
+diff --git a/gui/builtinShipBrowser/fitItem.py b/gui/builtinShipBrowser/fitItem.py
+index bd37b0b94..3c2fdde5a 100644
+--- a/gui/builtinShipBrowser/fitItem.py
++++ b/gui/builtinShipBrowser/fitItem.py
+@@ -445,23 +445,23 @@ class FitItem(SFItem.SFBrowserItem):
+ rect = self.GetRect()
+
+ self.toolbarx = rect.width - self.toolbar.GetWidth() - self.padding
+- self.toolbary = (rect.height - self.toolbar.GetHeight()) / 2
++ self.toolbary = (rect.height - self.toolbar.GetHeight()) // 2
+
+ self.toolbarx += self.animCount
+
+- self.shipEffx = self.padding + (rect.height - self.shipEffBk.GetWidth()) / 2
+- self.shipEffy = (rect.height - self.shipEffBk.GetHeight()) / 2
++ self.shipEffx = self.padding + (rect.height - self.shipEffBk.GetWidth()) // 2
++ self.shipEffy = (rect.height - self.shipEffBk.GetHeight()) // 2
+
+ self.shipEffx -= self.animCount
+
+- self.shipBmpx = self.padding + (rect.height - self.shipBmp.GetWidth()) / 2
+- self.shipBmpy = (rect.height - self.shipBmp.GetHeight()) / 2
++ self.shipBmpx = self.padding + (rect.height - self.shipBmp.GetWidth()) // 2
++ self.shipBmpy = (rect.height - self.shipBmp.GetHeight()) // 2
+
+ self.shipBmpx -= self.animCount
+
+ self.textStartx = self.shipEffx + self.shipEffBk.GetWidth() + self.padding
+
+- self.fitNamey = (rect.height - self.shipBmp.GetHeight()) / 2
++ self.fitNamey = (rect.height - self.shipBmp.GetHeight()) // 2
+
+ mdc.SetFont(self.fontBig)
+ wtext, htext = mdc.GetTextExtent(self.fitName)
+@@ -473,7 +473,7 @@ class FitItem(SFItem.SFBrowserItem):
+ wlabel, hlabel = mdc.GetTextExtent(self.toolbar.hoverLabel)
+
+ self.thoverx = self.toolbarx - self.padding - wlabel
+- self.thovery = (rect.height - hlabel) / 2
++ self.thovery = (rect.height - hlabel) // 2
+ self.thoverw = wlabel
+
+ def DrawItem(self, mdc):
+@@ -529,7 +529,7 @@ class FitItem(SFItem.SFBrowserItem):
+ fnEditSize = editCtl.GetSize()
+ wSize = self.GetSize()
+ fnEditPosX = end
+- fnEditPosY = (wSize.height - fnEditSize.height) / 2
++ fnEditPosY = (wSize.height - fnEditSize.height) // 2
+ if fnEditPosX < start:
+ editCtl.SetSize((self.editWidth + fnEditPosX - start, -1))
+ editCtl.SetPosition((start, fnEditPosY))
+diff --git a/gui/builtinShipBrowser/navigationPanel.py b/gui/builtinShipBrowser/navigationPanel.py
+index 83dff8216..788795fc2 100644
+--- a/gui/builtinShipBrowser/navigationPanel.py
++++ b/gui/builtinShipBrowser/navigationPanel.py
+@@ -200,19 +200,19 @@ class NavigationPanel(SFItem.SFBrowserItem):
+ rect = self.GetRect()
+
+ self.toolbarx = self.padding
+- self.toolbary = (rect.height - self.toolbar.GetHeight()) / 2
++ self.toolbary = (rect.height - self.toolbar.GetHeight()) // 2
+
+ mdc.SetFont(self.fontSmall)
+
+ wlabel, hlabel = mdc.GetTextExtent(self.toolbar.hoverLabel)
+
+ self.thoverx = self.toolbar.GetWidth() + self.padding
+- self.thovery = (rect.height - hlabel) / 2
++ self.thovery = (rect.height - hlabel) // 2
+ self.thoverw = wlabel
+
+ self.browserBoxX = self.thoverx
+ bEditBoxWidth, bEditBoxHeight = self.BrowserSearchBox.GetSize()
+- self.browserBoxY = (rect.height - bEditBoxHeight) / 2
++ self.browserBoxY = (rect.height - bEditBoxHeight) // 2
+
+ self.bEditBoxWidth = rect.width - self.browserBoxX - self.padding
+
+diff --git a/gui/builtinShipBrowser/pfListPane.py b/gui/builtinShipBrowser/pfListPane.py
+index ecb8edb1c..a78336b06 100644
+--- a/gui/builtinShipBrowser/pfListPane.py
++++ b/gui/builtinShipBrowser/pfListPane.py
+@@ -81,11 +81,11 @@ class PFListPane(wx.ScrolledWindow):
+
+ # is it before the left edge?
+ if cr.x < 0 < sppu_x:
+- new_vs_x = vs_x + (cr.x / sppu_x)
++ new_vs_x = vs_x + (cr.x // sppu_x)
+
+ # is it above the top?
+ if cr.y < 0 < sppu_y:
+- new_vs_y = vs_y + (cr.y / sppu_y)
++ new_vs_y = vs_y + (cr.y // sppu_y)
+
+ # For the right and bottom edges, scroll enough to show the
+ # whole control if possible, but if not just scroll such that
+@@ -93,19 +93,19 @@ class PFListPane(wx.ScrolledWindow):
+
+ # is it past the right edge ?
+ if cr.right > clntsz.width and sppu_x > 0:
+- diff = (cr.right - clntsz.width + 1) / sppu_x
++ diff = (cr.right - clntsz.width + 1) // sppu_x
+ if cr.x - diff * sppu_x > 0:
+ new_vs_x = vs_x + diff
+ else:
+- new_vs_x = vs_x + (cr.x / sppu_x)
++ new_vs_x = vs_x + (cr.x // sppu_x)
+
+ # is it below the bottom ?
+ if cr.bottom > clntsz.height and sppu_y > 0:
+- diff = (cr.bottom - clntsz.height + 1) / sppu_y
++ diff = (cr.bottom - clntsz.height + 1) // sppu_y
+ if cr.y - diff * sppu_y > 0:
+ new_vs_y = vs_y + diff
+ else:
+- new_vs_y = vs_y + (cr.y / sppu_y)
++ new_vs_y = vs_y + (cr.y // sppu_y)
+
+ # if we need to adjust
+ if new_vs_x != -1 or new_vs_y != -1:
+diff --git a/gui/builtinShipBrowser/pfWidgetContainer.py b/gui/builtinShipBrowser/pfWidgetContainer.py
+index e3219530a..00c533610 100644
+--- a/gui/builtinShipBrowser/pfWidgetContainer.py
++++ b/gui/builtinShipBrowser/pfWidgetContainer.py
+@@ -15,8 +15,8 @@ class PFWidgetsContainer(PFListPane):
+ if mode:
+ aweight, aheight = self.anim.GetSize()
+ cweight, cheight = self.GetSize()
+- ax = (cweight - aweight) / 2
+- ay = (cheight - aheight) / 2
++ ax = (cweight - aweight) // 2
++ ay = (cheight - aheight) // 2
+ self.anim.SetPosition((ax, ay))
+ self.anim.Show()
+ self.anim.Play()
+diff --git a/gui/builtinShipBrowser/raceSelector.py b/gui/builtinShipBrowser/raceSelector.py
+index 809474249..3ec5990f1 100644
+--- a/gui/builtinShipBrowser/raceSelector.py
++++ b/gui/builtinShipBrowser/raceSelector.py
+@@ -116,8 +116,8 @@ class RaceSelector(wx.Window):
+ width += bmp.GetWidth() + self.buttonsPadding
+ height = max(bmp.GetHeight(), height)
+
+- posx = (rect.width - width) / 2
+- posy = (rect.height - height) / 2
++ posx = (rect.width - width) // 2
++ posy = (rect.height - height) // 2
+
+ self.buttonsBarPos = (posx, posy)
+
+@@ -208,11 +208,11 @@ class RaceSelector(wx.Window):
+
+ if self.direction < 1:
+ if self.layout == wx.VERTICAL:
+- mdc.DrawBitmap(self.bmpArrow, -2, (rect.height - self.bmpArrow.GetHeight()) / 2)
++ mdc.DrawBitmap(self.bmpArrow, -2, (rect.height - self.bmpArrow.GetHeight()) // 2)
+ else:
+ mdc.SetPen(wx.Pen(sepColor, 1))
+ mdc.DrawLine(0, 0, rect.width, 0)
+- mdc.DrawBitmap(self.bmpArrow, (rect.width - self.bmpArrow.GetWidth()) / 2, -2)
++ mdc.DrawBitmap(self.bmpArrow, (rect.width - self.bmpArrow.GetWidth()) // 2, -2)
+
+ def OnTimer(self, event):
+ if event.GetId() == self.animTimerID:
+diff --git a/gui/builtinShipBrowser/sfBrowserItem.py b/gui/builtinShipBrowser/sfBrowserItem.py
+index 02fe03218..4e59c6c69 100644
+--- a/gui/builtinShipBrowser/sfBrowserItem.py
++++ b/gui/builtinShipBrowser/sfBrowserItem.py
+@@ -228,12 +228,12 @@ class PFToolbar:
+
+ if btnState & BTN_PRESSED:
+ bmp = button.GetBitmap()
+- by += self.padding / 2
+- tbx += self.padding / 2
++ by += self.padding // 2
++ tbx += self.padding // 2
+
+ bmpWidth = bmp.GetWidth()
+
+- pdc.DrawBitmap(dropShadowBmp, bx + self.padding / 2, self.toolbarY + self.padding / 2)
++ pdc.DrawBitmap(dropShadowBmp, bx + self.padding // 2, self.toolbarY + self.padding // 2)
+ pdc.DrawBitmap(bmp, tbx, by)
+
+ bx += bmpWidth + self.padding
+diff --git a/gui/builtinShipBrowser/shipItem.py b/gui/builtinShipBrowser/shipItem.py
+index 7c4d528d7..d220bf99a 100644
+--- a/gui/builtinShipBrowser/shipItem.py
++++ b/gui/builtinShipBrowser/shipItem.py
+@@ -194,26 +194,26 @@ class ShipItem(SFItem.SFBrowserItem):
+ rect = self.GetRect()
+
+ self.toolbarx = rect.width - self.toolbar.GetWidth() - self.padding
+- self.toolbary = (rect.height - self.toolbar.GetHeight()) / 2
++ self.toolbary = (rect.height - self.toolbar.GetHeight()) // 2
+
+ self.toolbarx += self.animCount
+
+- self.shipEffx = self.padding + (rect.height - self.shipEffBk.GetWidth()) / 2
+- self.shipEffy = (rect.height - self.shipEffBk.GetHeight()) / 2
++ self.shipEffx = self.padding + (rect.height - self.shipEffBk.GetWidth()) // 2
++ self.shipEffy = (rect.height - self.shipEffBk.GetHeight()) // 2
+
+ self.shipEffx -= self.animCount
+
+- self.shipBmpx = self.padding + (rect.height - self.shipBmp.GetWidth()) / 2
+- self.shipBmpy = (rect.height - self.shipBmp.GetHeight()) / 2
++ self.shipBmpx = self.padding + (rect.height - self.shipBmp.GetWidth()) // 2
++ self.shipBmpy = (rect.height - self.shipBmp.GetHeight()) // 2
+
+ self.shipBmpx -= self.animCount
+
+ self.raceBmpx = self.shipEffx + self.shipEffBk.GetWidth() + self.padding
+- self.raceBmpy = (rect.height - self.raceBmp.GetHeight()) / 2
++ self.raceBmpy = (rect.height - self.raceBmp.GetHeight()) // 2
+
+ self.textStartx = self.raceBmpx + self.raceBmp.GetWidth() + self.padding
+
+- self.shipNamey = (rect.height - self.shipBmp.GetHeight()) / 2
++ self.shipNamey = (rect.height - self.shipBmp.GetHeight()) // 2
+
+ shipName, shipTrait, fittings = self.shipFittingInfo
+
+@@ -227,7 +227,7 @@ class ShipItem(SFItem.SFBrowserItem):
+ wlabel, hlabel = mdc.GetTextExtent(self.toolbar.hoverLabel)
+
+ self.thoverx = self.toolbarx - self.padding - wlabel
+- self.thovery = (rect.height - hlabel) / 2
++ self.thovery = (rect.height - hlabel) // 2
+ self.thoverw = wlabel
+
+ def DrawItem(self, mdc):
+@@ -283,7 +283,7 @@ class ShipItem(SFItem.SFBrowserItem):
+ fnEditSize = editCtl.GetSize()
+ wSize = self.GetSize()
+ fnEditPosX = end
+- fnEditPosY = (wSize.height - fnEditSize.height) / 2
++ fnEditPosY = (wSize.height - fnEditSize.height) // 2
+ if fnEditPosX < start:
+ editCtl.SetSize((self.editWidth + fnEditPosX - start, -1))
+ editCtl.SetPosition((start, fnEditPosY))
+diff --git a/gui/chrome_tabs.py b/gui/chrome_tabs.py
+index 89687c33a..1dcdc4820 100644
+--- a/gui/chrome_tabs.py
++++ b/gui/chrome_tabs.py
+@@ -454,7 +454,7 @@ class _TabRenderer:
+ mdc.SelectObject(ebmp)
+ mdc.SetFont(self.font)
+ textSizeX, textSizeY = mdc.GetTextExtent(self.text)
+- totalSize = self.left_width + self.right_width + textSizeX + self.close_btn_width / 2 + 16 + self.padding * 2
++ totalSize = self.left_width + self.right_width + textSizeX + self.close_btn_width // 2 + 16 + self.padding * 2
+ mdc.SelectObject(wx.NullBitmap)
+ return totalSize, self.tab_height
+
+@@ -553,8 +553,8 @@ class _TabRenderer:
+
+ x_offset = self.content_width \
+ + self.left_width \
+- - self.ctab_close_bmp.GetWidth() / 2
+- y_offset = (self.tab_height - self.ctab_close_bmp.GetHeight()) / 2
++ - self.ctab_close_bmp.GetWidth() // 2
++ y_offset = (self.tab_height - self.ctab_close_bmp.GetHeight()) // 2
+ self.close_region.Offset(x_offset, y_offset)
+
+ def InitColors(self):
+@@ -590,8 +590,8 @@ class _TabRenderer:
+ # Draw tab icon
+ mdc.DrawBitmap(
+ bmp,
+- self.left_width + self.padding - bmp.GetWidth() / 2,
+- (height - bmp.GetHeight()) / 2)
++ self.left_width + self.padding - bmp.GetWidth() // 2,
++ (height - bmp.GetHeight()) // 2)
+
+ # draw close button
+ if self.closeable:
+@@ -604,8 +604,8 @@ class _TabRenderer:
+
+ mdc.DrawBitmap(
+ cbmp,
+- self.content_width + self.left_width - cbmp.GetWidth() / 2,
+- (height - cbmp.GetHeight()) / 2)
++ self.content_width + self.left_width - cbmp.GetWidth() // 2,
++ (height - cbmp.GetHeight()) // 2)
+
+ mdc.SelectObject(wx.NullBitmap)
+
+@@ -625,7 +625,7 @@ class _TabRenderer:
+ dc.SetFont(self.font)
+
+ if self.tab_img:
+- text_start = self.left_width + self.padding + self.tab_img.GetWidth() / 2
++ text_start = self.left_width + self.padding + self.tab_img.GetWidth() // 2
+ else:
+ text_start = self.left_width
+
+@@ -640,7 +640,7 @@ class _TabRenderer:
+ # draw text (with no ellipses)
+ text = draw.GetPartialText(dc, self.text, maxsize, "")
+ tx, ty = dc.GetTextExtent(text)
+- dc.DrawText(text, text_start + self.padding, height / 2 - ty / 2)
++ dc.DrawText(text, text_start + self.padding, height // 2 - ty // 2)
+
+ def __repr__(self):
+ return "_TabRenderer(text={}, disabled={}) at {}".format(
+@@ -1198,7 +1198,7 @@ class _TabsContainer(wx.Panel):
+
+ if self.show_add_button:
+ ax, ay = self.add_button.GetPosition()
+- mdc.DrawBitmap(self.add_button.Render(), ax, ay, True)
++ mdc.DrawBitmap(self.add_button.Render(), int(ax), int(ay), True)
+
+ for i in range(len(self.tabs) - 1, -1, -1):
+ tab = self.tabs[i]
+@@ -1359,7 +1359,7 @@ class _TabsContainer(wx.Panel):
+ # Divide tab container by number of tabs and add inclination. This will
+ # return the ideal max size for the containers size
+ if self.GetTabsCount() > 0:
+- dx = self.tab_container_width / self.GetTabsCount() + self.inclination * 2
++ dx = self.tab_container_width // self.GetTabsCount() + self.inclination * 2
+ tabWidth = min(dx, max_width)
+
+ # Apply new size to all tabs
+@@ -1391,7 +1391,7 @@ class _TabsContainer(wx.Panel):
+ selected.SetPosition((selpos, self.container_height - self.height))
+
+ self.add_button.SetPosition((round(tabsWidth) + self.inclination * 2,
+- self.container_height - self.height / 2 - self.add_button.GetHeight() / 3))
++ self.container_height - self.height // 2 - self.add_button.GetHeight() // 3))
+
+ def OnLeaveWindow(self, event):
+ if self.start_drag and not self.dragging:
+diff --git a/gui/pyfa_gauge.py b/gui/pyfa_gauge.py
+index cd83f3eca..e5542f841 100644
+--- a/gui/pyfa_gauge.py
++++ b/gui/pyfa_gauge.py
+@@ -255,7 +255,7 @@ class PyGauge(wx.Window):
+ if value > 100:
+ w = rect.width
+ else:
+- w = rect.width * (float(value) / 100)
++ w = int(rect.width * (float(value) / 100))
+ r = copy.copy(rect)
+ r.width = w
+ dc.DrawRectangle(r)
+@@ -267,7 +267,7 @@ class PyGauge(wx.Window):
+ if value > 100:
+ w = rect.width
+ else:
+- w = rect.width * (float(value) / 100)
++ w = int(rect.width * (float(value) / 100))
+ r = copy.copy(rect)
+ r.width = w
+
+@@ -275,16 +275,16 @@ class PyGauge(wx.Window):
+ # progress between the two transition ranges)
+ pv = value
+ if pv <= 100:
+- xv = pv / 100
++ xv = int(pv / 100)
+ transition = 0
+ elif pv <= 101:
+- xv = pv - 100
++ xv = int(pv - 100)
+ transition = 1
+ elif pv <= 103:
+- xv = (pv - 101) / 2
++ xv = int((pv - 101) / 2)
+ transition = 2
+ elif pv <= 105:
+- xv = (pv - 103) / 2
++ xv = int((pv - 103) / 2)
+ transition = 3
+ else:
+ pv = 106
+diff --git a/gui/utils/anim.py b/gui/utils/anim.py
+index 55d27c9ef..b9f63d642 100644
+--- a/gui/utils/anim.py
++++ b/gui/utils/anim.py
+@@ -62,7 +62,7 @@ class LoadAnimation(wx.Window):
+ barColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
+ shadeColor = colorUtils.GetSuitable(barColor, 0.75)
+
+- barWidth = rect.width / self.bars
++ barWidth = rect.width // self.bars
+ barHeight = rect.height - self.padding * 2
+
+ x = self.padding
+diff --git a/gui/utils/color.py b/gui/utils/color.py
+index f89b56d7a..7587cb01d 100644
+--- a/gui/utils/color.py
++++ b/gui/utils/color.py
+@@ -12,7 +12,7 @@ def Brighten(color, factor):
+ b += (255 - b) * factor
+ g += (255 - g) * factor
+
+- return wx.Colour(r, g, b, a)
++ return wx.Colour(int(r), int(g), int(b), a)
+
+
+ def Darken(color, factor):
+@@ -26,9 +26,9 @@ def Darken(color, factor):
+ g *= factor
+ b *= factor
+
+- r = min(max(r, 0), 255)
+- b = min(max(b, 0), 255)
+- g = min(max(g, 0), 255)
++ r = int(min(max(r, 0), 255))
++ b = int(min(max(b, 0), 255))
++ g = int(min(max(g, 0), 255))
+
+ return wx.Colour(r, g, b, a)
+
+@@ -70,4 +70,4 @@ def CalculateTransition(s_color, e_color, delta):
+ tG = sG + (eG - sG) * delta
+ tB = sB + (eB - sB) * delta
+
+- return wx.Colour(tR, tG, tB, (sA + eA) / 2)
++ return wx.Colour(tR, tG, tB, (sA + eA) // 2)
+diff --git a/gui/utils/draw.py b/gui/utils/draw.py
+index 4e486afda..95e975f32 100644
+--- a/gui/utils/draw.py
++++ b/gui/utils/draw.py
+@@ -13,7 +13,7 @@ def RenderGradientBar(windowColor, width, height, sFactor, eFactor, mFactor=None
+ if mFactor:
+ gMid = color.GetSuitable(windowColor, mFactor)
+ else:
+- gMid = color.GetSuitable(windowColor, sFactor + (eFactor - sFactor) / 2)
++ gMid = color.GetSuitable(windowColor, sFactor + (eFactor - sFactor) // 2)
+
+ gEnd = color.GetSuitable(windowColor, eFactor)
+
+@@ -43,14 +43,14 @@ def DrawGradientBar(width, height, gStart, gEnd, gMid=None, fillRatio=4):
+ mdc.SelectObject(canvas)
+
+ r = wx.Rect(0, 0, width, height)
+- r.SetHeight(height / fillRatio)
++ r.SetHeight(height // fillRatio)
+
+ if gMid is None:
+ gMid = gStart
+
+ mdc.GradientFillLinear(r, gStart, gMid, wx.SOUTH)
+ r.SetTop(r.GetHeight())
+- r.SetHeight(height * (fillRatio - 1) / fillRatio + (1 if height % fillRatio != 0 else 0))
++ r.SetHeight(height * (fillRatio - 1) // fillRatio + (1 if height % fillRatio != 0 else 0))
+
+ mdc.GradientFillLinear(r, gMid, gEnd, wx.SOUTH)
+
+--
+2.34.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 3b8a54600888..6cca8bfea086 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,12 @@
# Maintainer: Tomas S. <me+aur at wereii.cz>
+# Controbutor: Martin Petrus <martin.petrus@example.com>
# Contributor: Simon Perry <aur [at] sanxion [dot] net>
# Contributor: Kochetkov Andrey <gornet@gmail.com>
# Contributor: Fabian Schoelzel <myfirstname.mylastname@googlemail.com>
pkgname=pyfa
pkgver=2.39.2
-pkgrel=1
+pkgrel=2
_distname="Pyfa-${pkgver}"
pkgdesc="EVE Online Fitting Assistant"
arch=('any')
@@ -15,13 +16,20 @@ makedepends=('python-pip')
depends=('python' 'python-wxpython' 'python-logbook' 'python-matplotlib' 'python-dateutil' 'python-setuptools' 'python-requests' 'python-sqlalchemy' 'python-cryptography' 'python-markdown2' 'python-packaging' 'python-beautifulsoup4' 'python-yaml' 'python-roman' 'python-numpy' 'python-jose' 'python-requests-cache' 'webkit2gtk')
optdepends=()
options=(!strip)
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/pyfa-org/Pyfa/archive/v$pkgver.tar.gz pyfa.desktop pyfa-start.sh)
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/pyfa-org/Pyfa/archive/v$pkgver.tar.gz
+ pyfa.desktop
+ pyfa-start.sh
+ 0001-python-3.10-compatibility.patch
+ )
sha256sums=('2a16ca0f1c2c34aebe9698aa84cae3695eea509eaa7496011d1bab0f8ac78a1f'
- SKIP SKIP)
+ SKIP SKIP SKIP)
build() {
cd "${srcdir}"/"${_distname}"
+ # "Temporary" fix for python310 and wxPython>4.0.6
+ echo "Applying 0001-python-3.10-compatibility.patch"
+ patch --binary -l -p1 < ../0001-python-3.10-compatibility.patch
python db_update.py
}