Skip to content

Commit 71f3143

Browse files
committed
[dan.io] fix package search path
1 parent b9269c7 commit 71f3143

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dan/io/package.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ async def __build__(self):
180180
from dan.pkgconfig.package import Data, find_package
181181
data = Data(self.output)
182182
async with asyncio.TaskGroup(f'importing {self.name} package requirements') as group:
183+
toolchain = self.context.get('cxx_target_toolchain')
184+
search_path = get_packages_path() / toolchain.system / toolchain.arch / toolchain.build_type.name
183185
for pkg in data.requires:
184-
pkg = find_package(pkg.name, spec=pkg.version_spec, search_paths=[get_packages_path()], makefile=self.makefile)
186+
pkg = find_package(pkg.name, spec=pkg.version_spec, search_paths=[search_path], makefile=self.makefile)
185187
self.debug('copying %s to %s', pkg.config_path, self.build_path / self.pkgconfig_path)
186188
group.create_task(aiofiles.copy(pkg.config_path, self.build_path / self.pkgconfig_path))

0 commit comments

Comments
 (0)