Added LICENSE.AGPL in the hack

parent 633d2e75
Pipeline #34369 passed with stages
in 5 minutes and 48 seconds
......@@ -65,21 +65,20 @@ def do_hack(project_dir):
#### HACK that avoids this issue:
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.warn('Copying LICENSE file to `./conda` dir to avoid issue with conda build (')
logger.warn('Replacing ../LICENSE to LICENSE (')
shutil.copyfile(license_file, os.path.join(recipe_dir,"LICENSE"))
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')
shutil.copyfile(copying_file, os.path.join(recipe_dir,"COPYING"))
agpl_file = os.path.join(project_dir, 'LICENSE.AGPL')
shutil.copyfile(agpl_file, os.path.join(recipe_dir,"LICENSE.AGPL"))
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]
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment