Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Bazel recursive stubgen example #54

Merged
merged 8 commits into from
Dec 17, 2024
Prev Previous commit
Next Next commit
feat: copy preserving relative file structure
  • Loading branch information
cemlyn007 committed Nov 17, 2024
commit 78b924e66a946f7af0cf5347d5e9fcf850c5361a
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def bazel_build(self, ext: BazelExtension) -> None:
should_copy = True

if should_copy:
shutil.copyfile(root / fp, libdir / fp)
new_directory = libdir / os.path.relpath(root, srcdir)
if not os.path.exists(new_directory):
os.mkdir(new_directory)
shutil.copyfile(root / fp, libdir / new_directory / fp)


setuptools.setup(
Expand Down