diff --git a/bob/devtools/bootstrap.py b/bob/devtools/bootstrap.py index ac58248e86eeeb5c7d5edff9d306fea0cf8e0250..f565e26b5ecd0a5e8da4f64f44045733f82bef07 100644 --- a/bob/devtools/bootstrap.py +++ b/bob/devtools/bootstrap.py @@ -52,8 +52,8 @@ def do_hack(project_dir): """ This function is supposed to be for temporary usage. - It implements hacks for the issues: https://gitlab.idiap.ch/bob/bob.devtools/merge_requests/112 - and https://github.com/conda/conda-build/issues/3767) + It implements hacks for the issue: + https://gitlab.idiap.ch/bob/bob.devtools/merge_requests/112 """ @@ -62,47 +62,13 @@ def do_hack(project_dir): git_ignore_file = os.path.join(project_dir, ".gitignore") if os.path.exists(git_ignore_file): - logger.warning('Removing ".gitignore" to overcome issues with ripgrep') logger.warning( - "See https://gitlab.idiap.ch/bob/bob.devtools/merge_requests/112" + "Removing .gitignore to avoid issue with ripgrep (see " + "https://gitlab.idiap.ch/bob/bob.devtools/merge_requests/112)" ) os.unlink(git_ignore_file) #### END OF HACK - #### HACK that avoids this issue: https://github.com/conda/conda-build/issues/3767 - license_file = os.path.join(project_dir, "LICENSE") - if not os.path.exists(license_file): - license_file = os.path.join(project_dir, "LICENSE.AGPL") - - recipe_dir = os.path.join(project_dir, "conda") - if os.path.exists(license_file) and os.path.exists(recipe_dir): - logger.warning( - "Copying LICENSE file to `./conda` dir to avoid issue with conda build (https://github.com/conda/conda-build/issues/3767)" - ) - logger.warning( - "Replacing ../LICENSE to LICENSE (https://github.com/conda/conda-build/issues/3767)" - ) - shutil.copyfile( - license_file, - os.path.join(recipe_dir, os.path.basename(license_file)), - ) - - # Checking COPYING file just in case - copying_file = os.path.join(project_dir, "COPYING") - if os.path.exists(copying_file): - shutil.copyfile(copying_file, os.path.join(recipe_dir, "COPYING")) - - meta_file = os.path.join(recipe_dir, "meta.yaml") - recipe = open(meta_file).readlines() - recipe = [ - l.replace("../COPYING", "COPYING") - .replace("../LICENSE", "LICENSE") - .replace("../LICENSE.AGPL", "LICENSE.AGPL") - for l in recipe - ] - open(meta_file, "wt").write("".join(recipe)) - #### END OF HACK - def set_environment(name, value, env=os.environ): """Function to setup the environment variable and print debug message. diff --git a/bob/devtools/build.py b/bob/devtools/build.py index 101379960fdb1a9c4608dfb01259500849de98a1..35a184756afd9ab77720b07784fa519de6f6e267 100644 --- a/bob/devtools/build.py +++ b/bob/devtools/build.py @@ -256,7 +256,7 @@ def exists_on_channel(channel_url, basename): candidate = urls[other_build_numbers.index(self_build_number)] pkg_type = '.conda' if basename.endswith('.conda') else '.tar.bz2' if candidate.endswith(pkg_type): #match - return "".join(channel_url, candidate) + return "".join((channel_url, candidate)) def remove_pins(deps): diff --git a/bob/devtools/templates/conda/meta.yaml b/bob/devtools/templates/conda/meta.yaml index 3a8517fdf42ea69bfd0c2b476a7d34b62014ed37..575b699784c46cdca1041b38fe7ef74c59cdbccd 100644 --- a/bob/devtools/templates/conda/meta.yaml +++ b/bob/devtools/templates/conda/meta.yaml @@ -56,4 +56,3 @@ about: home: https://www.idiap.ch/software/(( group ))/ license: (% if license == 'gplv3' %)GNU General Public License v3 (GPLv3)(% else %)BSD 3-Clause(% endif %) license_family: (% if license == 'gplv3' %)GPL(% else %)BSD(% endif %) - license_file: (% if license == 'gplv3' %)../COPYING(% else %)../LICENSE(% endif %) diff --git a/conda/meta.yaml b/conda/meta.yaml index df6141cd536413625bc1e6434408f5e7af3c74ba..43c37974c39fb2029f9895f6ff8013d2e7979b68 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -103,7 +103,7 @@ test: - bdt dav clean-betas --help - bdt dav upload --help - bdt gitlab process-pipelines --help - - bdt gitlab get-pipelines --help + - bdt gitlab get-pipelines --help - sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc sphinx - if [ -n "${CI_PROJECT_DIR}" ]; then mv sphinx "${CI_PROJECT_DIR}/"; fi @@ -112,4 +112,3 @@ about: license: BSD 3-Clause summary: Tools for development and CI integration of Bob packages license_family: BSD - license_file: ../LICENSE