Skip to content

Commit

Permalink
clarify numpy variant example
Browse files Browse the repository at this point in the history
Make it clear that you would be building two different numpy dependent
packages by giving them different names and add a little bit more prose
to explain the first example that doesn't pin numpy.
  • Loading branch information
timsnyder committed Apr 16, 2017
1 parent a65d9c8 commit 3acab8d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/source/building/variants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ meta.yaml:
.. code-block:: yaml
package:
name: numpy_using_thing
name: numpy_using_pythonAPI_thing
version: 1.0
requirements:
Expand All @@ -132,15 +132,19 @@ meta.yaml:
- numpy
This example demonstrates a particular feature: reduction of builds when pins
are unnecessary. There's more information at `Avoiding unnecessary builds`_. To
are unnecessary. Since the example recipe above only requires the Python API to
numpy, we will only build the package once and the version of numpy will not be pinned
at runtime to match the compile-time version. There's more information at `Avoiding unnecessary builds`_.

For a different package that makes use of the numpy C API, we will need to
actually pin numpy in this recipe (and only in this recipe, so that other
recipes don't unnecessarily build lots of variants), it is sufficient to add a
pin to numpy. You can use the variant key directly in meta.yaml:
recipes don't unnecessarily build lots of variants). To pin numpy, you can
use the variant key directly in meta.yaml:

.. code-block:: yaml
package:
name: numpy_using_thing
name: numpy_using_cAPI_thing
version: 1.0
requirements:
Expand Down

0 comments on commit 3acab8d

Please sign in to comment.