Autotools insists on generating pyo and pyc files when building my project (not when running it) no matter what I do. The problem is that my Python configuration is somewhat strange, and I don’t want the Python compiler to run during installation. Is there any way to disable generating these files?
For reference, here are the things I’ve tried:
- Setting py_compile=echo so that automake won’t compile Python scripts
- Manually defining install-pythonPYTHON in Makefile.am
- Setting PYTHONFLAGS=-B
- Setting PYTHONDONTWRITEBYTECODE in Makefile.am, configure.ac, etc.
- Creating a new automake variable “python2dir” and installing the script using dist_python2_DATA = Script.py
Basically, if a file ends with the .py extension, Automake WILL create pyc and pyo files, no matter what you do.
Please try again with your last attempt.
will treat
foo.pyas any regular file, distribute it, and install it in$(pythondir)._DATAdoes not trigger any kind of compilation.