From 9452e9e152b9b7e1abb71d04beebc85a62f5e6bf Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 27 Apr 2022 11:33:09 +0200 Subject: bootstrap.py: support header dirs directly staged Some libraries, e.g., libgit2, bring an include directory that is expected to occur directly in the search path (containing a git2 directory and a git2.h file). Support this use case by allowing "." as include_name in the bootstrap hints. --- bin/bootstrap.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bin/bootstrap.py') diff --git a/bin/bootstrap.py b/bin/bootstrap.py index b2c9547c..8154ee7d 100755 --- a/bin/bootstrap.py +++ b/bin/bootstrap.py @@ -93,8 +93,13 @@ def setup_deps(): include_dir = os.path.join(subdir, hints.get("include_dir", ".")) include_name = hints.get("include_name", repo) - os.symlink(os.path.normpath(include_dir), - os.path.join(include_location, include_name)) + if include_name == ".": + for entry in os.listdir(include_dir): + os.symlink(os.path.normpath(os.path.join(include_dir, entry)), + os.path.join(include_location, entry)) + else: + os.symlink(os.path.normpath(include_dir), + os.path.join(include_location, include_name)) if "build" in hints: run(["sh", "-c", hints["build"]], cwd=subdir) if "link" in hints: -- cgit v1.2.3