On Mon, May 21, 2012 at 11:51:45AM -0700, Justin Pettit wrote: > On May 14, 2012, at 1:59 PM, Ben Pfaff wrote: > > > +# 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:$$PYTHON_PATH \ > > + $(PYTHON) > > I know that you just copied this from the earlier code, but is > PYTHON_PATH correct? I don't see any other place that uses it and > Python seems to only respect PYTHONPATH.
No, it's wrong. I'll fix it here and elsewhere. > It looks like PYTHONDONTWRITEBYTECODE was added in Python 2.6. Do > you think it's worth mentioning somewhere in case people get odd > results? Otherwise, looks good to me. Ugh. Thanks for pointing that out. For a moment, I thought that it meant that we'd need to use -B for supporting older versions, but in fact -B was added in 2.6 also. I guess we can't do any better than just documenting it. I updated the comment to: # PYTHONDONTWRITEBYTECODE=yes 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. # # Python before version 2.6 always creates .pyc files, so if you develop # with such an older version then you're out of luck. I'm going to push this soon. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev