<html><body>
<p>5 new commits in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/940c06b1103b/">https://bitbucket.org/yt_analysis/yt/commits/940c06b1103b/</a> Changeset:   940c06b1103b Branch:      yt User:        atmyers Date:        2016-05-05 21:49:34+00:00 Summary:     Print out some useful diagnostic information if check_for_openmp() fails. Closes Issue #1089. Affected #:  1 file</p>
<p>diff -r 2f2c9e84c335e5d4be9c4eac86b1f67aed7e752f -r 940c06b1103bfc21fc209cee02ca31c282ad0fc7 setupext.py --- a/setupext.py +++ b/setupext.py @@ -1,10 +1,12 @@</p>
<pre>import os
from pkg_resources import resource_filename
import shutil</pre>
<p>-import subprocess +from subprocess import Popen, PIPE, call</p>
<pre>import sys
import tempfile
</pre>
<p>+from yt.utilities.exceptions import YTException +</p>
<pre>def check_for_openmp():
    """Returns True if local setup supports OpenMP, False otherwise"""
</pre>
<p>@@ -37,13 +39,21 @@</p>
<pre>"}"
         )
         file.flush()</pre>
<ul><li><p>with open(os.devnull, ‘w’) as fnull:</p></li>
<li><p>exit_code = subprocess.call(compiler + ['-fopenmp', filename],</p></li>
<li><p>stdout=fnull, stderr=fnull)</p></li></ul>
<p>+        p = Popen(compiler + ['-fopenmp', filename], +                  stdin=PIPE, stdout=PIPE, stderr=PIPE) +        output, err = p.communicate() +        exit_code = p.returncode + +        if exit_code != 0: +            print("Compilation of OpenMP test code failed with the error: ") +            print(err) +            print("Disabling OpenMP support. ")</p>
<pre>    # Clean up
    file.close()
except OSError:</pre>
<p>+        print("check_for_openmp() could not find your C compiler. " +              "Attempted to use ‘%s’. " % compiler)</p>
<pre>    return False
finally:
    os.chdir(curdir)</pre>
<p>@@ -111,7 +121,7 @@</p>
<pre>)
file.flush()
with open(os.devnull, 'w') as fnull:</pre>
<ul><li><p>exit_code = subprocess.call(compiler + ['-I%s/include/' % rd, filename],</p></li></ul>
<p>+            exit_code = call(compiler + ['-I%s/include/' % rd, filename],</p>
<pre>                             stdout=fnull, stderr=fnull)

        # Clean up</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/79f736c0006c/">https://bitbucket.org/yt_analysis/yt/commits/79f736c0006c/</a> Changeset:   79f736c0006c Branch:      yt User:        atmyers Date:        2016-05-05 22:25:27+00:00 Summary:     remove unused import. Affected #:  1 file</p>
<p>diff -r 940c06b1103bfc21fc209cee02ca31c282ad0fc7 -r 79f736c0006ca0d4af9493d2899d43910b06c340 setupext.py --- a/setupext.py +++ b/setupext.py @@ -5,7 +5,6 @@</p>
<pre>import sys
import tempfile
</pre>
<p>-from yt.utilities.exceptions import YTException</p>
<pre>def check_for_openmp():
    """Returns True if local setup supports OpenMP, False otherwise"""</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/618a4db28084/">https://bitbucket.org/yt_analysis/yt/commits/618a4db28084/</a> Changeset:   618a4db28084 Branch:      yt User:        atmyers Date:        2016-05-10 03:44:08+00:00 Summary:     also catch error messgae when we try to compile Embree test code. Affected #:  1 file</p>
<p>diff -r 79f736c0006ca0d4af9493d2899d43910b06c340 -r 618a4db280849d07011211c749c1c920baa97c2f setupext.py --- a/setupext.py +++ b/setupext.py @@ -1,7 +1,7 @@</p>
<pre>import os
from pkg_resources import resource_filename
import shutil</pre>
<p>-from subprocess import Popen, PIPE, call +from subprocess import Popen, PIPE</p>
<pre>import sys
import tempfile
</pre>
<p>@@ -91,12 +91,11 @@</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>“I attempted to find Embree headers in %s. \n”</p></li></ul>
<p>+    fail_msg = ("I attempted to find Embree headers in %s. \n"</p>
<pre>"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 http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html "</pre>
<ul><li><p>“for more information.” % rd)</p></li></ul>
<p>+                “for more information. \n” % rd)</p>
<pre># Create a temporary directory
tmpdir = tempfile.mkdtemp()</pre>
<p>@@ -119,23 +118,29 @@</p>
<pre>'}'
         )
         file.flush()</pre>
<ul><li><p>with open(os.devnull, ‘w’) as fnull:</p></li>
<li><p>exit_code = call(compiler + ['-I%s/include/' % rd, filename],</p></li>
<li><p>stdout=fnull, stderr=fnull)</p></li></ul>
<p>+        p = Popen(compiler + ['-I%s/include/' % rd, filename], +                  stdin=PIPE, stdout=PIPE, stderr=PIPE) +        output, err = p.communicate() +        exit_code = p.returncode + +        if exit_code != 0: +            print("Pyembree is installed, but I could not compile Embree test code.") +            print("The error message was: ") +            print(err) +            print fail_msg</p>
<pre>        # Clean up
        file.close()

    except OSError:</pre>
<ul><li><p>print(fail_msg)</p></li></ul>
<p>+        print("read_embree_location() could not find your C compiler. " +              "Attempted to use ‘%s’. " % compiler) +        return False</p>
<pre>    finally:
        os.chdir(curdir)
        shutil.rmtree(tmpdir)
</pre>
<ul><li><p>if exit_code != 0:</p></li>
<li><p>print(fail_msg)</p></li></ul>
<p>–</p>
<pre>    return rd

</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/0027fec5dda5/">https://bitbucket.org/yt_analysis/yt/commits/0027fec5dda5/</a> Changeset:   0027fec5dda5 Branch:      yt User:        atmyers Date:        2016-05-10 14:21:55+00:00 Summary:     use correct form of print() Affected #:  1 file</p>
<p>diff -r 618a4db280849d07011211c749c1c920baa97c2f -r 0027fec5dda502d32416f47304838cefc36117c5 setupext.py --- a/setupext.py +++ b/setupext.py @@ -127,7 +127,7 @@</p>
<pre>print("Pyembree is installed, but I could not compile Embree test code.")
print("The error message was: ")
print(err)</pre>
<ul><li><p>print fail_msg</p></li></ul>
<p>+            print(fail_msg)</p>
<pre># Clean up
file.close()</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/0b86fcb15765/">https://bitbucket.org/yt_analysis/yt/commits/0b86fcb15765/</a> Changeset:   0b86fcb15765 Branch:      yt User:        ngoldbaum Date:        2016-05-11 18:20:59+00:00 Summary:     Merged in atmyers/yt (pull request #2160)</p>
<p>Print out some useful diagnostic information if check_for_openmp() fails. Closes Issue #1089. Affected #:  1 file</p>
<p>diff -r 6db4d26078e523630af50bde111952bbee7a1018 -r 0b86fcb157653daf6f3abafcb65518cec55b5a50 setupext.py --- a/setupext.py +++ b/setupext.py @@ -1,10 +1,11 @@</p>
<pre>import os
from pkg_resources import resource_filename
import shutil</pre>
<p>-import subprocess +from subprocess import Popen, PIPE</p>
<pre>import sys
import tempfile
</pre>
<p>+</p>
<pre>def check_for_openmp():
    """Returns True if local setup supports OpenMP, False otherwise"""
</pre>
<p>@@ -37,13 +38,21 @@</p>
<pre>"}"
         )
         file.flush()</pre>
<ul><li><p>with open(os.devnull, ‘w’) as fnull:</p></li>
<li><p>exit_code = subprocess.call(compiler + ['-fopenmp', filename],</p></li>
<li><p>stdout=fnull, stderr=fnull)</p></li></ul>
<p>+        p = Popen(compiler + ['-fopenmp', filename], +                  stdin=PIPE, stdout=PIPE, stderr=PIPE) +        output, err = p.communicate() +        exit_code = p.returncode + +        if exit_code != 0: +            print("Compilation of OpenMP test code failed with the error: ") +            print(err) +            print("Disabling OpenMP support. ")</p>
<pre>    # Clean up
    file.close()
except OSError:</pre>
<p>+        print("check_for_openmp() could not find your C compiler. " +              "Attempted to use ‘%s’. " % compiler)</p>
<pre>    return False
finally:
    os.chdir(curdir)</pre>
<p>@@ -82,12 +91,11 @@</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>“I attempted to find Embree headers in %s. \n”</p></li></ul>
<p>+    fail_msg = ("I attempted to find Embree headers in %s. \n"</p>
<pre>"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 http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html "</pre>
<ul><li><p>“for more information.” % rd)</p></li></ul>
<p>+                “for more information. \n” % rd)</p>
<pre># Create a temporary directory
tmpdir = tempfile.mkdtemp()</pre>
<p>@@ -110,23 +118,29 @@</p>
<pre>'}'
         )
         file.flush()</pre>
<ul><li><p>with open(os.devnull, ‘w’) as fnull:</p></li>
<li><p>exit_code = subprocess.call(compiler + ['-I%s/include/' % rd, filename],</p></li>
<li><p>stdout=fnull, stderr=fnull)</p></li></ul>
<p>+        p = Popen(compiler + ['-I%s/include/' % rd, filename], +                  stdin=PIPE, stdout=PIPE, stderr=PIPE) +        output, err = p.communicate() +        exit_code = p.returncode + +        if exit_code != 0: +            print("Pyembree is installed, but I could not compile Embree test code.") +            print("The error message was: ") +            print(err) +            print(fail_msg)</p>
<pre>        # Clean up
        file.close()

    except OSError:</pre>
<ul><li><p>print(fail_msg)</p></li></ul>
<p>+        print("read_embree_location() could not find your C compiler. " +              "Attempted to use ‘%s’. " % compiler) +        return False</p>
<pre>    finally:
        os.chdir(curdir)
        shutil.rmtree(tmpdir)
</pre>
<ul><li><p>if exit_code != 0:</p></li>
<li><p>print(fail_msg)</p></li></ul>
<p>–</p>
<pre>return rd</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-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27AjbyRmMyGxaI1EdWc9TEOch83IzDXvUNyhb1KdWkXw0s17X5tcISsRYvEdCq8sBSZ-2BO08CJKt0tLczp2JW4DI0Mya-2B-2BuuBODgN-2FtoIzL-2FWUHJ7Dz-2F1EP4NcWu7IMqMDOEuEHqh2BB4hNhsgmJNk97pebOYoaObK6ooGUwThqnvxLj27QEcYy1zHUy0s8VMv9s-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>