diff --git a/vendor/vtd-api/conanfile.py b/vendor/vtd-api/conanfile.py index f030123fb..fbe47bc87 100644 --- a/vendor/vtd-api/conanfile.py +++ b/vendor/vtd-api/conanfile.py @@ -31,7 +31,7 @@ def export_sources(self): tools.untargz( self._archive_base, self.export_sources_folder, - pattern=Path(self._root_dir) / "Develop" / "*", + pattern="{}".format(Path(self._root_dir) / "Develop" / "*"), ) self.copy("CMakeLists.txt") diff --git a/vendor/vtd/conanfile.py b/vendor/vtd/conanfile.py index 26ece4324..1c14ba25b 100644 --- a/vendor/vtd/conanfile.py +++ b/vendor/vtd/conanfile.py @@ -1,5 +1,6 @@ from pathlib import Path import shutil +import os.path from conans import CMake, ConanFile, tools from conans.errors import ConanInvalidConfiguration @@ -26,14 +27,15 @@ class VtdConan(ConanFile): _archive_base = "vtd.2.2.0.Base.20181231.tgz" _archive_osi = "vtd.2.2.0.addOns.OSI.20190513.tgz" _archive_rod = "vtd.2.2.0.addOns.ROD.Base.20190313.tgz" - exports_sources = [ - _archive_base, - _archive_osi, - _archive_rod, - ] - _root_dir = "VTD.2.2" + def export_sources(self): + self.copy(self._archive_base, symlinks=False) + if os.path.isfile(self._archive_osi): + self.copy(self._archive_osi, symlinks=False) + if os.path.isfile(self._archive_rod): + self.copy(self._archive_rod, symlinks=False) + def configure(self): if self.settings.os == "Windows": raise ConanInvalidConfiguration("VTD binaries do not exist for Windows") @@ -44,7 +46,7 @@ def build(self): def extract_archive(archive): print("Extracting: {}".format(archive)) - tools.untargz(src / archive, dst) + tools.untargz("{}".format(src / archive), "{}".format(dst)) extract_archive(self._archive_base) if self.options.with_osi: