VC features

jakirkham edited this page Mar 25, 2017 · 14 revisions

Conda builds Windows packages with features as a means of keeping the Visual Studio version (vc) used to build packages uniform across a given Python version.

Rule of thumb

  • if it's a shared library that something other than Python will use, you only need python in build to activate features. You need the features block;
  • if it is a shared library that is tied to a Python API (e.g. Boost Python), you need BOTH, and the features block.
  • if it is a library that has compiled content, but is used only from Python, you need Python in both build and runtime requirements, but you do NOT need the features block.

To provide features add the following lines to the build section:

build:
    features:
        - vc9   # [win and py27]
        - vc10  # [win and py34]
        - vc14  # [win and py35]
        - vc14  # [win and py36]

Also, add a python dependency to the build requirements (unless it is already a requirement like NumPy for instance). And the vc packages for each Python at build and run.

requirements:
  build:
    - python  # [win]
    - vc 9    # [win and py27]
    - vc 10   # [win and py34]
    - vc 14   # [win and py35]
    - vc 14   # [win and py36]
  run:
    - vc 9    # [win and py27]
    - vc 10   # [win and py34]
    - vc 14   # [win and py35]
    - vc 14   # [win and py36]

See: https://github.com/conda/conda/wiki/VC-features

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.