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

Patch all Python calls in ninja build to use system /usr/bin/python[3] #995

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dhomeier
Copy link
Contributor

Follow-up to #936, addressing #932 (comment).
I have not found any evidence that the compiled-in browse.py script is used anywhere, but as this does change the binary for 12.0, 13.0 now, may need a new revision.

@dhomeier dhomeier requested a review from dmacks February 14, 2023 21:21
@nieder
Copy link
Member

nieder commented Oct 10, 2023

Originally posted by @nieder in #932 (comment)

Like @dmacks said, the python declared at buildtime gets hardcoded into the binary.
I've tried somethings out on their build system and tested variations: This is sufficient to build with whatever python we want and have that encoded in the binary, with no patching needed. The first python3.9 is to run the configure.py script, the second python3.9 is what ninja will use during its runtime. Tested on 10.14 and 13.5 using system-python and python39.

CompileScript: %p/bin/python3.9 ./configure.py --bootstrap --verbose --with-python=%p/bin/python3.9

In this case, i have %p/bin/python3.9, but that can be set to whatever python we decide on. If we pick /usr/bin/python[23], we'll need a separate .info file for macOS 12 and up because ninja built using system-python2 will fail on an upgrade to macOS 12+.
So what wins: ease of maintenance with a single .info and a hardcoded fink-python (that can be upgraded as needed)? Or remove a heavy dep but need to keep various .info files in sync?

/usr/bin/python2 got removed with macOS12.3. macOS 10.15 CLT included /usr/bin/python3.

@dmacks
Copy link
Member

dmacks commented Oct 10, 2023

Originally posted by @nieder in #932 (comment)

hardcoded fink-python...a heavy dep

Just a thinking-ahead...#1002 substantially slims down some upcoming new fink-python.

@dhomeier
Copy link
Contributor Author

In this case, i have %p/bin/python3.9, but that can be set to whatever python we decide on.

310 has entered the security bugfix phase as of 3.10.12, so that 3.11 or 3.12 would certainly be preferable – especially if those can be built as a stripped-down base package without tk – any news on that endeavour?

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.

4 participants