From ebea84e5eda7d93c7e4789a9bb88aefd9ea7b33e Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Thu, 14 Nov 2019 15:04:54 +0100
Subject: [PATCH] [conda] Completely remove "license_file" entry on conda
 recipes

---
 bob/devtools/bootstrap.py              | 23 ++---------------------
 bob/devtools/templates/conda/meta.yaml |  1 -
 conda/meta.yaml                        |  1 -
 3 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/bob/devtools/bootstrap.py b/bob/devtools/bootstrap.py
index d5df3753..f565e26b 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
 
     """
 
@@ -69,25 +69,6 @@ def do_hack(project_dir):
         os.unlink(git_ignore_file)
     #### END OF HACK
 
-    #### HACK that avoids this issue:
-    #### https://github.com/conda/conda-build/issues/3767
-    candidates = ["LICENSE", "LICENSE.AGPL", "COPYING"]
-    for k in candidates:
-        license_file = os.path.join(project_dir, k)
-        if not os.path.exists(license_file):
-            continue
-
-        recipe_dir = os.path.join(project_dir, "conda")
-        if os.path.exists(recipe_dir):
-            logger.warning(
-                "Copying %s file to conda-recipe dir to avoid issue "
-                "with conda-build "
-                "(see: https://github.com/conda/conda-build/issues/3767)",
-                k,
-            )
-            shutil.copy(license_file, recipe_dir)
-    #### 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/templates/conda/meta.yaml b/bob/devtools/templates/conda/meta.yaml
index d9b002ca..575b6997 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 d9da932f..43c37974 100644
--- a/conda/meta.yaml
+++ b/conda/meta.yaml
@@ -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
-- 
GitLab