Pull requests

#68 Merged
Repository
bdbaddog bdbaddog
Branch
default
Repository
scons scons
Branch
default

Changes to setup.py to allow it to be parsed by python3.x. This allows it to get far enough that it can check the python version and issue a sensible error message if running under unsupported python3 or above

Author
  1. William Deegan
Reviewers
Description

Previously running python setup.py with a python version 3.0 or above yielded a non sensical

python3.3 ../../src/setup.py
  File "../../src/setup.py", line 352
    mode = ((os.stat(file)[stat.ST_MODE]) | exec_and_read_permission) & 07777
                                                                            ^
SyntaxError: invalid token

This change fixes the parsing errors which yields this and adds some logic to check for python 3 or higher and exit with a reasonable error message. Problems addressed: python3 octal format is different so symbolic versions of the permissions an integer format of the bit mask are used. '/n'.join(installed) barfed so I've changed it to a simple and readable for print loop.

Comments (0)