Skip to content

Commit

Permalink
Merge pull request #99 from pelson/set_conda_py_version_for_non_cli_too
Browse files Browse the repository at this point in the history
Moved the location of the CONDA_NPY fudge so that non CLI users benefit.
  • Loading branch information
pelson committed Mar 26, 2016
2 parents 7253017 + 7470c89 commit 6e37d85
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 0 additions & 7 deletions conda_smithy/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ def __call__(self, args):
"conda-recipe you want to build a feedstock for. Got {}".format(
args.recipe_directory))

# conda-build has some really fruity behaviour where it needs CONDA_NPY
# and CONDA_PY in order to even read a meta. Because we compute version
# matricies anyway the actual number makes absolutely no difference.
import conda_build.config
conda_build.metadata.config.CONDA_NPY = '99.9'
conda_build.metadata.config.CONDA_PY = 10

# Get some information about the source recipe.
if args.recipe_directory:
meta = MetaData(args.recipe_directory)
Expand Down
8 changes: 8 additions & 0 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ def main(forge_file_directory):
tmplt_dir]))

copy_feedstock_content(forge_dir)

# conda-build has some really fruity behaviour where it needs CONDA_NPY
# and CONDA_PY in order to even read a meta. Because we compute version
# matricies anyway the actual number makes absolutely no difference.
import conda_build.config
conda_build.metadata.config.CONDA_NPY = '99.9'
conda_build.metadata.config.CONDA_PY = 10

render_run_docker_build(env, config, forge_dir)
render_travis(env, config, forge_dir)
render_appveyor(env, config, forge_dir)
Expand Down
2 changes: 1 addition & 1 deletion conda_smithy/templates/travis.yml.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{%- set conda_vars = {'python': 'CONDA_PY', 'numpy': 'CONDA_NPY'} -%}
{% macro matrix_env(matrix_item) -%}
{% for dep_name, version in matrix_item | sort %}{%- if dep_name in conda_vars %}{% set version = version|replace('.', '') %}{% endif -%}
{{ conda_vars.get(dep_name, 'CONDA_' + dep_name|upper) }}={{ version }} {% endfor %}
{{ conda_vars.get(dep_name, 'CONDA_' + dep_name|upper) }}={{ version }}{% if not loop.last %} {% endif %}{% endfor %}
{%- endmacro %}
# This file was generated automatically from conda-smithy. To update this configuration,
# update the conda-forge.yaml and/or the recipe/meta.yaml.
Expand Down

0 comments on commit 6e37d85

Please sign in to comment.