It is done by the following code:
|
INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) |
The problem is Python always convert non-empty string to True. I think we need to use something like distutils.util.strtobool.
$ python
Python 3.8.2 (default, Apr 21 2020, 21:57:57)
[GCC 9.2.1 20191109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> bool("false")
True
>>> bool("False")
True
>>> import distutils.util
>>> bool(distutils.util.strtobool("false"))
False
>>> bool(distutils.util.strtobool("False"))
False
>>>
It is done by the following code:
synthtool/synthtool/gcp/templates/python_samples/noxfile.py.j2
Line 95 in 94686b0
The problem is Python always convert non-empty string to
True. I think we need to use something likedistutils.util.strtobool.