Repository: bokeh/bokeh

Issue:
Start building new conda no-arch packages for bokeh channel
Running `conda-convert` to generate many different platform specific packages takes a very long time on TravisCI, enough that there is some risk that the deploy job could overrun the Travis job limit and be aborted. This issue is to switch the build to use the new conda "noarch" packages for the packages deployed to the bokeh channel on anaconda.org automatically. Note that the packages built by CIO for the "defaults" channel would not be affected by this change. 

This should include accompanying documentation noting that conda >= 4.3 is required to install "noarch" packages. 

Propose to make the change before `0.12.7dev1`

ping @bokeh/dev 



Discussion:

Resolving patch:
diff --git a/scripts/build_upload.py b/scripts/build_upload.py
--- a/scripts/build_upload.py
+++ b/scripts/build_upload.py
@@ -45,8 +45,6 @@ def yellow(text): return text
 STARTED = "STARTED BUT NOT COMPLETED"
 COMPLETED = "COMPLETED"
 
-PLATFORMS = "osx-64 win-32 win-64 linux-32 linux-64".split()
-
 class config(object):
 
     # This excludes "local" build versions, e.g. 0.12.4+19.gf85560a
@@ -129,8 +127,6 @@ def cd(dir):
     print("+cd %s    [now: %s]" % (dir, os.getcwd()))
 
 def clean():
-    for plat in PLATFORMS:
-        run("rm -rf %s" % plat)
     run("rm -rf dist/")
     run("rm -rf build/")
     run("rm -rf bokeh.egg-info/")
@@ -312,17 +308,7 @@ def check_cdn_creds():
 
 @build_wrapper('conda')
 def build_conda_packages():
-    for v in "27 34 35 36".split():
-        # TODO (bev) remove --no-test when conda problems resolved
-        run("conda build conda.recipe --quiet --no-test", CONDA_PY=v)
-        # TODO (bev) make platform detected or configurable
-
-    # TravisCI will time out if this is all run with one command, problem
-    # should go away when new no-arch pkgs canbe used
-    files = glob.glob('/home/travis/miniconda/conda-bld/linux-64/bokeh*')
-    for file in files:
-        for plat in PLATFORMS:
-            run("conda convert -p %s %s" % (plat, file))
+    run("conda build conda.recipe --quiet --build-only")
 
 @build_wrapper('sdist')
 def build_sdist_packages():
@@ -370,10 +356,9 @@ def upload_anaconda(token, dev):
     else:
         cmd = "anaconda -t %s upload -u bokeh %s --force --no-progress"
 
-    for plat in PLATFORMS:
-        files = glob.glob("%s/bokeh*.tar.bz2" % plat)
-        for file in files:
-            run(cmd % (token, file), fake_cmd=cmd % ("<hidden>", file))
+    files = glob.glob("/home/travis/miniconda/conda-bld/noarch/bokeh*.tar.bz2")
+    for file in files:
+        run(cmd % (token, file), fake_cmd=cmd % ("<hidden>", file))
 
     files = glob.glob("dist/bokeh*.tar.gz")
     for file in files:
diff --git a/sphinx/source/docs/user_guide/examples/plotting_color_bars.py b/sphinx/source/docs/user_guide/examples/plotting_color_bars.py
--- a/sphinx/source/docs/user_guide/examples/plotting_color_bars.py
+++ b/sphinx/source/docs/user_guide/examples/plotting_color_bars.py
@@ -1,16 +1,17 @@
 import numpy as np
-from matplotlib.mlab import bivariate_normal
 
 from bokeh.plotting import figure, output_file, show
 from bokeh.models import LogColorMapper, LogTicker, ColorBar
 
 output_file('color_bar.html')
 
-N = 100
-X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)]
-Z1 = bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0) +  \
-    0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
-image = Z1 * 1e6
+def normal2d(X, Y, sigx=1.0, sigy=1.0, mux=0.0, muy=0.0):
+    z = (X-mux)**2 / sigx**2 + (Y-muy)**2 / sigy**2
+    return np.exp(-z/2) / (2 * np.pi * sigx * sigy)
+
+X, Y = np.mgrid[-3:3:100j, -2:2:100j]
+Z = normal2d(X, Y, 0.1, 0.2, 1.0, 1.0) + 0.1*normal2d(X, Y, 1.0, 1.0)
+image = Z * 1e6
 
 color_mapper = LogColorMapper(palette="Viridis256", low=1, high=1e7)
 


Test patch:
diff --git a/tests/test_python_execution_with_OO.py b/tests/test_python_execution_with_OO.py
--- a/tests/test_python_execution_with_OO.py
+++ b/tests/test_python_execution_with_OO.py
@@ -21,6 +21,12 @@ def test_python_execution_with_OO():
             if file.endswith("__main__.py"):
                 continue
 
+            # XXX These are so we can avoid the cost of installing MPL on Travis.
+            # Can be removed on Bokeh 1.0 when MPL compat is fully removed
+            if file.endswith("mpl.py") or "compat" in path:
+                continue
+            if "charts" in path: continue
+
             if file.endswith("__init__.py"):
                 mod = path.replace("/", ".")
             else: