fedora-python / pyp2rpm

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

Epel template #38

Closed mcyprian closed 8 years ago

mcyprian commented 8 years ago

Prototype of EPEL template, fixes #25:

hroncok commented 8 years ago

Python 3 EPEL packages are not considered here?

hroncok commented 8 years ago

Can you include some nice integration test in this PR? So I can see it in action without even trying to use it? :D

mcyprian commented 8 years ago

I was not able to find complete and clear description of python packaging in EPEL. EPEL Packaging wiki page says that new macros are not available in EL5 and EL6. I used an EPEL specfile from package db where Python3 is disabled as an inspiration of this template's design.

If Python 3 can be used in EPEL packages, can't we simply use fedora template or it's older version fedora_subidirs.spec for EPEL packages as well?

Do you think we want something more like spec example on this wiki page?

Here is an example of spec file generated running pyp2rpm coverage -p3 -p35 -s -t epel. I am not sure if this is what you meant by integration test.

marbu commented 8 years ago

I'm quite likely to be missing something here, but don't we need a separate template for each EPEL5, EPEL6 and EPEL7? Maybe EPEL5 and EPEL6 are similar enough to share the template, but if I read Packaging:Python_Old (linked from User:Mstuchli/Python3inEPEL) right, EPEL7 provides significant new features (especially when it comes to python3 support).

hroncok commented 8 years ago

By integration test I mean a test in the testsuite that would test if this works. I can talk to you in person on Wednesday abut his.

mcyprian commented 8 years ago

@hroncok: Do you have an idea why some of the tests fails with traceback ImportError: No module named jinja2 despite the fact Jinja2 is on the list of installed deps?

hroncok commented 8 years ago

No idea

mcyprian commented 8 years ago

Integration tests have been fixed. I tested new templates on small set of packages that are directly buildable when fedora.spec template is used. Many packages were built successfully for epel6 and epel7 from the spec files generated using new templates. Some of the packages failed because of missing dependencies in epel repositories. Examples of generated spec files are in files /test/test_data/python-Jinja2_epel6.spec and /test/test_data/python-Jinja2_epel7.spec. Do you have some comments/suggestions regarding design of the templates @hroncok @marbu?