diff options
author | Ben Pfaff <blp@nicira.com> | 2012-05-22 10:17:00 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-05-22 10:17:00 -0700 |
commit | 853d10830faccd9a8d37780d2f957aaba40105d5 (patch) | |
tree | 3030e1d5efa584ce451a1c61407f4d6b07f499fe /Makefile.am | |
parent | 06f2a053603ef3f67dc3611bc7c1dd43a958cf46 (diff) |
Use PYTHONDONTWRITEBYTECODE=yes for invoking Python for build or test.
An upcoming commit will break the ovs.vlog module into an ovs.vlog package
with submodules. This commit makes switching between trees with the old
structure and those with the new structure much easier.
This commit works by setting PYTHONDONTWRITEBYTECODE=yes in Python
invocations from the build system and testing. This keeps Python 2.6+ from
creating .pyc and .pyo files. Creating .py[co] works OK for any given
version of Open vSwitch, but it causes trouble if you switch from a version
with foo/__init__.py into an (older) version with plain foo.py, since
foo/__init__.pyc will cause Python to ignore foo.py.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index c0c100e7..4b6156d1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,6 +22,16 @@ AM_CPPFLAGS += -DNDEBUG AM_CFLAGS += -fomit-frame-pointer endif +# PYTHONDONTWRITEBYTECODE=yes keeps Python from creating .pyc and .pyo +# files. Creating .py[co] works OK for any given version of Open +# vSwitch, but it causes trouble if you switch from a version with +# foo/__init__.py into an (older) version with plain foo.py, since +# foo/__init__.pyc will cause Python to ignore foo.py. +run_python = \ + PYTHONDONTWRITEBYTECODE=yes \ + PYTHONPATH=$(top_srcdir)/python:$$PYTHONPATH \ + $(PYTHON) + ALL_LOCAL = BUILT_SOURCES = CLEANFILES = |