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

Change to pep517.meta.load #39

Closed
wwuck opened this issue Jun 2, 2021 · 5 comments · Fixed by #40
Closed

Change to pep517.meta.load #39

wwuck opened this issue Jun 2, 2021 · 5 comments · Fixed by #40

Comments

@wwuck
Copy link
Contributor

wwuck commented Jun 2, 2021

Should this plugin change to using pep517.meta.load? I've tried to change from setup.py to setup.cfg for project metadata and this plugin doesn't detect install_requires metadata in setup.cfg.

ref: pypa/setuptools#1951 (comment)

@arkq
Copy link
Owner

arkq commented Jun 20, 2021

There is one problem with using pep517.meta.load. Firstly, it's not a public API of pep517 module. Secondly, it seems that it requires pip to be available. I think that for now I can add built-in support for requirements from setup.cfg file. Do you have any edge cases for install_requires section in setup.cfg? Because from the documentation, it seems that the syntax is rather simple: https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html

@arkq
Copy link
Owner

arkq commented Jun 20, 2021

@wwuck could you please check whether PR #40 will work for you?

@wwuck
Copy link
Contributor Author

wwuck commented Jun 21, 2021

@arkq I can confirm that PR #40 works with setup.cfg. Thanks!

My other thought behind using pep517.meta.load was that it would also support PEP621 (either currently or in the future, haven't checked this).
Now that I've looked further, I see that pep517.meta.load will possibly be deprecated/removed soon (pypa/pyproject-hooks#100), but there might be an alternative appearing out of that discussion pypa/build#181. It looks like that might be the way to go when it finally gets implemented?

It would be nice to have support for projects using PEP621 pyproject.toml configuration (eg. flit) as well and I'm guessing using something common like that proposed feature of pypa/build would get PEP621 support included automatically?

@arkq
Copy link
Owner

arkq commented Jun 21, 2021

It would be nice to have support for projects using PEP621 pyproject.toml configuration (eg. flit) as well and I'm guessing using something common like that proposed feature of pypa/build would get PEP621 support included automatically?

Yes, that would be nice to have a separate module for querying requirements. If there will be such used by other tools, I will jump the bandwagon as well.

@arkq arkq closed this as completed in c29f14c Jun 21, 2021
@wwuck
Copy link
Contributor Author

wwuck commented Jun 23, 2021

@arkq Does this do the job?

pypa/build#301

looking at pypa/build#181 (comment) suggests a proper helper function will appear soon, but until then the sample at end of issue 301 should work? That change is already part of the latest release of pypa/build

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

Successfully merging a pull request may close this issue.

2 participants