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

ENH: Add example of conda_build_config.yaml python_min map #2370

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Nov 12, 2024

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • [N/A] if you are adding a new page under docs/ or community/, you have added it to the sidebar in the corresponding _sidebar.json file
  • put any other relevant information below:

Relevant section of the netlify docs preview: https://deploy-preview-2370--conda-forge-previews.netlify.app/docs/maintainer/knowledge_base/#noarch-python

@matthewfeickert matthewfeickert requested a review from a team as a code owner November 12, 2024 06:21
Copy link

netlify bot commented Nov 12, 2024

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit 7a56541
🔍 Latest deploy log https://app.netlify.com/sites/conda-forge-previews/deploys/6732f8603472bf0008f65b5f
😎 Deploy Preview https://deploy-preview-2370--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@matthewfeickert matthewfeickert marked this pull request as draft November 12, 2024 06:25
@matthewfeickert matthewfeickert marked this pull request as ready for review November 12, 2024 06:32
Copy link
Member Author

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

Note to reviewers

Comment on lines 1525 to 1529
:::tip[Hint]

Adding an explicit `python_min` to your `noarch: python` recipe can be an effective way to ensure the required
Python in your package's metadata is enforced at `conda-build` time, as the build will fail if the package's
required Python version is different from `python_min`.
Copy link
Member Author

Choose a reason for hiding this comment

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

If it isn't clear from this that I'm trying to explain a situation where the existing feedstock would have

python_min:
- "3.8"

and the new package metadata (e.g. from PyPI) has

[project]
...
requires-python = ">=3.9"

resulting in a build failure (which is good as the python_min is now out of date) let me know and I can revise this.

* Add example of the map that is required for python_min to be manually
  enforced if it exists in recipe/conda_build_config.yaml.
* Add a tip that adding an explicit python_min also ensures that
  python_min used by conda-build does not deviate from the required
  Python metadata in the Python package. If the Python package
  required Python metadata is updated and the feedstock's recipe is not
  the build will fail, signalling that there is a metadata mismatch that
  needs to be corrected.

Adding an explicit `python_min` to your `noarch: python` recipe can be an effective way to ensure the required
Python in your package's metadata is enforced at `conda-build` time, as the build will fail if the package's
required Python version is newer than `python_min`.
Copy link
Member Author

Choose a reason for hiding this comment

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

I previously had this as "different from" but that's wrong. It only acts as a guard if the required Python metadata in the package advances to a newer Python than python_min.

@beckermr beckermr merged commit 80db1ed into conda-forge:main Nov 12, 2024
6 checks passed
@beckermr
Copy link
Member

thank you!

@jakirkham
Copy link
Member

Thank you both! 🙏

@matthewfeickert matthewfeickert deleted the feat/note-on-min-python branch November 12, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants