For certain kinds of meta-packages, the build/pin_depends
option is really useful. It looks like Boa once had support with 95cab54:
|
def write_info_json(m): |
|
info_index = m.info_index() |
|
if m.pin_depends: |
|
# Wtih 'strict' depends, we will have pinned run deps during rendering |
|
if m.pin_depends == 'strict': |
|
runtime_deps = m.meta.get('requirements', {}).get('run', []) |
|
info_index['depends'] = runtime_deps |
|
else: |
|
runtime_deps = environ.get_pinned_deps(m, 'run') |
|
with open(join(m.config.info_dir, 'requires'), 'w') as fo: |
|
fo.write("""\ |
|
# This file as created when building: |
|
# |
|
# %s.tar.bz2 (on '%s') |
|
# |
|
# It can be used to create the runtime environment of this package using: |
|
# $ conda create --name <env> --file <this file> |
|
""" % (m.dist(), m.config.build_subdir)) |
|
for dist in sorted(runtime_deps + [' '.join(m.dist().rsplit('-', 2))]): |
|
fo.write('%s\n' % '='.join(dist.split())) |
|
|
|
# Deal with Python 2 and 3's different json module type reqs |
|
mode_dict = {'mode': 'w', 'encoding': 'utf-8'} if PY3 else {'mode': 'wb'} |
|
with open(join(m.config.info_dir, 'index.json'), **mode_dict) as fo: |
|
json.dump(info_index, fo, indent=2, sort_keys=True) |
but it was removed not long after with bbc1713.
Current schema model notes that no usage was found:
|
# pin_depends: Optional[str] -- did not find usage anywhere, removed |
but well, I'd like to use it, and I know the anaconda
meta-package also uses it. :-)