[Mesa-dev] [PATCH] glapi: Avoid argparse type argument for API XML input files.
Jose Fonseca
jfonseca at vmware.com
Tue May 26 11:52:09 PDT 2015
On 26/05/15 19:48, Jose Fonseca wrote:
> On 26/05/15 19:06, Dylan Baker wrote:
>> On Tue, May 26, 2015 at 11:15:36AM +0100, Jose Fonseca wrote:
>>> argparse type is a nice type saver for simple data types, but it doesn't
>>> look a good fit for the input XML file:
>>>
>>> - Certain implementations of argparse (particularly python 2.7.3's)
>>> invoke the type constructor for the default argument even when an
>>> option is passed in the command line. Causing `No such file or
>>> directory: 'gl_API.xml'` when the current dir is not
>>> src/mapi/glapi/gen.
>>>
>> The fix is fine, I'm not complaining about the changes.
>>
>> However,
>>
>> I'm running 'scons' against python 2.7.3 and it's building fine with
>> your patch reverted. Is there something I'm missing about the way that
>> the scons build works? The documentation says that just 'scons' is all
>> that is necessary, is that not the case?
>
> Yes, that should be enough to repro. I don't know why it doesn't. Maybe
> your python 2.7.3's argparse was patched or something.
>
> Jose
>
BTW, one doesn't even need scons. Merely doing
python src/mapi/glapi/gen/gl_table.py -f
src/mapi/glapi/gen/gl_and_es_API.xml > glapitable.h
Should suffice.
Jose
More information about the mesa-dev
mailing list