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

fix: macOS tests & use LIBS instead of LDFLAGS #1

Open
wants to merge 2 commits into
base: portable_python
Choose a base branch
from

Conversation

mayeut
Copy link

@mayeut mayeut commented Nov 10, 2024

LDFLAGS applies to everything including later user builds (e.g. building a wheel)
LDFLAGS_NODIST could be used but is probably unnecessary (also applies to cpython stdlib C modules which is probably unwanted)
LIBS only applies to the python executable and libpython library, this is most likely enough. https://docs.python.org/3/using/configure.html#envvar-LIBS
@@ -31,7 +31,7 @@ class UbuntuPythonBuilder : NixPythonBuilder {
$pythonBinariesLocation = $this.GetFullPythonToolcacheLocation()

### To build Python with SO, passing relative path W.r.t to the binary location.
$env:LDFLAGS="-Wl,-rpath='`$`$ORIGIN/../lib'"
$env:LIBS = "-Wl,--enable-new-dtags,-rpath='`$`$ORIGIN/../lib'"
Copy link
Owner

Choose a reason for hiding this comment

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

What's the benefit of LIBS over LDFLAGS?

Copy link
Author

Choose a reason for hiding this comment

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

that's in the commit message:

LDFLAGS applies to everything including later user builds (e.g. building a wheel)
LDFLAGS_NODIST could be used but is probably unnecessary (also applies to cpython stdlib C modules which is probably unwanted)
LIBS only applies to the python executable and libpython library, this is most likely enough. https://docs.python.org/3/using/configure.html#envvar-LIBS

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.

2 participants