[ovs-dev] [PATCH] Use PYTHONDONTWRITEBYTECODE=yes for invoking Python for build or test.
Ben Pfaff
blp at nicira.com
Mon May 21 18:15:20 UTC 2012
On Mon, May 14, 2012 at 01:59:11PM -0700, Ben Pfaff wrote:
> 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 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 at nicira.com>
> ---
> While testing the python vlog series that starts here:
> http://openvswitch.org/pipermail/dev/2012-May/016940.html
> I discovered that it's a pain to switch back and forth between
> commits before and after that series: the Python tests start
> mysteriously failing. I found that the problem was the .py[co]
> files that Python creates automatically. This commit (inserted
> before that series) avoids the problem.
I'd really like this patch to get reviewed soon so that I can push the
python-vlog series.
Thanks,
Ben.
More information about the dev
mailing list