Skip to content

Conversation

@fedelibre
Copy link
Member

Fix #1900

@fedelibre fedelibre requested a review from jeanas May 5, 2025 08:20
@fedelibre
Copy link
Member Author

IMO we should add also pygame (for MIDI playback) to the list of dependencies in pyproject.toml.

I've already added PyQtWebEngine (for the LilyPond docs browser) in this PR (the issue discussed in #1900 was probably related to a wrong configuration system-wide and installing this package via pipx seems to be the easiest solution).

For sure MIDI playback is not an optional feature of Frescobaldi but an essential feature that most people use, so in the optional features of the INSTALL.md file I would leave only pycups.

@bmjcode
Copy link
Collaborator

bmjcode commented May 5, 2025

IMO we should add also pygame (for MIDI playback) to the list of dependencies in pyproject.toml. [...] For sure MIDI playback is not an optional feature of Frescobaldi but an essential feature that most people use

Agreed.

so in the optional features of the INSTALL.md file I would leave only pycups.

I don't think there's anything left that even uses that.

@fedelibre
Copy link
Member Author

so in the optional features of the INSTALL.md file I would leave only pycups.

I don't think there's anything left that even uses that.

It seems that qpageview still has something that uses it:

fede@fedora:~/src/frescobaldi/qpageview$ git grep -n 'import cups'
qpageview/cupsprinter.py:206:            import cups
qpageview/cupsprinter.py:222:        import cups

I'll remove only the part about PortMidi/pygame.

MIDI playback is not an optional feature.
@fedelibre
Copy link
Member Author

@jeanas I would like your review before merging this. Please let me know if you can find the time. No hurry of course, I just want to know if waiting for you makes sense.

@fedelibre fedelibre merged commit f34dcff into master May 25, 2025
@fedelibre fedelibre deleted the install branch May 25, 2025 19:25
@fedelibre
Copy link
Member Author

IMO we should add also pygame (for MIDI playback) to the list of dependencies in pyproject.toml.

Well, an annoying drawback is that on Linux now you cannot use PortMidi for MIDI playback. You are forced to use pygame (now pygame-ce) or the installation will fail. For example, the Fedora package relies on PortMidi.

I'm not sure it's a good idea. pygame-ce is installed in the Windows and macOS packages using the briefcase section of pyproject.toml (tool.briefcase.requires), which should be kept.
pygame-ce in project.dependencies may be useful only for installations from source code, but in this case we may ask to install it. I'm tempted to remove it, but I would be glad to hear other opinions. I don't want to do another mistake...

I've been hit by this during this flatpak update.
What Linux distro packager think of this issue? Should we remove pygame-ce from the required python deps? @alerque @limburgher

Thanks

@limburgher
Copy link

I patched Frescobaldi to use pygame instead of pygame-ce for Fedora since Fedora doesn't have pygame-ce. If pygame isn't actually needed on all platforms, the dependencies should certainly reflect that.

@fedelibre
Copy link
Member Author

fedelibre commented Jun 13, 2025

pygame is not a "strong" dependency, as PortMidi is an alternative dependency to enable MIDI playback. pygame is just more convenient (as a one solution for multiple platforms) because it can be installed via pip.
pygame-ce is actually needed only for macOS, because pygame works fine on Linux and Windows only.

I think we'd better remove pygame as dependency, in order to let the user/packager choose if they prefer using PortMidi instead. I'll prepare a PR in the weekend.

fedelibre added a commit that referenced this pull request Jun 17, 2025
Let the user/packager decide the tool for MIDI playback.

On Linux the preferred choice is probably PortMidi installed
as a system package.
An alternative is pygame from PyPI, but it currently
works fine on Linux and Windows only, while macOS needs
pygame-ce (community fork).

Discussed here:
#1939 (comment)
fedelibre added a commit that referenced this pull request Jun 20, 2025
Let the user/packager decide the tool for MIDI playback.

On Linux the preferred choice is probably PortMidi installed
as a system package.
An alternative is pygame from PyPI, but it currently
works fine on Linux and Windows only, while macOS needs
pygame-ce (community fork).

Discussed here:
#1939 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update INSTALL instructions for version 4

5 participants