Kara-Moon Forum
April 19, 2024, 05:36:36 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: MMA 20.02a online  (Read 2999 times)
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« on: April 06, 2020, 06:47:16 PM »

I just posted 20.02a to the website:

   https://mellowood.ca/mma/downloads.html#developer

Some nice little fixes including a bug in plugins with python3, a plectrum track fix that I call "let those strings ring" and a fix to the midi generation to get the key right. And, the continuing saga of minor fixes, doc clean ups, etc.
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #1 on: April 07, 2020, 09:00:00 AM »

I needed quite some fixing to get this built for Fedora.

Reason is that Fedora no longer allows #!/usr/bin/python and #!/usr/bin/env python but requires explicit reference to python3 (or 2).

The following sources needed fixing:

Code:
egs/mkall
lib/alexis/rd.py
mma-gb
mma-libdoc
mma-renum
mma.py
util/mma-gb.py
util/mma-mnx.py
util/mma-rm2std.py
util/mma-splitrec.py
util/mmatabs.py
util/mup2mma.py
util/pg2mma.py
util/synthsplit.py

Patch attached in case you'd be interested.

Question: Some sources are duplicates, e.g. mma-gb and util/mma-gb.py. Do all need to be in the kit?
There's an old IT saying: "If there are two copies of the same data, at least one of them is wrong.".

Anyway, the RPMs are in the usual place: https://www.squirrel.nl/pub/MMA .

RANT: Stupid forum!!!! It lets me pick a .patch file for attaching, and then barfs when I hit post. After fixing it doesn't let me post since it says it has already been posted (which is not the case). Had to type it all over again Sad .

* mma-bin-20.02-pythonpath.patch.txt (4.72 KB - downloaded 181 times.)
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #2 on: April 07, 2020, 04:29:42 PM »

Guess the good old days of python2 are coming sooner than expected/wanted:) Anway, that is interesting ... I thought that using /usr/bin/python would pretty much work forever since it's just a symlink to python2 or python3.

On the other hand, there are some utils that will not work with 3, so we should be explicit.

So, we'll need to make the change. BTW, I think all of these utilities are using /usr/bin/env python ... doesn't that bypass the problem? Guess not. I'll apply the patch later and check into the duplicates as well.

Thanks.
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #3 on: April 07, 2020, 05:01:05 PM »

Fedora's reasoning is that some programs require python2, others require python3, and some work with both. Since the choice whether python is version 2 or 3 is beyond control of the user, programs are required to be specific. So either /usr/bin/python2 or /usr/bin/python3, anything else is considered ambiguous.

The patch goes for python3. But you say some tools do not work yet with python3?
Logged
sciurius
Sr. Member
****
Posts: 443



« Reply #4 on: April 07, 2020, 06:52:20 PM »

Also, I think quite a few of these files are not really user tools that need to be installed.

Obvious: mma.
Desired: mma-gb.
Optional: mma-renum

Not for user: mma-rm2std, mma-mnx, mma-libdoc
Also not: all util tools?

As you already mentioned, several of these tools do not (yet) run with python3.
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #5 on: April 08, 2020, 12:44:32 AM »

I think that as part of the py3 migration I'll do all of the utils. The silly ones which are going to be hard to convert I'll just put in a utils/legacy directory.

As to mma itself? Really not sure, but perhaps we should just bite the bullet, change the top line to python3 and put in a note in the distro that if you want to use py2 it'll work for now if you change that line???
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #6 on: April 08, 2020, 08:09:30 AM »

Sounds okay. I've been running mma now for a while with python3 without hassles.

But part of the point that I wanted to raise is the question what tools need to be installed, i.e. what tools are really user tools?
I think that mma-libdoc, mma-mnx, and mma-rm2std do not have to be installed in /usr/bin, but can safely stay (or be moved to) the utils directory.

So the user can run mma, mma-gb and mma-renum directly (as executables from /usr/bin). The utils, if needed, can be run with e.g.

python /usr/share/mma/util/mma-mnx.py

Since they are executed with an explicit python command, the source file doesn't need to have a #! line, thus solving a lot of potential issues.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.039 seconds with 19 queries.