Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the recommended alternative to use '-' in keys in CBC.yaml ? #2885

Closed
nehaljwani opened this issue May 16, 2018 · 2 comments
Closed
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@nehaljwani
Copy link
Contributor

nehaljwani commented May 16, 2018

I wanted to add mysql-connector-c, which provides libmysqlclient.so

(base) [nwani@somemachine 1526468208 ]$ conda build . -m conda_build_config.yaml 
Traceback (most recent call last):
  File "/spare/local/nwani/conda/root/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/spare/local/nwani/conda/root/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 420, in main
    execute(sys.argv[1:])
  File "/spare/local/nwani/conda/root/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 411, in execute
    verify=args.verify)
  File "/spare/local/nwani/conda/root/lib/python2.7/site-packages/conda_build/api.py", line 199, in build
    notest=notest, need_source_download=need_source_download, variants=variants)
  File "/spare/local/nwani/conda/root/lib/python2.7/site-packages/conda_build/build.py", line 2078, in build_tree
    bypass_env_check=True)
  File "/spare/local/nwani/conda/root/lib/python2.7/site-packages/conda_build/render.py", line 659, in render_recipe
    variants = get_package_variants(m, variants=variants)
  File "/spare/local/nwani/conda/root/lib/python2.7/site-packages/conda_build/variants.py", line 487, in get_package_variants
    raise ValueError("Error in config {}: {}".format(f, str(e)))
ValueError: Error in config /spare/scratch/1526468208/conda_build_config.yaml: Variant configuration errors: 
['"-" is a disallowed character in variant keys.  Key was: some-pkg']
@msarahan
Copy link
Contributor

conda-build matches package names with keys from CBC.yaml by treating - and _ as equivalent. Use - where appropriate for package names, and use _ in CBC.yaml.

Side note: this is not true for pin_run_as_build, which conda-forge has recently pointed out. For pin_run_as_build, the package name keys must match the keys under pin_run_as_build. Discussion at conda-forge/conda-forge-pinning-feedstock#58 (comment)

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Oct 30, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Nov 30, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants