Commit Graph

6 Commits

Author SHA1 Message Date
Nathan Gauër
6c8b460eb1
misc: remove encoding parameter (#5710)
Those scripts are running on Python2.7 if build with the NDK tools.
Under python2.7, io.open will load as "utf-8" since we give the encoding
option, and return a "unicode" string.
Under Python3, the open() function will return a UTF-8 string.
This means the XMLParser needs to have a different 'encoding' option
depending on the python version.

For some reason I don't know, the XMLParser still fails if we use
'unicode' under Python2.7. But converting the unicode string to utf-8
does work.

Signed-off-by: Nathan Gauër <brioche@google.com>
2024-06-17 16:08:55 +02:00
David Neto
14000ad47a
Use python3 explicitly. (#5540)
Some Linux images don't ship with a plain 'python'
2024-01-23 15:42:34 -05:00
David Neto
e751c7e7db
Treat spir-v.xml as utf-8 (#5306)
* Treat spir-v.xml as utf-8

Treat the input file as utf-8, and configure the XML parser to use
the utf-8 encoding.

The Chromium build was breaking when trying to parse the XML
file as ASCII.

* Use Python io.open

Try to fix the android-ndk-build flow.  It seems to be using
an old Python. For example, Python 2.6 builtin function open()
did not support the 'encoding' keyword argument.  But its io.open
method did support it.
2023-07-07 12:25:26 -04:00
David Neto
e1688b60ca
Avoid use of Python distutils.dir_util (#3203)
Required for compatibility with (some?) Python3 installations.
2020-02-28 16:50:06 -05:00
Ryan Harrison
65f49dfc39
Remove unneeded future imports (#2739)
Also, adds explicitly setting python executable in the NDK build script, rewrites 
some Python2-isms to 3isms, and formats some code.

Fixes #2738
2019-07-24 15:29:38 -04:00
David Neto
5a0b5ca4a7 Get vendor tool info from the SPIR-V registry file
Update old tests to use officially registered vendor names;
this affected "Codeplay".
2016-12-09 14:01:43 -05:00