<html><body>
<p>5 new commits in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/d44c9b732d8a/">https://bitbucket.org/yt_analysis/yt/commits/d44c9b732d8a/</a> Changeset:   d44c9b732d8a Branch:      yt User:        atmyers Date:        2016-03-20 21:39:06+00:00 Summary:     do not print a warning about Embree not being set up unless an Embree test compile fails Affected #:  1 file</p>
<p>diff -r ff8cdfb114c333124655223ef7b0aaffd01455bc -r d44c9b732d8a13bac7e9d374e50c345466ff7a13 setupext.py --- a/setupext.py +++ b/setupext.py @@ -74,17 +74,58 @@</p>
<pre>    '''

    rd = os.environ.get('EMBREE_DIR')</pre>
<ul><li><p>if rd is not None:</p></li>
<li><p>return rd</p></li>
<li><p>print("EMBREE_DIR not set. Attempting to read embree.cfg")</p></li></ul>
<p>+    if rd is None: +        try: +            rd = open("embree.cfg").read().strip() +        except IOError: +            rd = ‘/usr/local’ + +    fail_msg = “Pyembree is installed, but I could not compile Embree test code. \n” + \ +               “Attempted to find Embree headers in %s. \n” % rd + \ +               “If this is not correct, please set your correct embree location \n” + \ +               “using EMBREE_DIR environment variable or your embree.cfg file. \n” + \ +               "Please see <a href="http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html">http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html</a> " + \ +               “for more information.” + +    # Create a temporary directory +    tmpdir = tempfile.mkdtemp() +    curdir = os.getcwd() +</p>
<pre>try:</pre>
<ul><li><p>rd = open("embree.cfg").read().strip()</p></li>
<li><p>return rd</p></li>
<li><p>except IOError:</p></li>
<li><p>print("Reading Embree location from embree.cfg failed.")</p></li>
<li><p>print("If compilation fails, please place the base directory")</p></li>
<li><p>print("of your Embree install in embree.cfg and restart.")</p></li>
<li><p>return ‘/usr/local’</p></li></ul>
<p>+        os.chdir(tmpdir) + +        # Get compiler invocation +        compiler = os.getenv('CXX', ‘c++’) +        compiler = compiler.split(' ‘) + +        # Attempt to compile a test script. +        filename = r'test.cpp’ +        file = open(filename, ‘wt’, 1) +        file.write( +            ‘#include "embree2/rtcore.h"\n’ +            ‘int main() {\n’ +            ‘return 0;\n’ +            ‘}’ +        ) +        file.flush() +        with open(os.devnull, ‘w’) as fnull: +            exit_code = subprocess.call(compiler + ['-I%s/include/' % rd, filename], +                             stdout=fnull, stderr=fnull) + +        # Clean up +        file.close() + +    except OSError: +        print fail_msg + +    finally: +        os.chdir(curdir) +        shutil.rmtree(tmpdir) + +    if exit_code != 0: +        print fail_msg + +    return rd</p>
<pre>def get_mercurial_changeset_id(target_dir):</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/6753e090c2b5/">https://bitbucket.org/yt_analysis/yt/commits/6753e090c2b5/</a> Changeset:   6753e090c2b5 Branch:      yt User:        atmyers Date:        2016-03-20 21:45:58+00:00 Summary:     update install instructions, and give an example embree.cfg file Affected #:  1 file</p>
<p>diff -r d44c9b732d8a13bac7e9d374e50c345466ff7a13 -r 6753e090c2b5c4e0df8e16d9741e65b2e40e30c7 doc/source/visualizing/unstructured_mesh_rendering.rst --- a/doc/source/visualizing/unstructured_mesh_rendering.rst +++ b/doc/source/visualizing/unstructured_mesh_rendering.rst @@ -14,7 +14,7 @@</p>
<pre>.. code-block:: bash
</pre>
<ul><li><p>conda install -c <a href="http://use.yt/with_conda/">http://use.yt/with_conda/</a> yt=3.3_dev</p></li></ul>
<p>+    conda install -c <a href="http://use.yt/with_conda/">http://use.yt/with_conda/</a> yt</p>
<pre>If you want to install from source, you can use the ``get_yt.sh`` script.
Be sure to set the INST_YT_SOURCE and INST_UNSTRUCTURED flags to 1 at the</pre>
<p>@@ -73,7 +73,13 @@</p>
<pre>as usual. Finally, if you create a file called embree.cfg in the yt-hg directory with
the location of the embree installation, the setup script will find this and use it,</pre>
<p>-provided EMBREE_DIR is not set. We recommend one of the later two methods, especially +provided EMBREE_DIR is not set. An example embree.cfg file could like this: + +.. code-block:: bash + +   /opt/local/ + +We recommend one of the later two methods, especially</p>
<pre>if you plan on re-compiling the cython extensions regularly. Note that none of this is
neccessary if you installed embree into a location that is in your default path, such
as /usr/local.</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/2e201168417d/">https://bitbucket.org/yt_analysis/yt/commits/2e201168417d/</a> Changeset:   2e201168417d Branch:      yt User:        atmyers Date:        2016-03-20 22:01:31+00:00 Summary:     use new form for print Affected #:  1 file</p>
<p>diff -r 6753e090c2b5c4e0df8e16d9741e65b2e40e30c7 -r 2e201168417ded751a8bec33dea6d08949c82c65 setupext.py --- a/setupext.py +++ b/setupext.py @@ -116,14 +116,14 @@</p>
<pre>        file.close()

    except OSError:</pre>
<ul><li><p>print fail_msg</p></li></ul>
<p>+        print(fail_msg)</p>
<pre>    finally:
        os.chdir(curdir)
        shutil.rmtree(tmpdir)

    if exit_code != 0:</pre>
<ul><li><p>print fail_msg</p></li></ul>
<p>+        print(fail_msg)</p>
<pre>    return rd
</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/b74883e05fc4/">https://bitbucket.org/yt_analysis/yt/commits/b74883e05fc4/</a> Changeset:   b74883e05fc4 Branch:      yt User:        atmyers Date:        2016-03-21 01:32:29+00:00 Summary:     style fix to warning message string Affected #:  1 file</p>
<p>diff -r 2e201168417ded751a8bec33dea6d08949c82c65 -r b74883e05fc41293c260a12eae43a18718641cbb setupext.py --- a/setupext.py +++ b/setupext.py @@ -80,12 +80,12 @@</p>
<pre>        except IOError:
            rd = '/usr/local'
</pre>
<ul><li><p>fail_msg = “Pyembree is installed, but I could not compile Embree test code. \n” + \</p></li>
<li><p>“Attempted to find Embree headers in %s. \n” % rd + \</p></li>
<li><p>“If this is not correct, please set your correct embree location \n” + \</p></li>
<li><p>“using EMBREE_DIR environment variable or your embree.cfg file. \n” + \</p></li>
<li><p>"Please see <a href="http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html">http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html</a> " + \</p></li>
<li><p>“for more information.”</p></li></ul>
<p>+    fail_msg = ("Pyembree is installed, but I could not compile Embree test code. \n" +               “I attempted to find Embree headers in %s. \n” +               “If this is not correct, please set your correct embree location \n” +               “using EMBREE_DIR environment variable or your embree.cfg file. \n” +               "Please see <a href="http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html">http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html</a> " +                “for more information.” % rd)</p>
<pre># Create a temporary directory
tmpdir = tempfile.mkdtemp()</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/be993079427c/">https://bitbucket.org/yt_analysis/yt/commits/be993079427c/</a> Changeset:   be993079427c Branch:      yt User:        atmyers Date:        2016-03-27 21:47:01+00:00 Summary:     Merged in atmyers/yt (pull request #2057)</p>
<p>Improve the unstructured mesh rendering build process. Affected #:  2 files</p>
<p>diff -r 5a08905d2e438f08244ca4819d523f62dfc4e86d -r be993079427c300e09b4b6430e3c8d90af0c3500 doc/source/visualizing/unstructured_mesh_rendering.rst --- a/doc/source/visualizing/unstructured_mesh_rendering.rst +++ b/doc/source/visualizing/unstructured_mesh_rendering.rst @@ -14,7 +14,7 @@</p>
<pre>.. code-block:: bash
</pre>
<ul><li><p>conda install -c <a href="http://use.yt/with_conda/">http://use.yt/with_conda/</a> yt=3.3_dev</p></li></ul>
<p>+    conda install -c <a href="http://use.yt/with_conda/">http://use.yt/with_conda/</a> yt</p>
<pre>If you want to install from source, you can use the ``get_yt.sh`` script.
Be sure to set the INST_YT_SOURCE and INST_UNSTRUCTURED flags to 1 at the</pre>
<p>@@ -73,7 +73,13 @@</p>
<pre>as usual. Finally, if you create a file called embree.cfg in the yt-hg directory with
the location of the embree installation, the setup script will find this and use it,</pre>
<p>-provided EMBREE_DIR is not set. We recommend one of the later two methods, especially +provided EMBREE_DIR is not set. An example embree.cfg file could like this: + +.. code-block:: bash + +   /opt/local/ + +We recommend one of the later two methods, especially</p>
<pre>if you plan on re-compiling the cython extensions regularly. Note that none of this is
neccessary if you installed embree into a location that is in your default path, such
as /usr/local.</pre>
<p>diff -r 5a08905d2e438f08244ca4819d523f62dfc4e86d -r be993079427c300e09b4b6430e3c8d90af0c3500 setupext.py --- a/setupext.py +++ b/setupext.py @@ -76,17 +76,58 @@</p>
<pre>    '''

    rd = os.environ.get('EMBREE_DIR')</pre>
<ul><li><p>if rd is not None:</p></li>
<li><p>return rd</p></li>
<li><p>print("EMBREE_DIR not set. Attempting to read embree.cfg")</p></li></ul>
<p>+    if rd is None: +        try: +            rd = open("embree.cfg").read().strip() +        except IOError: +            rd = ‘/usr/local’ + +    fail_msg = ("Pyembree is installed, but I could not compile Embree test code. \n" +               “I attempted to find Embree headers in %s. \n” +               “If this is not correct, please set your correct embree location \n” +               “using EMBREE_DIR environment variable or your embree.cfg file. \n” +               "Please see <a href="http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html">http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html</a> " +                “for more information.” % rd) + +    # Create a temporary directory +    tmpdir = tempfile.mkdtemp() +    curdir = os.getcwd() +</p>
<pre>try:</pre>
<ul><li><p>rd = open("embree.cfg").read().strip()</p></li>
<li><p>return rd</p></li>
<li><p>except IOError:</p></li>
<li><p>print("Reading Embree location from embree.cfg failed.")</p></li>
<li><p>print("If compilation fails, please place the base directory")</p></li>
<li><p>print("of your Embree install in embree.cfg and restart.")</p></li>
<li><p>return ‘/usr/local’</p></li></ul>
<p>+        os.chdir(tmpdir) + +        # Get compiler invocation +        compiler = os.getenv('CXX', ‘c++’) +        compiler = compiler.split(' ‘) + +        # Attempt to compile a test script. +        filename = r'test.cpp’ +        file = open(filename, ‘wt’, 1) +        file.write( +            ‘#include "embree2/rtcore.h"\n’ +            ‘int main() {\n’ +            ‘return 0;\n’ +            ‘}’ +        ) +        file.flush() +        with open(os.devnull, ‘w’) as fnull: +            exit_code = subprocess.call(compiler + ['-I%s/include/' % rd, filename], +                             stdout=fnull, stderr=fnull) + +        # Clean up +        file.close() + +    except OSError: +        print(fail_msg) + +    finally: +        os.chdir(curdir) +        shutil.rmtree(tmpdir) + +    if exit_code != 0: +        print(fail_msg) + +    return rd</p>
<pre>def get_mercurial_changeset_id(target_dir):</pre>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>

<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27B7rvwP0BO8B2qU7Kedm0bNVaGNZAsk0CTgQQhkLGMzIQfhpFGnrmWas3mVwnCqS9BCbeQdhvUf2okJ4SK31vKEjiCW5-2Byoycgg5D8VguGxiv0rD-2BDI0ra-2BRhZgnSBe5PH4R18XfrMOOCNA2PLjKu0kZNfs-2BP45yDkBM9uP8P7pR3hBnA68-2BudOvMDfgIh-2BKfU-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>