diff --git a/bob/devtools/bootstrap.py b/bob/devtools/bootstrap.py index 9329043a22dd9a9c2364269030278f338095f901..bdd1dbd0605ecd2ca43009efb2a533693e7a7162 100644 --- a/bob/devtools/bootstrap.py +++ b/bob/devtools/bootstrap.py @@ -437,6 +437,17 @@ if __name__ == "__main__": logger.warn('See https://gitlab.idiap.ch/bob/bob.devtools/merge_requests/112') os.unlink('.gitignore') #### END OF HACK + + #### HACK that avoids this issue: https://github.com/conda/conda-build/issues/3767 + if os.path.exists('LICENSE') and os.path.exists('conda'): + logger.warn('Creating symlink in `./conda` to avoid issue with conda build (https://github.com/conda/conda-build/issues/3767)') + logger.warn('Replacing ../LICENSE to LICENSE (https://github.com/conda/conda-build/issues/3767)') + pwd = os.path.abspath(os.curdir) + os.symlink(f"{pwd}/LICENSE", f"{pwd}/conda/LICENSE") + recipe = open("./conda/meta.yaml").readlines() + recipe = [l.replace("../LICENSE","LICENSE") for l in recipe] + open("./conda/meta.yaml", "wt").write(''.join(recipe)) + #### END OF HACK condarc = os.path.join(args.conda_root, "condarc") diff --git a/conda/meta.yaml b/conda/meta.yaml index 059b56586d28fbb0e1f9c2173317cf6c86c062ce..64127318c18c2088fa51081952271dec52126fb0 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -111,3 +111,4 @@ about: license: BSD 3-Clause summary: Tools for development and CI integration of Bob packages license_family: BSD + license_file: ../LICENSE