diff --git a/conda/conda-bootstrap.py b/conda/conda-bootstrap.py index 47a0e77771862cca8e80c531beaca5227c2f0556..a97fc2956373ed9550255c716688dd7c92eec34b 100755 --- a/conda/conda-bootstrap.py +++ b/conda/conda-bootstrap.py @@ -52,20 +52,17 @@ def get_rendered_recipe(python, path): if path.endswith('meta.yaml'): path = os.path.dirname(path) - with tempfile.NamedTemporaryFile(dir=path, mode='wt', suffix='.yaml') as f: + with tempfile.TemporaryDirectory(dir=path, suffix='.tmp') as d: - # writes a temporary recipe with an injected version of bob-devel + # writes a temporary recipe without bob-devel orig = os.path.join(path, 'meta.yaml') contents = open(orig).read() - import pdb; pdb.set_trace() - result = re.search(r'^requirements:.*run:\s*\n', contents, re.MULTILINE) + result = re.search(r'requirements:\s*\n\s*host:\s*\n', contents) contents = contents[:result.end()] + \ ' - bob-devel {{ bob_devel }}.*\n' + \ contents[result.end():] - f.write(contents) - f.flush() - - cmd = [CONDA, 'render'] + get_buildopt(python) + [f.name] + with open(os.path.join(d, 'meta.yaml'), 'wt') as f: f.write(contents) + cmd = [CONDA, 'render'] + get_buildopt(python) + [d] print('$ ' + ' '.join(cmd)) env = copy.copy(os.environ) env['CONDARC'] = get_condarc() @@ -77,12 +74,17 @@ def parse_dependencies(python, path): recipe = get_rendered_recipe(python, path) return recipe['requirements'].get('host', []) + \ recipe['requirements'].get('build', []) + \ - recipe.get('test', {}).get('requires', []) + recipe['requirements'].get('run', []) + \ + recipe.get('test', {}).get('requires', []) + \ + ['bob.buildout'] #extra packages required for local dev def conda_install(subcmd, env, packages): - packages = [k.replace(' ', '=') for k in packages] - cmd = [CONDA, subcmd, '--yes', '--name', env] + packages + specs = [] + for k in packages: + if any(elem in k for elem in '><|'): specs.append(k.replace(' ', '')) + else: specs.append(k.replace(' ', '=')) + cmd = [CONDA, subcmd, '--yes', '--name', env] + specs print('$ ' + ' '.join(cmd)) env = copy.copy(os.environ) env['CONDARC'] = get_condarc() diff --git a/gitlab/conda_build_config.yaml b/gitlab/conda_build_config.yaml index 8a568f8f20d853821b89cd1cd84a8ccae185018a..524f82d043cf0b68922feed8d892917b274500a5 100644 --- a/gitlab/conda_build_config.yaml +++ b/gitlab/conda_build_config.yaml @@ -123,7 +123,7 @@ pillow: scipy: - 0.19 setuptools: - - 36.5.0 + - 38.4.0 six: - 1.11.0 sphinx: