|
8 | 8 | from pathlib import Path
|
9 | 9 | from typing import List
|
10 | 10 |
|
11 |
| -from conans import CMake, ConanFile, tools |
12 |
| -from conans.errors import ConanInvalidConfiguration |
| 11 | +from conan import ConanFile |
| 12 | +from conan.tools import files |
| 13 | +from conan.errors import ConanInvalidConfiguration |
| 14 | + |
| 15 | +required_conan_version = ">=1.52.0" |
13 | 16 |
|
14 | 17 |
|
15 | 18 | def patch_rpath(file: Path, rpath: List[str]):
|
@@ -96,7 +99,7 @@ def build(self):
|
96 | 99 |
|
97 | 100 | def extract_archive(archive):
|
98 | 101 | print(f"Extracting: {archive}")
|
99 |
| - tools.untargz(src / archive, dst) |
| 102 | + files.untargz(src / archive, dst) |
100 | 103 |
|
101 | 104 | extract_archive(self._archive_base)
|
102 | 105 | libdir.mkdir()
|
@@ -147,13 +150,15 @@ def package(self):
|
147 | 150 | def package_info(self):
|
148 | 151 | bindir = Path(self.package_folder) / "bin"
|
149 | 152 | self.output.info(f"Appending PATH environment variable: {bindir}")
|
150 |
| - self.env_info.PATH.append(str(bindir)) |
151 |
| - self.env_info.VTD_ROOT = self.package_folder |
| 153 | + self.runenv_info.append_path("PATH", str(bindir)) |
| 154 | + self.runenv_info.define("VTD_ROOT", self.package_folder) |
| 155 | + self.buildenv_info.define("VTD_ROOT", self.package_folder) |
| 156 | + |
152 | 157 | if self.options.with_osi:
|
153 | 158 | osi_path = (
|
154 | 159 | Path(self.package_folder)
|
155 | 160 | / "Data/Setups/Standard.OSI3/Bin/libopen_simulation_interface.so"
|
156 | 161 | )
|
157 | 162 | if not osi_path.exists():
|
158 | 163 | raise ConanInvalidConfiguration("VTD OSI library not found.")
|
159 |
| - self.env_info.VTD_EXTERNAL_MODELS.append(f"{osi_path}") |
| 164 | + self.runenv_info.append_path("VTD_EXTERNAL_MODELS", f"{osi_path}") |
0 commit comments