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

"pyp2rpm django-contrib-comments" produce incorrect spec #44

Closed xsuchy closed 8 years ago

xsuchy commented 8 years ago

pyp2rpm django-contrib-comments --srpm -d /tmp/tmpOQUrXw -b 2

and then:

LC_ALL=C.UTF-8 rpmbuild --rebuild /tmp/tmpOQUrXw/python-django-contrib-comments-1.7.0-1.fc23.src.rpm

produce:

...
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.MWRJJv
+ umask 022
+ cd /home/msuchy/rpmbuild/BUILD
+ cd django-contrib-comments-1.7.0
+ DOCDIR=/home/msuchy/rpmbuild/BUILDROOT/python-django-contrib-comments-1.7.0-1.fc23.x86_64/usr/share/doc/python2-django-contrib-comments
+ export DOCDIR
+ /usr/bin/mkdir -p /home/msuchy/rpmbuild/BUILDROOT/python-django-contrib-comments-1.7.0-1.fc23.x86_64/usr/share/doc/python2-django-contrib-comments
+ cp -pr README.rst /home/msuchy/rpmbuild/BUILDROOT/python-django-contrib-comments-1.7.0-1.fc23.x86_64/usr/share/doc/python2-django-contrib-comments
+ cp -pr LICENSE.txt /home/msuchy/rpmbuild/BUILDROOT/python-django-contrib-comments-1.7.0-1.fc23.x86_64/usr/share/doc/python2-django-contrib-comments
+ exit 0

RPM build errors:
    File not found: /home/msuchy/rpmbuild/BUILDROOT/python-django-contrib-comments-1.7.0-1.fc23.x86_64/usr/lib/python2.7/site-packages/django_contrib_comment

I am not sure if this is fault of pyp2rpm or rpmbuild.

mcyprian commented 8 years ago

The main source directory is called django_comments instead of django_contrib_comments in this package. Virtualenv module can resolve this, it is probably disabled in Copr builds.

xsuchy commented 8 years ago

I did not disabled anything. But I either did not enabled anything explicitely.

mcyprian commented 8 years ago

It is disabled automatically if virtualenv-api is not installed, I've removed virtualenv-api from spec for f23, because it was not in stable that time http://pkgs.fedoraproject.org/cgit/rpms/pyp2rpm.git/tree/pyp2rpm.spec?h=f23. I will fix it in the following release.

xsuchy commented 8 years ago

OK. I just confirmed it is passing on F24.