Skip to content

CFEP: Unixy layout for python on windows#65

Open
isuruf wants to merge 7 commits into
conda-forge:mainfrom
isuruf:unixy-win-python
Open

CFEP: Unixy layout for python on windows#65
isuruf wants to merge 7 commits into
conda-forge:mainfrom
isuruf:unixy-win-python

Conversation

@isuruf

@isuruf isuruf commented May 14, 2026

Copy link
Copy Markdown
Member

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@isuruf isuruf requested a review from a team as a code owner May 14, 2026 17:57
Comment thread cfep-xx.md Outdated
Comment thread cfep-xx.md Outdated
Comment thread cfep-xx.md Outdated
Comment thread cfep-xx.md
Comment on lines +64 to +67
We are intentionally not changing the layout here because there's no way to
tell conda to install things here for `noarch: python` packages.
I propose adding a `python_scripts_path` as a CEP and use that in a future
release, but is out of scope for this CFEP.

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.

I wish conda clients would query sysconfig for this instead of hardcoding it, but I don't think there's a static JSON like in PEP 739, is there?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

conda clients shouldn't run the package IMO. That's why python_site_packages_path was added for purelib/platlib.

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.

Yes, I agree no code should be run. I just wish we had a static file shipped with the package, perhaps the output of python -m sysconfig or something. I'm mostly thinking out loud here, not requesting anything

Comment thread cfep-xx.md Outdated
Comment thread cfep-xx.md Outdated
isuruf and others added 2 commits May 14, 2026 11:32
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>

@pb01ka pb01ka left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I have left some questions and plausible corrects that can be made. Please feel free to correct me if you feel I mis-interpreted anything.

Comment thread cfep-xx.md Outdated
Comment thread cfep-xx.md Outdated
Comment thread cfep-xx.md
Comment thread cfep-xx.md Outdated
Comment thread cfep-xx.md
Co-authored-by: pb01ka <gaganpb08singh@gmail.com>
@isuruf isuruf force-pushed the unixy-win-python branch from b7cbdef to d7c01bb Compare May 15, 2026 20:38
@isuruf

isuruf commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

@conda-forge/core @conda-forge/emeritus-core

This PR falls under the CFEP Approval policy, please vote and/or comment on this PR.
This PR needs 60% of core/emeritus-core to vote yea to pass.
To vote please leave an emoji Approve (yea) or Request Changes (nay) or abstain on the gitvote comment below.

This vote will end on in two weeks on June 17, 2026.

/vote

@git-vote

git-vote Bot commented Jun 3, 2026

Copy link
Copy Markdown

Vote created

@isuruf has called for a vote on CFEP: Unixy layout for python on windows (#65).

The members of the following teams have binding votes:

Team
@conda-forge/Core
@conda-forge/Emeritus-core

Non-binding votes are also appreciated as a sign of support!

How to vote

You can cast your vote by reacting to this comment. The following reactions are supported:

In favor Against Abstain
👍 👎 👀

Please note that voting for multiple options is not allowed and those votes won't be counted.

The vote will be open for 14days. It will pass if at least 60% of the users with binding votes vote In favor 👍. Once it's closed, results will be published here as a new comment.

@mbargull

mbargull commented Jun 9, 2026

Copy link
Copy Markdown
Member

Glad to see this change proposal, thank you!

Just throwing this out here (but explicitly not meant as an objection to the change which I very much welcome):
Do we want/have some kind of plan for rollout of this change?
Some tools might have these path (semi-)hardcoded in, so it'd probably make sense to look out for possible downstream tests, e.g., CMake's FindPython could be one of those cases.

@isuruf

isuruf commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Some tools might have these path (semi-)hardcoded in, so it'd probably make sense to look out for possible downstream tests, e.g., CMake's FindPython could be one of those cases.

Most tools use sysconfig to get these values. For eg: CMake and setuptools
When it is not, we can patch them first and send PRs upstream to use sysconfig.

@jaimergp

jaimergp commented Jun 14, 2026

Copy link
Copy Markdown
Member

@kkraus14

Copy link
Copy Markdown

Some tools might have these path (semi-)hardcoded in, so it'd probably make sense to look out for possible downstream tests, e.g., CMake's FindPython could be one of those cases.

Most tools use sysconfig to get these values. For eg: CMake and setuptools
When it is not, we can patch them first and send PRs upstream to use sysconfig.

I've seen a fair amount of C++ code internally that has these paths semi-hardcoded as well. I don't think this is something we can easily patch / PR our way out of. This is effectively a breaking change and we'd need to treat it as such.

Is there any way for us to use symlinks or some kind of links to transition this change more smoothly?

@isuruf

isuruf commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

How is the C++ code using these paths? Would need to know more to understand how to fix it.

This is effectively a breaking change and we'd need to treat it as such.

Yes, that's why I'm suggesting using python 3.15 for this change and not porting it to <3.15 for now.

@SylvainCorlay

Copy link
Copy Markdown
Member

Really happy about this.

I hope that we will eventually get rid of the LIBRARY_PREFIX / CONDA_PREFIX distinction eventually, this is a great move in this direction.

@kkraus14

Copy link
Copy Markdown

How is the C++ code using these paths? Would need to know more to understand how to fix it.

I've seen both build code and runtime code that specifically checks for the CONDA_PREFIX environment variable and then uses the expected directory structure to find the python headers, libs, executables, etc. Sometimes it's to dynamically invoke Python in a subprocess, sometimes it's using the CPython API optionally / dynamically, other times it's linking at build time. It's kind of a mixed bag of everything and often allows floating forward on Python versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants