I am building rpm on RHEL-6/64 bit server.
# rpmbuild -bb extras/rpm/neatx.spec
RPM build errors:
File not found by glob: /root/rpmbuild/BUILDROOT/neatx-0.1-1.el6.x86_64/usr/lib/python2.6/site-packages/neatx/*
I do see the same files under /root/rpmbuild/BUILDROOT/neatx-0.1-1.el6.x86_64/usr/lib/python2.7/site-packages directory.
# ls -l /root/rpmbuild/BUILDROOT/neatx-0.1-1.el6.x86_64/usr/lib/
drwxr-xr-x 3 root bin 4096 Apr 19 14:45 python2.7
# ls -l /root/rpmbuild/BUILDROOT/neatx-0.1-1.el6.x86_64/usr/lib/python2.7/site-packages
drwxr-xr-x 3 root bin 4096 Apr 19 14:45 neatx
These are python related entries in neatx.spec file.
# grep -i python extras/rpm/neatx.spec
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildRequires: python-devel
BuildRequires: python-docutils
Requires: python >= 2.4
Requires: python-simplejson
%python_sitelib/%{name}/*
Will appreciate your help/suggestions for fixing this issue.
Thanks in advance. -Shashi Divekar
The Command rpmbuild produces an Error because you are required to give a List of installed Files in your .spec File at:
%files
%defattr(-,root,root,-)
%python_sitelib/%{name}/*
And the Path %python_sitelib is resolved into
/usr/lib/python2.6/site-packages
But in the %install Section of your .spec the Files have been placed into another Directory which is:
/usr/lib/python2.7/site-packages
You should use in your %install Section also the same Macro %python_sitelib as in the %files Section.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With