Package: wminput
Version: 0.6.91-2+b1
Severity: important
X-Debbugs-Cc: f...@debian.org

Hello Georges,

First of all, thank you so much for adopting cwiid and trying to port it
to Python 3.

I was trying get my Wiimote to work with RetroArch / RetroPie, and was
following guides such as https://retropie.org.uk/docs/Wiimote-Controller/
to get it working, but when it comes time to run wminput, I was greeted
with the following error:

    $ wminput
    ImportError: 
/usr/lib/python3/dist-packages/cwiid.cpython-39-x86_64-linux-gnu.so:
    undefined symbol: PyVarObject_CallFunction

After some investigation, I suspect PyObject_CallFunction is not
supposed to be renamed to PyVarObject_CallFunction even for porting
from Python 2 to Python 3.

Looking further, it seems that the port to Python 3 has already been
done by Thomas Vitureau (a.k.a. azzra):

 Port of python-cwiid compatible with Python3
  * https://pypi.org/project/cwiid/
  * https://github.com/azzra/python3-wiimote

Azzra based his work on Cwiid author Donnie Smith's own repository
on GitHub at https://github.com/abstrakraft/cwiid , though probably for
simplicity sake or for building a pure Python 3 module, Azzra decided to
"Delete lswm, wmdemo, wminput, wmgui" from his python3-wiimote fork.

Incidentally, there is a fork of Cwiid by Ivica Ico Bukvic and friends
from Virgina Tech's L2Ork (Linux Laptop Orchestra):

  * https://github.com/pd-l2ork/cwiid

though unfortunately it was forked before Donnie Smith converted his
repo from svn to git, and there is essentially no commit history found
in pd-l2ork/cwiid, and despite some contributed Python 3 related pull
request, it fails to build successfully with Python 3 out of the box.


So, what is the way forward?

As a working Python 3 port already exists, I propose updating the Debian
cwiid package with these existing works, though I admit that it would
require some work to cherry-pick from azzra's python3-wiimote repo and
to get wminput working with the Python-related code changes.

Here are my recommendation:

 1. Start by upgrading Debian's cwiid with Donnie Smith's latest code.
    I suggest modifying debian/watch to track his repo like so:

        version=4
        opts="mode=git, pgpmode=none, pretty=0.6.91+git%cd.%h" \
            https://github.com/abstrakraft/cwiid.git \
            HEAD debian

    and run e.g. "gbp import-orig --sign-tags --uscan" to upgrade to
    this latest upstream snapshot from 2010.

 2. Then, choose one of the following:

     a) Cherry-pick and modify the new commits from
        https://github.com/azzra/python3-wiimote/commits/master
        and place them in debian/patches/, or

     b) Fork https://github.com/abstrakraft/cwiid as
        https://github.com/Debian/cwiid (for example)
        to merge azzra/python3-wiimote while keeping lswm, wminput, etc.

     c) Build Debian's cwiid (from abstrakraft/cwiid) without Python 3
        support, and package azzra/python3-wiimote as a separate source
        package producing the python3-cwiid binary package.

What do you think?  :-)

If you like, I would be very happy to collaborate too if time allows.

Cheers,

Anthony

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.9.0-3-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages wminput depends on:
ii  libbluetooth3  5.55-1
ii  libc6          2.31-4
ii  libcwiid1      0.6.91-2+b1
ii  libpython3.9   3.9.0-5
ii  python3-cwiid  0.6.91-2+b1

wminput recommends no packages.

wminput suggests no packages.

-- Configuration Files:
/etc/cwiid/wminput/gamepad changed [not included]

-- no debconf information

Reply via email to