[Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

Amit Saha amitsaha.in at gmail.com
Tue Mar 26 16:07:02 CET 2013


On Wed, Mar 27, 2013 at 12:55 AM, Sean Carolan <scarolan at gmail.com> wrote:
> 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):

Could it be that it is taking the system python executable which is
probably 2.4?

-Amit.


-- 
http://amitsaha.github.com/


More information about the Tutor mailing list