Revision: 513
          http://rpy.svn.sourceforge.net/rpy/?rev=513&view=rev
Author:   warnes
Date:     2008-05-12 20:32:37 -0700 (Mon, 12 May 2008)

Log Message:
-----------
Add notes on what is necessary to build against multiple versions of R on OSX

Modified Paths:
--------------
    trunk/rpy/setup.py

Modified: trunk/rpy/setup.py
===================================================================
--- trunk/rpy/setup.py  2008-05-10 13:30:40 UTC (rev 512)
+++ trunk/rpy/setup.py  2008-05-13 03:32:37 UTC (rev 513)
@@ -32,7 +32,7 @@
 
 DEBUG=True
 
-import os, os.path, sys, shutil
+import os, os.path, sys, shutil, re
 from distutils.core import setup, Extension
 from distutils.sysconfig import *
 from distutils.errors import *
@@ -66,6 +66,15 @@
 #if sys.platform=="win32":
 #    rpy_wintools.CreatePythonWinLib()
 
+# On Mac OS X ("darwin") it is necessary to change the symlink
+#   /Library/Frameworks/R.framework/Versions/Current
+# to point to the current version of R in
+#  /Library/Frameworks/R.framework/Versions/X.Y
+# for that version of R to execute.  So, we need to store the original
+# symlink here so we can restore it when we are done
+if sys.platform=="darwin":
+  darwin_original_version = 
os.readlink("/Library/Frameworks/R.framework/Versions/Current")
+
 modules = []
 for RHOME in RHOMES:
    
@@ -87,6 +96,16 @@
         UNDEF = []
 
     # configure the R paths
+    #if sys.platform=="darwin":
+    #  version = 
+    #  if os.symlink("/Library/Frameworks/R.framework/Versions/Current")
+    #  if RHOME.endswith('/'):
+    #    RHOME = RHOME[:-1]
+    #  print "RHOME=",os.path.join(os.path.dirname(RHOME),
+    #                              os.readlink(RHOME) )
+    #  sys.exit()
+      
+    
     RVERSION = rpy_tools.get_R_VERSION(RHOME, force_exec=True)
     RVER     = rpy_tools.get_R_VERSION_CODE(RVERSION)
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to