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

Single-file packages failing in COPR due to missing directory #115

Closed ncoghlan closed 7 years ago

ncoghlan commented 7 years ago

I set up a pyp2rpm based COPR for some of my PyPI packages a while back: https://copr.fedorainfracloud.org/coprs/ncoghlan/autorpm/

The builds have been failing consistently since I released contextlib2 0.5.5 earlier this week: https://copr.fedorainfracloud.org/coprs/ncoghlan/autorpm/builds/

Checking against a rebuild of walkdir (which had previously been built successfully) showed a common error [1,2]:

RPM build errors:
    File not found: /builddir/build/BUILDROOT/python-contextlib2-0.5.5-1.fc26.x86_64/usr/lib/python3.6/site-packages/contextlib2
RPM build errors:
    File not found: /builddir/build/BUILDROOT/python-walkdir-0.4.1-1.fc26.x86_64/usr/lib/python3.6/site-packages/walkdir

Both of these are single file distribution packages that ship contextlib2.py and walkdir.py files respectively, so it's an error in pyp2rpm that the generated spec file is expecting a package directory rather than a single module file.

[1] https://copr-be.cloud.fedoraproject.org/results/ncoghlan/autorpm/fedora-26-x86_64/00543600-python-contextlib2/build.log.gz [2] https://copr-be.cloud.fedoraproject.org/results/ncoghlan/autorpm/fedora-26-x86_64/00544014-python-walkdir/build.log.gz

hroncok commented 7 years ago

This used to work, so I think it's a regression. (Or there's something tricky with contextlib2 and walkdir (unlikely).)

mcyprian commented 7 years ago

This was fixed in https://github.com/fedora-python/pyp2rpm/commit/06ce27bd65c7204d556b0e78cf24ba8227bffc4d, contextlib2 SRPM generated by the latest release of pyp2rpm can be built successfully . Version 3.2.2 is only in rawhide at this moment. COPR probably still uses 3.2.1.

mcyprian commented 7 years ago

pyp2rpm inside COPR was updated to version 3.2.2, contextlib2 can be built successfully now https://copr.fedorainfracloud.org/coprs/mcyprian/contextlib2/builds/