pypa / pypa/distutils

Should distutils rely on sysconfig for LDSHARED etc?

Open
#40 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deferred enhancement
Dominant language
Python
Stars
59
Forks
94
PR merge metrics
No merged PRs in 30d

Description

#36 raises a design question: should distutils-as-an-independent-module be relying on the Python interpreter's sysconfigdata variables to know how to compile and link extensions? In the specific case of #36, there's no real reason why distutils couldn't decide at runtime, based on MACOSX_DEPLOYMENT_TARGET, whether to use -undefined dynamic_lookup or link against the framework explicitly, rather than erroring when the sysconfig and runtime targets differ.

Bringing in an equivalent of the checks cpython does at configure time to figure out the right values for all the relevant variables on each platform is of course going to be a much more daunting task. But it might ultimately be a better approach? I don't know what the right answer is here, but I think it's something that needs to be thought about.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading issue #36 and tracing how distutils uses the Python interpreter's sysconfigdata variables for LDSHARED and related compile/link settings. Compare that behavior with the runtime MACOSX_DEPLOYMENT_TARGET case described here and with CPython's configure-time checks. Done means reaching and documenting a decision about whether independent distutils should retain sysconfig values or derive them at runtime across platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.