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

python_site_packages_path can be specified in the build section #5502

Merged
merged 9 commits into from
Nov 5, 2024

Conversation

jjhelmus
Copy link
Contributor

@jjhelmus jjhelmus commented Sep 20, 2024

Description

This is a implementation of CEP 17 in conda/ceps#90

The location of the site-packages directory can be specified in python_site_packages_path in the build section of a recipe. To avoid unnecessarily increasing the size of repodata this metadata should only be specified when the package name is python and when the path is not the default for CPython. These suggestions are not checked or enforced by conda-build.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Sep 20, 2024
@jjhelmus
Copy link
Contributor Author

jjhelmus commented Sep 20, 2024

I created a few sample packages that specify this metadata field for testing with downstream tools. They are available on anaconda.org in the jjhelmus/label/sp_path channel.

There are three noarch packages with the following paths specified

  • python 3.99.99 : lib/python3.99t/site-packages - A "free-threading" like path
  • python 3.99.90 : sample_path/from_the_file/index_json - Something that stands out
  • python 3.99.50 : ../../../../../invalid_path : Should be rejected by tooling as being invalid

Copy link

codspeed-hq bot commented Sep 20, 2024

CodSpeed Performance Report

Merging #5502 will not alter performance

Comparing jjhelmus:python_sp_path (dddf3f8) with main (d8a4148)

Summary

✅ 5 untouched benchmarks

@jezdez jezdez added this to the 24.11.x milestone Oct 11, 2024
@jjhelmus jjhelmus marked this pull request as ready for review October 21, 2024 17:33
@jjhelmus jjhelmus requested a review from a team as a code owner October 21, 2024 17:33
@jjhelmus jjhelmus changed the title DRAFT: python_site_packages_path can be specified in the build section python_site_packages_path can be specified in the build section Oct 21, 2024
@jjhelmus
Copy link
Contributor Author

jjhelmus commented Nov 4, 2024

@conda/builds-tools This PR is ready for a review.

jezdez
jezdez previously approved these changes Nov 5, 2024
beeankha
beeankha previously approved these changes Nov 5, 2024
Co-authored-by: Jannis Leidel <[email protected]>
@beeankha beeankha dismissed stale reviews from jezdez and themself via b74edc2 November 5, 2024 14:30
@wolfv
Copy link
Contributor

wolfv commented Nov 5, 2024

FYI we have a implementation in rattler build as well (will be released today):

prefix-dev/rattler-build#1161

@beeankha beeankha merged commit bd94b7f into conda:main Nov 5, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

5 participants