OSDN Git Service

scons: Compatibility with Scons development version string
authorpal1000 <liviuprodea@yahoo.com>
Thu, 7 Mar 2019 08:38:10 +0000 (10:38 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 14 Mar 2019 19:03:56 +0000 (19:03 +0000)
commit13b23099a36769c30b8bc4bbefec3b7b01350a65
tree454a152db7bdbcbe8a2aebee0c34798bff71a04d
parentdea94622fb16f926cd7becf9066febaf1f6f64f3
scons: Compatibility with Scons development version string

This ensures Mesa3D build doesn't fail in this case as encountered when
bisecting Scons source code while regression testing
https://bugs.freedesktop.org/show_bug.cgi?id=109443
and when testing 3.0.5.a.2

Technical details:
Scons version string has consistently been in this format:
MajorVersion.MinorVersion.Patch[.alpha/beta.yyyymmdd]
so these formulas should strip alpha/beta flags and return Scons version:

- as string - `'.'.join(SCons.__version__.split('.')[:3])`
- as tuple of integers - `tuple(map(int, SCons.__version__.split('.')[:3]))`

- v2: Fixed Scons version retrieval formulas as string and tuple of integers.
- v3: Fixed Scons version string format description.

Cc: "19.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit 7f89fd17ed2b1bd0c0fe4ec946dcabed0f8c74d3)
scons/custom.py
scons/gallium.py