[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Feb 28 12:32:55 PST 2013


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/0a771381c62c/
changeset:   0a771381c62c
branch:      yt
user:        xarthisius
date:        2013-02-28 21:26:15
summary:     [setup.py] following Nathan's suggestion setup no longer tries to build fKD when Forthon or gfortran is not present
affected #:  1 file

diff -r ccfe34e70803932ff921e6020a7972f8bcdcef49 -r 0a771381c62c55fb9b784d4adb6af03286186890 setup.py
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,7 @@
 from distutils import version
 
 from distutils.core import Command
+from distutils.spawn import find_executable
 
 
 class BuildForthon(Command):
@@ -40,11 +41,19 @@
     def run(self):
 
         """runner"""
+        Forthon_exe = find_executable("Forthon")
+        gfortran_exe = find_executable("gfortran")
+
+        if None in (Forthon_exe, gfortran_exe):
+            sys.stderr.write(
+                "fKDpy.so won't be built due to missing Forthon/gfortran\n"
+            )
+            return
 
         cwd = os.getcwd()
         os.chdir(os.path.join(cwd, 'yt/utilities/kdtree'))
-        cmd = ["Forthon", "-F", "gfortran", "--compile_first", "fKD_source",
-               "--no2underscores", "--fopt", "'-O3'", "fKD",
+        cmd = [Forthon_exe, "-F", "gfortran", "--compile_first",
+               "fKD_source", "--no2underscores", "--fopt", "'-O3'", "fKD",
                "fKD_source.f90"]
         subprocess.check_call(cmd, shell=False)
         shutil.move(glob.glob('build/lib*/fKDpy.so')[0], os.getcwd())


https://bitbucket.org/yt_analysis/yt/commits/4b6df9661b7c/
changeset:   4b6df9661b7c
branch:      yt
user:        MatthewTurk
date:        2013-02-28 21:32:51
summary:     Merged in xarthisius/yt (pull request #452)

[setup.py] following Nathan's suggestion setup no longer tries to build fKD when Forthon or gfortran is not present
affected #:  1 file

diff -r f8e5308c580cfa961b2ce3df2c41996753b8c0ff -r 4b6df9661b7c1e5709308432d4f76f2f151fc3ac setup.py
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,7 @@
 from distutils import version
 
 from distutils.core import Command
+from distutils.spawn import find_executable
 
 
 class BuildForthon(Command):
@@ -40,11 +41,19 @@
     def run(self):
 
         """runner"""
+        Forthon_exe = find_executable("Forthon")
+        gfortran_exe = find_executable("gfortran")
+
+        if None in (Forthon_exe, gfortran_exe):
+            sys.stderr.write(
+                "fKDpy.so won't be built due to missing Forthon/gfortran\n"
+            )
+            return
 
         cwd = os.getcwd()
         os.chdir(os.path.join(cwd, 'yt/utilities/kdtree'))
-        cmd = ["Forthon", "-F", "gfortran", "--compile_first", "fKD_source",
-               "--no2underscores", "--fopt", "'-O3'", "fKD",
+        cmd = [Forthon_exe, "-F", "gfortran", "--compile_first",
+               "fKD_source", "--no2underscores", "--fopt", "'-O3'", "fKD",
                "fKD_source.f90"]
         subprocess.check_call(cmd, shell=False)
         shutil.move(glob.glob('build/lib*/fKDpy.so')[0], os.getcwd())

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list