[Distutils] Installing files with syntactic errors

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat Apr 28 03:01:04 2001


In my package, I have a few files which are syntactically incorrect in
Python 1.5 (since they use Unicode literals). Those files are not used
in Python 1.5, but are part of a package, and are used in Python 2.0
and later.

When running install_cmd on Python 1.5, installation aborts when
trying to byte-compile files. I know I can invoke install_cmd with
--no-compile, but I still would like to generate byte code for all the
other files.

So I'm looking for a way to either skip byte-compilation for a single
file, to silently procede in case of byte-compilation errors, or to
exclude a single module of a package from both building and
installation.

Any suggestions are welcome.

TIA,
Martin