[Mesa-dev] [PATCH 5/5] scons: Check for mako 0.8.0
Jose Fonseca
jfonseca at vmware.com
Tue Aug 14 18:30:48 UTC 2018
On 14/08/18 18:34, Dylan Baker wrote:
> Bugzilla: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.freedesktop.org%2Fshow_bug.cgi%3Fid%3D107565&data=02%7C01%7Cjfonseca%40vmware.com%7C2d939ac68f994873752708d6020c5ecf%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636698649496887303&sdata=GMeoZka4Tw3FxtLqRLfYvegiwaCCvLcr1cuXxCyfL7A%3D&reserved=0
> ---
> scons/gallium.py | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/scons/gallium.py b/scons/gallium.py
> index 92a762a0c1e..e05fb40f157 100755
> --- a/scons/gallium.py
> +++ b/scons/gallium.py
> @@ -29,6 +29,7 @@ Frontend-tool for Gallium3D architecture.
> # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> #
>
> +from __future__ import print_function
>
> import distutils.version
> import os
> @@ -681,6 +682,18 @@ def generate(env):
> env.PkgCheckModules('XF86VIDMODE', ['xxf86vm'])
> env.PkgCheckModules('DRM', ['libdrm >= 2.4.75'])
>
> + if not os.path.exists("src/util/format_srgb.c"):
> + print("Checking for Python Mako module (>= 0.8.0)... ", end='')
> + try:
> + import mako
> + except ImportError:
> + print("no")
> + exit(1)
> + if mako.__version__ < "0.8.0":
Shouldn't we use distutils.version.LooseVersion ?
Otherwise looks good.
Jose
> + print("no")
> + exit(1)
> + print("yes")
> +
> if env['x11']:
> env.Append(CPPPATH = env['X11_CPPPATH'])
>
>
More information about the mesa-dev
mailing list