Skip to content

Use absolute path for {project} placeholder in config-settings - #2934

Merged
agriyakhetarpal merged 1 commit into
pypa:mainfrom
agriyakhetarpal:use-absolute-path-config-settings-placeholders
Jun 30, 2026
Merged

agriyakhetarpal merged 1 commit into
pypa:mainfrom
agriyakhetarpal:use-absolute-path-config-settings-placeholders

Conversation

@agriyakhetarpal

Copy link
Copy Markdown
Member

While the project="." pattern is consistent across all platforms and all our build stages, it's specifically incorrect for config-settings, because that value is passed to python -m build and consumed by the build backend, which may run from a different CWD. It's better to pass the absolute path to the project root in prepare_config_settings in this case. This only failed on Windows and macOS, as {project} on Linux was always absolute (we set it as /project via the container there).

I think we should add a test or something for this, but I'm not sure what would be best. Should I add a project that cross-compiles a wheel using a Meson cross file (like I use this functionality)? Or perhaps test/test_projects/meson.py can stay as is, but I add a --native-file since it's resolved the same way a cross file is?

xref #2827

agriyakhetarpal added a commit to agriyakhetarpal/hugo-python-distributions that referenced this pull request Jun 28, 2026

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

From an iOS perspective, I don't see any problem with this; explicit full paths are generally safer, as long as we're not dealing with something that will be running on the simulator (which will only be for testing paths).

@mhsmith mhsmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Android changes look good to me.

@agriyakhetarpal
agriyakhetarpal merged commit cecc541 into pypa:main Jun 30, 2026
45 checks passed
@agriyakhetarpal
agriyakhetarpal deleted the use-absolute-path-config-settings-placeholders branch June 30, 2026 12:39
agriyakhetarpal added a commit to agriyakhetarpal/hugo-python-distributions that referenced this pull request Jul 25, 2026
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