bioconda / bioconda-utils

Utilities for building and managing bioconda recipes
MIT License
97 stars 133 forks source link

"Determining expected packages" fails with misleading error #546

Open epruesse opened 5 years ago

epruesse commented 5 years ago

Package requiring non-existand seqan package lead to this error (recipe SoftSV):

ping @cbrueffer

18:14:39 BIOCONDA INFO Determining expected packages
Setting build platform. This is only useful when pretending to be on another platform, such as for rendering necessary dependencies on a non-native platform. I trust that you know what you're doing.
No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.11
Adding in variants from internal_defaults
Adding in variants from /home/circleci/project/miniconda/conda_build_config.yaml
Adding in variants from /home/circleci/project/miniconda/lib/python3.6/site-packages/bioconda_utils/bioconda_utils-conda_build_config.yaml
Attempting to finalize metadata for softsv
Collecting package metadata: ...working... done
Solving environment: ...working... done
Collecting package metadata: ...working... done
Solving environment: ...working... failed
Collecting package metadata: ...working... done
Solving environment: ...working... failed
Traceback (most recent call last):
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda/models/version.py", line 38, in __call__
    return cls._cache_[arg]
KeyError: '>=2.4.1,<2.5.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/circleci/project/miniconda/bin/bioconda-utils", line 10, in <module>
    sys.exit(main())
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/bioconda_utils/cli.py", line 897, in main
    bioconductor_skeleton, clean_cran_skeleton, autobump, bot
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/argh/dispatching.py", line 328, in dispatch_commands
    dispatch(parser, *args, **kwargs)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/argh/dispatching.py", line 174, in dispatch
    for line in lines:
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/argh/dispatching.py", line 277, in _execute_command
    for line in result:
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/argh/dispatching.py", line 260, in _call
    result = function(*positional, **keywords)
  File "<boltons.funcutils.FunctionBuilder-2>", line 2, in build
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/bioconda_utils/cli.py", line 56, in wrapper
    func(*args, **kwargs)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/bioconda_utils/cli.py", line 443, in build
    label=label,
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/bioconda_utils/build.py", line 405, in build_recipes
    force=force)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/bioconda_utils/utils.py", line 999, in get_package_paths
    platform, metas = _load_platform_metas(recipe, finalize=True)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/bioconda_utils/utils.py", line 923, in _load_platform_metas
    return platform, load_all_meta(recipe, config=config, finalize=finalize)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/bioconda_utils/utils.py", line 378, in load_all_meta
    bypass_env_check=bypass_env_check,
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda_build/api.py", line 51, in render
    bypass_env_check=bypass_env_check):
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda_build/metadata.py", line 2038, in get_output_metadata_set
    bypass_env_check=bypass_env_check)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda_build/metadata.py", line 721, in finalize_outputs_pass
    permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda_build/render.py", line 550, in finalize_metadata
    for dep in run_deps]
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda_build/render.py", line 550, in <listcomp>
    for dep in run_deps]
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda_build/render.py", line 184, in get_pin_from_build
    pin = utils.apply_pin_expressions(version.split()[0], **pin_cfg)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda_build/utils.py", line 1329, in apply_pin_expressions
    parsed_version = VersionOrder(version).version[1:]
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda/models/version.py", line 40, in __call__
    val = cls._cache_[arg] = super(SingleStrArgCachingType, cls).__call__(arg)
  File "/home/circleci/project/miniconda/lib/python3.6/site-packages/conda/models/version.py", line 171, in __init__
    raise InvalidVersionSpec(vstr, "invalid character(s)")
conda.exceptions.InvalidVersionSpec: Invalid version '>=2.4.1,<2.5.0': invalid character(s)
Exited with code 1
epruesse commented 5 years ago

This is another instance of conda_build.api.render failing in weird ways that needs to be caught and re-handled. :(

epruesse commented 5 years ago

Looks like api.render fails when there is a pin in the conda_build_config and a range in the build requirements.