Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a briefcase template to pygame-ce #2862

Merged
merged 5 commits into from
May 26, 2024

Conversation

Starbuck5
Copy link
Member

@Starbuck5 Starbuck5 commented May 20, 2024

This is similar to the PyInstaller hook we have, but for Briefcase, another distribution solution. (https://beeware.org/project/projects/tools/briefcase/)

The template and strategy are largely copied from the existing entrypoints in the briefcase library.

Worked on this during the Beeware sprint at Pycon US 2024.

I think this supersedes beeware/briefcase#1804

To test, install briefcase with pip, install pygame-ce from this branch, and run briefcase new. After going through the briefcase options, it will have a "GUI Framework" option that will now report pygame-ce as an option. This works as a template for pygame-ce in briefcase, but is not necessary for supporting distributing pygame-ce apps in briefcase.

After this PR (in briefcase new):

-- GUI Framework -------------------------------------------------------------

What GUI toolkit do you want to use for this project?

  1) Toga
  2) PySide6       (does not support iOS/Android deployment)
  3) PursuedPyBear (does not support iOS/Android deployment)
  4) Pygame        (does not support iOS/Android deployment)
  5) pygame_ce     (does not support iOS/Android deployment)
  6) None

@Starbuck5 Starbuck5 requested a review from a team as a code owner May 20, 2024 14:42
@Starbuck5 Starbuck5 changed the title Add a briefcase backend for pygame-ce Add a briefcase template to pygame-ce May 20, 2024
Copy link
Member

@oddbookworm oddbookworm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I just have one small thing that might be fine to remove

src_py/__briefcase/pygame_ce.py Outdated Show resolved Hide resolved
@Starbuck5 Starbuck5 added the build Compiling stuff label May 21, 2024
Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, LGTM 👍

Tested it on my machine and got a hello world briefcase test program running.

Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just went through the process of created a .deb package, and it went really smooth! I'm really starting to like this tool.

@robertpfeiffer
Copy link
Contributor

Does the .deb depend on pygame-ce, or does it bundle its own SDL, pygame, and so on?

@ankith26
Copy link
Member

It bundles the stuff in the pygame-ce manylinux wheel (so in a sense it is a self contained deb-file that doesn't use system dependencies, which is not very deb-file like)

If a pygame-ce debian package existed, we could make it depend on that, and that would remove the need for copying/duplication of pygame-ce

Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has my approval. Even though I left a question, I feel it's better to merge this in for 2.5.0 anyways, as we can polish this up in future releases.

@oddbookworm
Copy link
Member

Does the .deb depend on pygame-ce, or does it bundle its own SDL, pygame, and so on?

I think it is completely self-contained, I might do some testing later with a couple of ubuntu VM's that don't already have things installed

Co-authored-by: Dan Lawrence <danintheshed@gmail.com>
@Starbuck5 Starbuck5 merged commit b126e50 into pygame-community:main May 26, 2024
38 checks passed
@ankith26 ankith26 added this to the 2.5.0 milestone May 27, 2024
@Starbuck5 Starbuck5 deleted the briefcase branch May 28, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Compiling stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants