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

Replace PyInstaller with nuitka #80

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open

Conversation

jaimergp
Copy link
Collaborator

@jaimergp jaimergp commented Jun 21, 2024

Description

An alternative implementation of what PyInstaller does, but with better control over the temporary extraction point and maybe better performance.

Like PyInstaller, single-binaries produced with Nuitka need to self-extract first. Default mode is to a timestamped, temporary location for every execution. This adds a large overhead to each command run. However, this location is configurable and can be set to a fixed location that gets cached. This is what we are doing with --onefile-tempdir-spec={CACHE_DIR}/{COMPANY}/{PRODUCT}/{VERSION}. Only the first execution has an extraction overhead; following ones are instantaneous. This is a bit closer to what PyOxidizer promised :) Also a bit of the pyapp concepts.

Nuitka is also easier to configure when it comes to traversing the imports. The entry point script serves both as the main code and the configuration file, btw.

Since Nuitka compiles the Python code, we don't have sources available, which makes conda python -m ... syntax impossible to implement (runpy, which is what we used for this interface, wants source, not code objects).

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jun 21, 2024
@jaimergp jaimergp marked this pull request as ready for review July 8, 2024 14:20
@jaimergp jaimergp requested a review from a team as a code owner July 8, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants