conda-forge / conda-smithy

The tool for managing conda-forge feedstocks.
https://conda-forge.org/
BSD 3-Clause "New" or "Revised" License
148 stars 176 forks source link

ValueError when rerendering feedstock to include windows support #889

Open duncanmmacleod opened 6 years ago

duncanmmacleod commented 6 years ago

I am seeing the following error when trying to run conda smithy rerender after enabling windows builds for a project:

$ conda smithy rerender
...
Adding in variants from /Users/duncan/opt/miniconda3/conda_build_config.yaml
Traceback (most recent call last):
  File "/Users/duncan/opt/miniconda3/bin/conda-smithy", line 10, in <module>
    sys.exit(main())
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_smithy/cli.py", line 278, in main
    args.subcommand_func(args)
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_smithy/cli.py", line 186, in __call__
    exclusive_config_file=args.exclusive_config_file)
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_smithy/configure_feedstock.py", line 996, in main
    render_appveyor(env, config, forge_dir)
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_smithy/configure_feedstock.py", line 758, in render_appveyor
    platform_specific_setup=_appveyor_specific_setup)
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_smithy/configure_feedstock.py", line 479, in _render_ci_provider
    configs.extend(dump_subspace_config_files(metas, forge_dir, platform))
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_smithy/configure_feedstock.py", line 352, in dump_subspace_config_files
    configs, top_level_loop_vars = _collapse_subpackage_variants(metas)
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_smithy/configure_feedstock.py", line 294, in _collapse_subpackage_variants
    'ignore_version', 'ignore_build_only_deps'})
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_build/variants.py", line 402, in dict_of_lists_to_list_of_dicts
    for group in _get_zip_groups(dict_of_lists):
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_build/variants.py", line 362, in _get_zip_groups
    groups.append(_get_zip_dict_of_lists(combined_variant, group))
  File "/Users/duncan/opt/miniconda3/lib/python3.6/site-packages/conda_build/variants.py", line 345, in _get_zip_dict_of_lists
    key, combined_variant[key]))
ValueError: zip field python (('3.6', '3.5')) length does not match zip field vc (('14', '9', '14')) length.  All zip fields within a group must be the same length.

The project branch is here: https://github.com/duncanmmacleod/nds2-client-swig-feedstock/tree/windows-test - I rerendered once, then added the windows files, and tried to rerender again and got the above error.

My default assumption is user error, so please correct me if so, otherwise any help in debugging/workaround is greatly appreciated.

ocefpaf commented 6 years ago

ValueError: zip field python (('3.6', '3.5')) length does not match zip field vc (('14', '9', '14')) length. All zip fields within a group must be the same length.

Check your conda_build_config.yaml b/c it looks like it is trying to match 2 Python versions to 3 corresponding vcs, you need 1-1 there.

duncanmmacleod commented 6 years ago

@ocefpaf, my conda_build_config.yaml is exactly as provided by conda-forge-pinning:

...
python:
  - 2.7
  - 3.5
  - 3.6
  - 3.7  # [(environ.get('CF_MAX_PY_VER', '') >= '37')]
...
vc:                    # [win]
  - 9                  # [win]
  - 14                 # [win]
  - 14                 # [win]
  - 14                 # [win and (environ.get('CF_MAX_PY_VER', '') >= '37')]
...
ocefpaf commented 6 years ago

looks OK to me :-/

We need to check if there is a local file overriding that. Can you take a look at what you have in the directory .ci_support?

duncanmmacleod commented 6 years ago

@ocefpaf, the .ci_support directory is here:

https://github.com/duncanmmacleod/nds2-client-swig-feedstock/tree/windows-test/.ci_support

It contains files only for osx and linux.

isuruf commented 6 years ago

This is a bug in conda-build I've run into before. Try changing the line at https://github.com/duncanmmacleod/nds2-client-swig-feedstock/blob/windows-test/recipe/meta.yaml#L16 to #[win and py<35]

ocefpaf commented 6 years ago

Thanks @isuruf! I was lost here but now I actually remember I saw that before.

Sorry @duncanmmacleod for the faulty memory :smile:

duncanmmacleod commented 6 years ago

@ocefpaf, @isuruf, unfortunately that doesn't fix my problem, I now get a similar but subtly different error message:

ValueError: zip field python (('3.5', '3.6')) length does not match zip field c_compiler (('vs2015', 'vs2015', 'vs2008')) length.  All zip fields within a group must be the same length.

Can this ticket be reopened?

isuruf commented 6 years ago

Can you try ?

skip: True   # [win and vc<14]
skip: True   # [win and py<35]
duncanmmacleod commented 6 years ago

@isuruf, back to the first error:

ValueError: zip field python (('3.6', '3.5')) length does not match zip field vc (('14', '9', '14')) length.  All zip fields within a group must be the same length.
duncanmmacleod commented 6 years ago

Can this ticket be reopened, since my issue has not been identified/resolved?