0

I have a package that can be installed in python 3 using a distutils based setup.py with the command

python setup.py install

but gives a SyntaxError in python 2. Is there a way to skip the byte-compilation of this particular module or try to catch the SyntaxError exception (using try/except pass did not work)? I would like to have the package installed in python 2 and it does not matter that this module in the package will not work.

byte-compiling ../
    a, b, *c = d
SyntaxError: invalid syntax
1
  • 1
    That particular syntax is not valid in Python 2 so you need to find a way to exclude the module or disable the byte compilation. Commented Sep 20, 2014 at 0:02

1 Answer 1

1

The temporary solution was to skip writing of bytecode files with the -B option.

python -B setup.py install
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.