[Mesa-dev] [PATCH] Fix usage of Python in Makefiles
dbn.lists at gmail.com
Tue Oct 26 06:23:00 PDT 2010
On Mon, Oct 25, 2010 at 12:10 PM, Matthew William Cox <matt at mattcox.ca> wrote:
> Hello list,
> There are still some places in the build system which directly call
> python. This is an issue now that python3 has started to become the
> default version, this is true on at least Arch Linux. The attached patch
> fixes the build system to always use the PYTHON2 make variable together
> with the PYTHON_FLAGS variables.
This patch seems reasonable, but there are two logical changes here.
Changing all the python to $(PYTHON) is a no brainer. However,
removing the second -O from PYTHON_FLAGS is really a separate change.
Can you explain that problem in more detail? It might also be more
reasonable to just drop $(PYTHON_FLAGS) when using
src/gallium/auxiliary/util/u_format_srgb.py so this isn't a global
> Unfortunately, the autoconf side of things doesn't actually set these
> variables to anything useful. config/autoconf.in sets PYTHON2=python
> rather than having it be set as a result of running the configuration
> script. At least having the Makefiles correctly use PYTHON2 means that
> we can work around this by manually setting PYTHON2=python2 at the make
> command invocation.
Well, when I first added this python was only being used to generate
the glapi code, which is stored in the repository. Really the only
people who ever used it were the developers tinkering with glapi. Feel
free to make a patch that gets the path to python. I think there's an
AM_PYTHON macro or something like that. You just AC_PATH_PROG it, too.
More information about the mesa-dev