Skip to content
Snippets Groups Projects
Commit afadbd0a authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Make sure the version of setuptools matches the one in bob-devel

parent 39fe4fac
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
......@@ -123,7 +123,7 @@ pillow:
scipy:
- 0.19
setuptools:
- 36.5.0
- 38.4.0
six:
- 1.11.0
sphinx:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment