Repository: conda/conda-build

Issue:
conda 4.1.x incompatibilities introduced in 2.0.9
The `2.0.9` release appears to have introduced incompatibilities with `conda` version `4.1.x` despite noting [compatibility]( https://github.com/conda/conda-build/blob/7016ee81371a26970583cf292f2eb331d51362c1/conda.recipe/meta.yaml#L26 ). In particular, this [import]( https://github.com/conda/conda-build/compare/2.0.8...2.0.9#diff-6d8cb4644da89eaf24a8c9617a738d55R27 ) and this [import]( https://github.com/conda/conda-build/compare/2.0.8...2.0.9#diff-6d8cb4644da89eaf24a8c9617a738d55R28 ) are not available in `conda` version `4.1.x`. Either this release needs to bump its version constraint (and thus arguably be a major or at least minor version change) or compatibility should be restored.

cc @scopatz


Discussion:
At least for near term problems, it would be nice if either this `conda-build` version were pulled or at a bare minimum hot-fixed to have the right version constraint w.r.t. `conda`.

Also would like to ask that the CI version matrix be expanded to include all minor versions of `conda` that are currently supported in the future so as to avoid this sort of problem.

John, have you ever seen "The Big Lebowski?"  How well received are your bug reports that tell people what to do, in general?

> would like to ask that the CI version matrix be expanded to include all minor versions of conda that are currently supported in the future so as to avoid this sort of problem.

We do try to do this, but it seems there is a problem:

https://github.com/conda/conda-build/blob/master/.travis.yml#L36
https://travis-ci.org/conda/conda-build/jobs/175208215#L237
https://travis-ci.org/conda/conda-build/jobs/175208215#L360

`auto_update_conda: false` is not being respected.  I'll raise this on the conda issue tracker.  In the meantime, please put your finger down.

Sorry, if that came off as harsh, was a bit surprised by this sort of break.


Resolving patch:
diff --git a/conda_build/build.py b/conda_build/build.py
--- a/conda_build/build.py
+++ b/conda_build/build.py
@@ -59,7 +59,6 @@
 from conda_build.features import feature_list
 
 import conda_build.noarch_python as noarch_python
-from .config import context
 from conda_verify.verify import Verify
 
 
@@ -822,10 +821,10 @@ def order(f):
 
         if not getattr(config, "noverify", False):
             verifier = Verify()
-            ignore_scripts = context.ignore_package_verify_scripts if \
-                context.ignore_package_verify_scripts else None
-            run_scripts = context.run_package_verify_scripts if \
-                context.run_package_verify_scripts else None
+            ignore_scripts = config.ignore_package_verify_scripts if \
+                config.ignore_package_verify_scripts else None
+            run_scripts = config.run_package_verify_scripts if \
+                config.run_package_verify_scripts else None
             verifier.verify_package(ignore_scripts=ignore_scripts, run_scripts=run_scripts,
                                     path_to_package=path)
 
@@ -1075,10 +1074,10 @@ def build_tree(recipe_list, config, build_only=False, post=False, notest=False,
                                                                     config=recipe_config)
         if not getattr(config, "noverify", False):
             verifier = Verify()
-            ignore_scripts = context.ignore_recipe_verify_scripts if \
-                context.ignore_recipe_verify_scripts else None
-            run_scripts = context.run_recipe_verify_scripts if \
-                context.run_recipe_verify_scripts else None
+            ignore_scripts = config.ignore_recipe_verify_scripts if \
+                config.ignore_recipe_verify_scripts else None
+            run_scripts = config.run_recipe_verify_scripts if \
+                config.run_recipe_verify_scripts else None
             verifier.verify_recipe(ignore_scripts=ignore_scripts, run_scripts=run_scripts,
                                    rendered_meta=metadata.meta, recipe_dir=metadata.path)
         try:
diff --git a/conda_build/conda_interface.py b/conda_build/conda_interface.py
--- a/conda_build/conda_interface.py
+++ b/conda_build/conda_interface.py
@@ -24,8 +24,6 @@
 import conda.config as cc  # NOQA
 from conda.config import rc_path  # NOQA
 from conda.version import VersionOrder  # NOQA
-from conda.base.constants import SEARCH_PATH
-from conda.common.configuration import Configuration, SequenceParameter
 
 if parse_version(conda.__version__) >= parse_version("4.2"):
     # conda 4.2.x
diff --git a/conda_build/config.py b/conda_build/config.py
--- a/conda_build/config.py
+++ b/conda_build/config.py
@@ -10,14 +10,9 @@
 from os.path import abspath, expanduser, join
 import sys
 import time
-import yaml
 
-from .conda_interface import string_types, binstar_upload
 from .conda_interface import root_dir, root_writable, cc, subdir, platform
-from .conda_interface import string_types, binstar_upload, rc_path
-from .conda_interface import root_dir, root_writable, cc, subdir, bits, platform
-from .conda_interface import SEARCH_PATH
-from .conda_interface import Configuration, SequenceParameter
+from .conda_interface import string_types, binstar_upload
 
 from .utils import get_build_folders, rm_rf
 
@@ -114,7 +109,15 @@ def env(lang, default):
                   Setting('arch', subdir.split('-')[-1]),
                   Setting('platform', platform),
                   Setting('set_build_id', True),
-                  Setting('disable_pip', False)
+                  Setting('disable_pip', False),
+                  Setting('ignore_recipe_verify_scripts',
+                          cc.rc.get('conda-build', {}).get('ignore_recipe_verify_scripts', [])),
+                  Setting('ignore_package_verify_scripts',
+                          cc.rc.get('conda-build', {}).get('ignore_package_verify_scripts', [])),
+                  Setting('run_recipe_verify_scripts',
+                          cc.rc.get('conda-build', {}).get('run_package_verify_scripts', [])),
+                  Setting('run_package_verify_scripts',
+                          cc.rc.get('conda-build', {}).get('run_package_verify_scripts', [])),
                   ]
 
         # handle known values better than unknown (allow defaults)
@@ -415,20 +418,5 @@ def show(config):
 croot = Config().croot
 
 
-class Context(Configuration):
-    ignore_recipe_verify_scripts = SequenceParameter(string_types)
-    ignore_package_verify_scripts = SequenceParameter(string_types)
-    run_recipe_verify_scripts = SequenceParameter(string_types)
-    run_package_verify_scripts = SequenceParameter(string_types)
-
-
-def reset_context(search_path=SEARCH_PATH, argparse_args=None):
-    context.__init__(search_path, conda_build, argparse_args)
-    return context
-
-
-context = Context(SEARCH_PATH, conda_build, None)
-
-
 if __name__ == '__main__':
     show(Config())


Test patch: