Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

No matter what I try, I cannot do this. I'm on Centos 5.6 x86_64

1 python setup.py bdist_rmp gives me syntax error:

[root@localhost Python-2.7.3]# python setup.py bdist_rpm
  File "setup.py", line 361
    with open(tmpfile) as fp:

2 checkinstall python setup.py install outputs the same syntax error as above.

3 checkinstall make install and has a lot of ignoring ... statements in the stdout and the final RPM doesn't have most of files.

4 Using this shell script I can get python installed and build the RPM package with python setup.py bdist_rpm method, however, the python 2.7 package will require python 2.7 as it's dependency.

EDIT: Actually, no, the #4 doesn't work either.

I tired different ./configure --prefix values, none of them made any difference.

I've read many options how to install python on Centos, but 99% of suggesting using plain 'make install' which I need to avoid.

Thanks in advance.

EDIT

I was able to package it with this command:

checkinstall --fstrans=no --install=no --pkgname=python --pkgversion "2.7.3" --default

However, when I try to install it with rpm -i I get this:

error: Failed dependencies:
    libtcl8.4.so()(64bit) is needed by python-2.7.3-1.x86_64
    libtk8.4.so()(64bit) is needed by python-2.7.3-1.x86_64
python < 2.4.3-32.el5 conflicts with python-libs-2.4.3-44.el5.x86_64

The missing dependency are understandable, however it's one obvious what's in conflict and how to resolve it.

share|improve this question

closed as off topic by Michael Hampton, mdpc, Scott Pack, Tom O'Connor, Khaled Mar 25 '13 at 8:34

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Your error message is incomplete. Please paste the entire message. –  Michael Hampton Mar 15 '13 at 11:06
    
@MichaelHampton thank you for your interest. However, it is indeed the full error message i get for python setup.py bdist_rmp command. Also I got some progress with checkinstall, but now I'm stuck with conflict problem. –  Aleksandr Makov Mar 15 '13 at 11:35

1 Answer 1

Instead of messing with your local system packages trying to build this, I would suggest you look at using Fedora's Mock. Regarding the conflicts you're getting take a look at the requires for python 2.4 using:

rpm -qR python (and the version if it is not the system release)

It's probably just that Python 2.4 requires an older version of python-libs.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.