diff options
author | Iikka Eklund <iikka.eklund@qt.io> | 2021-10-06 11:49:54 +0300 |
---|---|---|
committer | Iikka Eklund <iikka.eklund@qt.io> | 2021-11-04 09:04:28 +0000 |
commit | 20efca923d1a27cbc8a51f32f6c7b5811b995361 (patch) | |
tree | 5ca46744fd175e728958e9ca0b3fb6fdedb35614 | |
parent | 14213d33c3243d7ba175845868b64868bf3a5331 (diff) |
Do not use f-strings in recipes
Conan supports Python3.5 which does not support f-strings yet.
Change-Id: I53a21347290cbf6db7b6a104a19670ff82bcc7b8
Reviewed-by: Simo Fält <simo.falt@qt.io>
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
-rw-r--r-- | conanfile.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/conanfile.py b/conanfile.py index 1e3ab09..dff086d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -53,7 +53,7 @@ def run_qt_configure_module_with_additional_packages_prefix( prefixes = "".join( [conan_file.deps_cpp_info[d].rootpath + ";" for d in conan_file.deps_cpp_info.deps] ) - conan_file.output.info(f"Using QT_ADDITIONAL_PACKAGES_PREFIX_PATH: {prefixes}") + conan_file.output.info("Using QT_ADDITIONAL_PACKAGES_PREFIX_PATH: {0}".format(prefixes)) with tools.environment_append({"QT_ADDITIONAL_PACKAGES_PREFIX_PATH": prefixes}): build_env_wrap(conan_file, build_func) @@ -81,19 +81,19 @@ def run_qt_configure_module(conan_file: ConanFile): conan_file.build_folder, " ".join(qt_module_features) if qt_module_features else "", "--", - f"-DQT_BUILD_SINGLE_REPO_TARGET_SET={conan_file.name}", - f"-DCMAKE_INSTALL_PREFIX={conan_file.package_folder}", - f"{' '.join(cmake_args)}" if cmake_args else "", + "-DQT_BUILD_SINGLE_REPO_TARGET_SET={0}".format(conan_file.name), + "-DCMAKE_INSTALL_PREFIX={0}".format(conan_file.package_folder), + "{0}".format(" ".join(cmake_args)) if cmake_args else "", ] ) - conan_file.output.info(f"Calling: {cmd}") + conan_file.output.info("Calling: {0}".format(cmd)) conan_file.run(cmd, run_environment=True) # Qt qt-configure-module would direct the install to qtbase's -prefix which we do not want, # we need to direct the install to this packages '/package' directory Path(conan_file.package_folder).mkdir(parents=True) cmd = " ".join(["cmake", "--build", "."]) - conan_file.output.info(f"Calling: {cmd}") + conan_file.output.info("Calling: {0}".format(cmd)) conan_file.run(cmd, run_environment=True) @@ -185,7 +185,7 @@ def filter_cmake_args_for_package_id(cmake_args: Optional[str]) -> Optional[str] for item in list(filter(None, cmake_args.strip("\"' ").split(" "))): for pattern in excludes: if re.search(pattern, item): - print(f"Filtered out cmake argument from package_id: {item}") + print("Filtered out cmake argument from package_id: {0}".format(item)) break else: included_items.append(item) @@ -230,7 +230,11 @@ class QtLeafModule(metaclass=ABCMeta): # all the Qt Conan packages follow the same versioning schema for dep in requirements: # will match latest prerelase of final major.minor.patch - self.requires(f"{dep}/[<={ver}, include_prerelease=True]@{self.user}/{self.channel}") + self.requires( + "{0}/[<={1}, include_prerelease=True]@{2}/{3}".format( + dep, ver, self.user, self.channel + ) + ) @abstractmethod def get_qt_leaf_module_options(self) -> Dict[str, Any]: |