Bug 335817 - Fails to build if system default python version is not 2.7
Summary: Fails to build if system default python version is not 2.7
Status: RESOLVED INTENTIONAL
Alias: None
Product: kdev-python
Classification: Developer tools
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Sven Brauch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-05 05:19 UTC by Felix Tiede
Modified: 2015-10-08 18:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Tiede 2014-06-05 05:19:15 UTC
According to the reviewboard (https://git.reviewboard.kde.org/r/114157/diff/2-3/?expand=1) in commit 10a3752b08bfd3b976e1b the file python-src/Parser/asdl_c.py was changed and now omits the python interpreter version using the system's default.

Since my system uses python-3.3 as default interpreter this file causes a syntax error during build phase.

Changing system default python version to 2.7 leads to a clean build.

Reproducible: Always

Steps to Reproduce:
1. Install python-3.3 and python-2.7 in parallel
2. Set system default python version to python-3.3
3. Build kdev-python
Actual Results:  
Following is an excerpt from the build output showing the build error if system's default python version is 3.3 instead of 2.7. The build is aborted after these lines.

creating Makefile
make[4]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
File "/var/tmp/portage/dev-util/kdevelop-python-4.9999/work/kdevelop-python-4.9999/python-src/Parser/asdl_c.py", line 1210
    print "Must specify exactly one output file"
                                               ^
SyntaxError: invalid syntax

Expected Results:  
A build with warnings but no errors.

I think reverting the change introduced into python-src/Parser/asdl_c.py in commit 10a3752b08bfd3b976e1b should fix this.
Comment 1 Sven Brauch 2014-06-05 16:29:51 UTC
Not sure, it will fail in one of the two cases anyways (some systems have only python, some only have python2). I identified this as the more common case. And it's not really worth adding fancy logic to the build system for.
Comment 2 Sven Brauch 2014-06-12 16:27:16 UTC
I should add that this problem only exists for the legacy Python 2 version of the program, which I consider to be in maintenance mode. For the Python 3 version, the whole subsystem which causes this issue is gone.
Comment 3 Sven Brauch 2015-10-08 18:16:39 UTC
I'll close this, the Python 2 version is basically discontinued and this is just not worth investing time in. Change it manually if you really need to.