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
gypaetus
  • 6,873
  • 3
  • 35
  • 45
  • 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. – Simeon Visser Sep 20 '14 at 00:02

1 Answers1

1

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

python -B setup.py install
gypaetus
  • 6,873
  • 3
  • 35
  • 45