diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-09-08 10:59:48 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-15 13:25:55 +0100 |
commit | 672eb1e10a4a329514bc533d3dc4f6247fe31aec (patch) | |
tree | ace7ccaa16b7a519a301cfb26c27a6c44a59ac4b | |
parent | 95e9f8fd675c6e4f1eeabe9337a7cb9c1e3b4456 (diff) |
build_scripts: Don't use options from the environment
This can cause issues for cross builds, particularly
for cmake-toolchain-file.
Affected options are:
build-type, cmake-toolchain-file, internal-build-type,
internal-shiboken-host-path-query-file, jobs, limited-api,
package-timestamp, parallel, prefix, qt-host-path, shiboken-host-path.
Task-number: PYSIDE-802
Task-number: PYSIDE-962
Change-Id: Icd48d56c66df79bcc2e203290ee5a7a0fb930529
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r-- | build_scripts/options.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/build_scripts/options.py b/build_scripts/options.py index 2f52ec882..08a2f8b9f 100644 --- a/build_scripts/options.py +++ b/build_scripts/options.py @@ -68,11 +68,9 @@ class Options(object): def option_value(self, name, short_option_name=None, remove=True): """ - Returns the value of a command line option or environment - variable. + Returns the value of a command line option. - :param name: The name of the command line option or environment - variable. + :param name: The name of the command line option. :param remove: Whether the option and its value should be removed from sys.argv. Useful when there's a need to query for @@ -106,9 +104,6 @@ class Options(object): if remove: sys.argv[index:index + 1] = [] - if value is None: - value = os.getenv(name.upper().replace('-', '_')) - self.dict[name] = value return value |