wacom-gui icon indicating copy to clipboard operation
wacom-gui copied to clipboard

Py3 qt5 el8

Open helge000 opened this issue 2 years ago • 6 comments

This is based on #40 and fixes all issues with it to run on EL8; python 3.6. With python3.7 there may be changes needed to all Popen() - calls (text=True).

Fixes:

  • #61
  • #57
  • #34

I build an RPM; released in my fork.

Warning, the RPM above is still based on 0.3.0-rc13 form last year. The current branch is rebased; haven't tested it tough.

helge000 avatar Apr 22 '22 16:04 helge000

Rebased to current HEAD.

helge000 avatar Apr 22 '22 17:04 helge000

Trying this PR on ubuntu 22 [WM: gnome] - i got the following message:

Unknown Device: "Device information for Wacom Intuos Pro 2 M" not found.

Any clue what I am missing> the device is detected by gnome.

epifanio avatar Apr 27 '22 06:04 epifanio

Apologies for the lack of my response on this, work has been rather hectic and I haven't had the time to fully test out a release. My goal is to target support based on the VFX Reference platform (https://vfxplatform.com/), although it does put it at odds with OS-stable releases (ie. EL8 being based on Py3.6). As well, given EL8 is now effectively EoL with EL9's release imminent it may be easier to just target Py3.9 and see how backwards compatible it is. I have a conversion I started testing but I've been hitting edge cases that I don't quite feel comfortable releasing as of yet. Your build appears to be hitting similar issues to what I have unfortunately and I'd like to try and avoid putting in hacky per-python release coding, if possible. The alternative is to have the release be compiled based on the install to "hide" the python release aspects but then it would cause the install to break if the user upgrades their python release at a later date.

tb2097 avatar May 09 '22 19:05 tb2097

@tb2097 - no worries! Please allow me a few remarks:

  • We should not confuse vfxplatform with EL-python. Apps targeting a platform usually ship their bundled python.
  • If we release RPMs we should target 3.6 with an EL8 release and 3.9 with EL9
  • The way forward might be an appimage/flatpack?

El8 is not effectively EOL, far from it. I expect EL9 in production for VFX-Shops in maybe five years give or take as most of them now only transitioning from EL7; may I present your own wacom-gui as evidence.

Currently I see only issues with popen(); here it is feasible to change kwargs depending on the python version...

helge000 avatar May 10 '22 08:05 helge000

Just so you know, your PR removes the Wacom One by Wacom S translation (which I need as the local libwacom database here uses the expected One by Wacom (small) name)

20kdc@Magnus:/media/modus/External2/wacom-gui/wacom-gui$ libwacom-list-local-devices --format datafile
# One by Wacom (small)
#  - /dev/input/event11
[Device]
Name=One by Wacom (small)
ModelName=CTL-472
DeviceMatch=usb:056a:037a;
Class=Bamboo
Width=6
Height=4
IntegratedIn=
Styli=0xffffe;0xfffff;

[Features]
Reversible=true
Stylus=true
Ring=false
Ring2=false
Touch=false
TouchSwitch=false
# StatusLEDs=
NumStrips=0
Buttons=0

There is also the matter of needing --format datafile because libwacom-list-local-devices will now output in YAML by default for... some reason.

I have a patched version of wacom-gui but I ended up doing the patching before checking the PRs.

As it is, the following is my rather informally-sent patch:

20kdc@Magnus:/media/modus/External2/wacom-gui/wacom-gui$ git diff
diff --git a/wacom-gui/wacom_data.py b/wacom-gui/wacom_data.py
index fc3f13f..566dfe3 100644
--- a/wacom-gui/wacom_data.py
+++ b/wacom-gui/wacom_data.py
@@ -82,6 +82,9 @@ class Tablets:
                 if dev_type.startswith('Wacom Intuos Pro') :
                     if dev_type not in self.device_data.keys():
                         dev_type = dev_type.replace("Pro", "Pro 2")
+                # One Wacom hack
+                if dev_type == 'Wacom One by Wacom S':
+                    dev_type = 'One by Wacom (small)'
                 devID = self.device_data[dev_type]['devID']
                 if self.device_data[dev_type]['devID'] not in self.tablets.keys():
                     self.tablets[devID] = []
@@ -113,7 +116,7 @@ class Tablets:
 
 
     def __get_libwacom_data(self):
-        p = subprocess.Popen("libwacom-list-local-devices --database %s" % self.db_path, shell=True,
+        p = subprocess.Popen("libwacom-list-local-devices --format datafile --database %s" % self.db_path, shell=True,
                              stdout=subprocess.PIPE)
         output = p.communicate()[0].decode('utf-8').split('\n')
         cur_device = None

20kdc avatar Oct 31 '22 21:10 20kdc

Had the same issue with a Bamboo one. Fixed by adding this to wacom_data.py (and added the --format datafile in line 113)

# bamboo One hack
if dev_type == 'Wacom Bamboo1':
    dev_type = 'Bamboo One'

ehanuise avatar Nov 03 '22 18:11 ehanuise