Skip to content

[FR] Allow environment variable override of EXT_SUFFIX #2722

Closed
@zooba

Description

@zooba

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions