Reputation: 41655
I have been reading about creating an RPM for Python 2.6.4. In this page: http://docs.python.org/distutils/builtdist.html it says you can create an RPM of the current Python using python setup.py bdist_rpm
. The question's I have are:
Okay I sorted this out using checkinstall.
I downloaded checkinstall
from http://www.asic-linux.com.mx/~izto/checkinstall/.
I then installed the package but had to enter /usr/local/sbin/checkinstall
into my PATH to make it work. I then entered the next copmmand to get my RPM directory going.
yum install rpm-build
I then cd
into the Python module and entered this command:
checkinstall -R --nodoc --delspec=no --exclude=/selinux python2.6 ./setup.py install
This command replaces the command checkinstall
as your installing python libraries through setup.py instead of an ordinary make.
I then went through the checkinstall
process. The finished RPM was placed into /usr/src/redhat/RPMS/i386/
.
Note: THIS IS FOR LINUX RED HAT.
Upvotes: 4
Views: 11137
Reputation: 7802
These instructions explain how to create an RPM package for your module. As far as I know, there is no (easy) way to package all your Python installation into an RPM.
If you want to create an RPM package to install Python 2.6.4 on an older distro, you download the Python 2.6.4 source RPM and then rebuild it with rpmbuild
. See Fedora RPM Guide.
Upvotes: 1
Reputation: 798626
setup.py
is located.bdist
tarball.sdist_rpm
, then unpack the resulting SRPM and then apply your distro's Python packaging guidelines to the generated spec file.bdist
first. That way any issues that crop up will be more manageable.Upvotes: 6