fedora-python / pyp2rpm

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

split build deps + test build deps #84

Open glensc opened 7 years ago

glensc commented 7 years ago

preserves backward compatibility with distros whose templates are present except that uniqueness may be lost.

altho adding unique filter to template should be easy, but i don't know the language to add.

glensc commented 7 years ago

it may also call for refactor need:

i looked the extractors code closely then pyp2rpm renamed metadata key named "test" to "build", meaning the existing build_deps property should had been actually named as test_deps.

mcyprian commented 7 years ago

Test requires are included in build requires now, but there are also true build requires in the list returned from build_deps/build_deps_from_setup_py. If it is really useful to keep them separate for pld template, I suggest to do it in code of build_deps property. I am currently working on refactoring of extract_dist commad and metadata_extracors, Appending of test requires to build_deps is more visible there (It was done in extraction command before). It would be better to apply changes to new code of metadata_extractors.

glensc commented 7 years ago

i would like to see test and build deps separately like i've shown for pld template.

it's not really possible to distinguish whether test require is actually needed to only build. they put weird stuff in their setup.py :) so it's always up to packager to verify the dependencies. if they get listed in side %if tests, it's easier to move them outside %if tests

anyway, i'll revisit this pr once your previous code gets merged. this was anyway more of proof of concept to show what is i want and get some feedback.