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

[FR] Allow environment variable override of EXT_SUFFIX #2722

Closed
1 task done
zooba opened this issue Jul 9, 2021 · 0 comments · Fixed by #2723
Closed
1 task done

[FR] Allow environment variable override of EXT_SUFFIX #2722

zooba opened this issue Jul 9, 2021 · 0 comments · Fixed by #2723
Labels
enhancement Needs Triage Issues that need to be evaluated for severity and status.

Comments

@zooba
Copy link
Contributor

zooba commented Jul 9, 2021

What's the problem this feature will solve?

I'm trying to cross-compile other people's packages, but the value of EXT_SUFFIX is always taken from the host Python.

Describe the solution you'd like

When I set SETUPTOOLS_EXT_SUFFIX environment variable, the value is used instead of sysconfig.get_config_var("EXT_SUFFIX"). This would allow me to set the suffix precisely for all packages in a build.

As I've already set environment variables to control the builds, another environment variable is the best solution for matching these. (Command-line and per-environment settings may be lost during the build process.)

Alternative Solutions

I have previously tried building with other tools (and even written an entire backend that can handle this), but doing it for arbitrary projects means porting them to build backends other than setuptools.

It would be possible to extract the wheels and rename individual files, however, this leaves traces and interferes with reproducibility.

Rather than a completely open-ended environment variable, setuptools could try and automatically determine what the suffix should be. (But the point of overriding the automatic detection is to avoid this kind of logic and let things be set in the environment, so I'd probably still want the option of a complete override.)

Additional context

No response

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@zooba zooba added enhancement Needs Triage Issues that need to be evaluated for severity and status. labels Jul 9, 2021
zooba added a commit to zooba/setuptools that referenced this issue Jul 9, 2021
…o override the suffix inferred from the host Python runtime.
zooba added a commit to zooba/setuptools that referenced this issue Jul 9, 2021
…o override the suffix inferred from the host Python runtime.
zooba added a commit to zooba/setuptools that referenced this issue Jul 9, 2021
…o override the suffix inferred from the host Python runtime.
jaraco added a commit that referenced this issue Jul 19, 2021
Fixes #2722 Adds an environment variable SETUPTOOLS_EXT_SUFFIX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant