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

Enhance BuildRequires when %check is present #140

Closed xsuchy closed 6 years ago

xsuchy commented 6 years ago

I am trying to convert/package django-simple-captcha. I hit an issue that test in %check phase crashed because of missing dependencies.

pyp2rpm correctly generated Requires. In this case

Requires:  python3-pillow >= 2.2.2
Requires:  python3-six >= 1.2.0
Requires:  python3-django >= 1.7 

But because there is %check section you need to run libraries and these modules were missing, because they were not listed as BuildRequires.

So I propose following enhancement: If %check is not empty, then copy all Requires to BuildRequires too.

mcyprian commented 6 years ago

Resolved in https://github.com/fedora-python/pyp2rpm/commit/083f6f4098e44d3e8e52108f98890f833dbbfdd8.