ps2dev / mymc

A public domain utility for working with PlayStation 2 memory card images. By Ross Ridge.
http://www.csclub.uwaterloo.ca:11068/mymc/
87 stars 26 forks source link

Migrate project to Python3 #8

Open ImanolBarba opened 1 year ago

ImanolBarba commented 1 year ago

In most modern operating systems nowadays python2 is deprecated and not even shipped anymore (most linux distros, macOS too). This means no one can run this code unless they somehow get an unsupported copy of python2 and deal with the mess of adding the necessary dependencies.

This PR migrates the whole project to Python3, and now anyone can run it with contemporary python versions.

I've tested every single command on CLI and GUI.

I'm aware there's a mymcplus project that did this migrating and added a couple features and tests, but that has a GPL3 license and this is Public Domain. I'd like the Public Domain version to at least work so it can still be used.

I've done my best to split the changes in groups so it's easier to review, but it's still a large PR, sorry about that.

ImanolBarba commented 1 year ago

I added a couple more commits to make the code quality analysis pass

ImanolBarba commented 1 year ago

Messed up the push, need to redo it

ImanolBarba commented 1 year ago

Finally rebased properly, sorry for the churn

ImanolBarba commented 1 year ago

nvm, autoformatter butchered something, I'll send the changes later after making sure it works

motorto commented 1 year ago

whats the status of this: tried it in linux but still getting a bunch of errors.


./mymc.py: line 27: from: command not found
~``
ImanolBarba commented 1 year ago

whats the status of this: tried it in linux but still getting a bunch of errors.

./mymc.py: line 27: from: command not found
~``

The original script did not have the usual shebang sequence to specify the interpreter, so your machine is just trying to use the current shell (likely bash or similar).

Same as the original, you need to run it like:

python3 mymc.py

The alternative is to add:

#!/usr/bin/env python3

At the beginning of the script. I'm happy adding the header though if you'd like

motorto commented 1 year ago

In case you are not aware: https://git.sr.ht/~thestr4ng3r/mymcplus

ImanolBarba commented 1 year ago

In case you are not aware: https://git.sr.ht/~thestr4ng3r/mymcplus

Yeah I did mention mymcplus in the commit (I think) .

I just want the public domain licensed version to work as well