- edited description
Unable to build because try to use __python3 macro
HI, I'm trying to use the module to build some rpm in a machine with python2.7 installed vía software collections http://wiki.centos.org/AdditionalResources/Repositories/SCL with this command:
pyp2rpm -n Babel -b 27-python --srpm
and then rebuild it with:
rpmbuild --rebuild rpmbuild/SRPMS/python27-python-Babel-1.3-1.el6.src.rpm
but I get this error:
- cd Babel-1.3
- '%{__python3}' setup.py build /var/tmp/rpm-tmp.fdZaGH: line 28: fg: no job control error: Bad exit status from /var/tmp/rpm-tmp.fdZaGH (%build)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.fdZaGH (%build)
Why is trying to use %{__python3} macro?
the complete output is in the file attached.
Comments (3)
-
reporter -
Hello, thank you for your report.
It's actually a bug in a method python_bin_for_python_version in pyp2rpm/filters.py, I will fix that altough it will not help your use case.
The proper workflow for you to generate srpm for software collections would be:
- generate and save spec file with pyp2rpm, if you want a srpm for python27 collection use
pyp2rpm -n Babel -b 2 > ~/rpmbuild/SPECS/python-babel.spec
, edit specfile if needed - transform and save spec file with spec2scl tool https://bitbucket.org/bkabrda/spec2scl
spec2scl ~/rpmbuild/SPECS/python-babel.spec > ~/rpmbuild/SPECS/python-babel.spec
- build srpm
rpmbuild -bs ~/rpmbuild/SPECS/python-Django.spec --define 'scl python27'
- build rpm, I suggest using mock, see http://stackoverflow.com/questions/27187386/error-while-building-a-package-for-python33-or-for-other-software-collection
- generate and save spec file with pyp2rpm, if you want a srpm for python27 collection use
-
Account Deleted - changed status to resolved
Improve filters to fill correct version in macros fixes
#28→ <<cset 2215e17ec8c9>>
- Log in to comment