fedora-python / pyp2rpm

Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM.
MIT License
123 stars 39 forks source link

Include extras require in metadata extraction #103

Closed mcyprian closed 7 years ago

mcyprian commented 7 years ago

Including extras require listed in setup.py in build requires can prevent tests of doc building failures in some cases. PR also contains updated integration tests data.

irushchyshyn commented 7 years ago

The changes look reasonable to me. Are there a lot of cases which fail due to missing extras_require? Is it intended only for SetupPyMetadataExtractor? Should not it work the same way when extracting matadata from wheel archive?

mcyprian commented 7 years ago

Maybe it is not obvious, but extras are already supported in wheel extractor. Format of metadata is a bit different in metadata.json file, "extra" is only a special tag of package included in dependencies.

mcyprian commented 7 years ago

I added a trivial logic to distinguish between runtime and build extra requirements.

irushchyshyn commented 7 years ago

Yeah, I did not see that it is already supported in wheel extractor. Looks good!