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

Add setuptools and/or wheel to requirements/host when used #2888

Open
jakirkham opened this issue Jul 31, 2024 · 9 comments
Open

Add setuptools and/or wheel to requirements/host when used #2888

jakirkham opened this issue Jul 31, 2024 · 9 comments

Comments

@jakirkham
Copy link
Contributor

In preparation for changes in pip's packaging as discussed in issue ( conda-forge/pip-feedstock#124 ), it would be good if we could detect the usage of setuptools and/or wheel in Python packages and add them to requirements/host if they are needed

@jakirkham
Copy link
Contributor Author

cc @beckermr

@beckermr
Copy link
Contributor

yes we can add a mini-migrator but we'll need to figure out a decent way to understand what we need to add - it is not clear to me when we need setuptools-only vs both setuptools+wheel.

@jakirkham
Copy link
Contributor Author

To the extent that Python packages declare these dependencies in their pyproject.toml's build-system.requires, grayskull can pick them up and add them

Is this something that depfinder checks?

@beckermr
Copy link
Contributor

depfinder only detects imports and so would miss this in some cases.

@jakirkham
Copy link
Contributor Author

Can you please share some examples? Identifying the edge cases will help us come up with a better solution

@beckermr
Copy link
Contributor

Oh right sorry. Here are the ones I am thinking of. None of them mean we cannot do this, but it will require thought+code.

  • grayskull fails for w/e reason
  • the recipe uses flit, hatchling, meson etc. as a build backend
  • the project only uses a pyproject.toml and so depfinder won't check anything since it only looks at python imports
  • there are surely multioutput recipes with odd edge cases

@jakirkham
Copy link
Contributor Author

As an interesting example

lda gets flagged as needing setuptools: conda-forge/lda-feedstock#12

AFAICT it is only used in lda's cibuildwheels tests

@beckermr
Copy link
Contributor

Even more interestingly, setuptools is already in host in that recipe. :/

@beckermr
Copy link
Contributor

beckermr commented Aug 1, 2024

Ahhhh. The bot flagging that is not related to depfinder or grayskull but is because it detected that package in host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants