[Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error
Sean Carolan
scarolan at gmail.com
Tue Mar 26 15:55:49 CET 2013
I'm attempting to use setup.py to build an RPM, but ran into this error:
[scarolan at cobbler:~/rpmbuild/BUILD/Python-2.7.3]$ python27 setup.py
bdist_rpm
File "setup.py", line 361
with open(tmpfile) as fp:
^
SyntaxError: invalid syntax
error: Bad exit status from /var/tmp/rpm-tmp.8897 (%build)
It appears the syntax error is striggered when "python setup.py build" is
run from that temporary bash script (/var/tmp/rpm-tmp.8897):
+ cd
/home/scarolan/rpmbuild/BUILD/Python-2.7.3/build/bdist.linux-x86_64/rpm/BUILD
+ cd Python-2.7.3
+ env 'CFLAGS=-O2 -g -m64 -mtune=generic' python setup.py build
File "setup.py", line 361
with open(tmpfile) as fp:
^
SyntaxError: invalid syntax
Any ideas how to fix this? The documentation on this topic is quite scarce.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130326/ead437de/attachment-0001.html>
More information about the Tutor
mailing list