Skip to content

Conversation

@horakivo
Copy link
Member

@horakivo horakivo commented Sep 2, 2025

No description provided.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 2, 2025
@horakivo horakivo marked this pull request as draft September 2, 2025 15:32
@horakivo horakivo marked this pull request as ready for review September 9, 2025 14:11
@horakivo horakivo changed the title WIP: Add support for macos launcher Add support for macos launcher Sep 9, 2025
String extraJavaOptions = String.join(" ", GraalPyRunner.getExtraJavaOptions());
if (!IS_WINDOWS) {
if (IS_MAC) {
var script = formatMultiline("""
Copy link
Member

Choose a reason for hiding this comment

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

Could you share this code with the Windows branch? Seems like only this line in the script would need parametrization:

vl = os.path.join(venv.__path__[0], 'scripts', 'macos', 'graalpy')

otherwise it is the same?

On Windows we try to avoid regenerating the launcher to speed up the build:

(!Files.exists(launcherArgs.launcherPath)
				|| !checkWinLauncherJavaPath(launcherArgs.launcherPath.getParent().resolve("pyenv.cfg"), java)) {

do you see any issue with doing that on MacOS? checkWinLauncherJavaPath should be renamed, but what it does inside should apply just fine to the MacOS launcher AFAICS.

Up to your consideration: since we now have more conditions, I would find this if-else structure more readable:

if (IS_WINDOWS || IS_MAC_OS) {
    if (...condition if we need to regenerate the launcher...) {
        ...
    }    
} else {
    // we do not bother checking if it exists and has correct java home, since it is
    // simple to regenerate the launcher
    ...
}

@steve-s
Copy link
Member

steve-s commented Sep 10, 2025

Please disregard GitHub actions for now, I am working on fixing them

} catch (IOException e) {
throw new IOException("failed to create tmp launcher", e);
}
System.out.println("Created temporary launcher file: " + tmp);
Copy link
Member

Choose a reason for hiding this comment

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

Left-out prinlnt?

@steve-s
Copy link
Member

steve-s commented Nov 19, 2025

Integration continues in #31

@steve-s steve-s closed this Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants