Revision: 442
          http://rpy.svn.sourceforge.net/rpy/?rev=442&view=rev
Author:   lgautier
Date:     2008-03-15 11:56:41 -0700 (Sat, 15 Mar 2008)

Log Message:
-----------
First move to have the multi-R-versions thing rpy has.

Modified Paths:
--------------
    trunk/sandbox/rpy_nextgen/setup.py

Modified: trunk/sandbox/rpy_nextgen/setup.py
===================================================================
--- trunk/sandbox/rpy_nextgen/setup.py  2008-03-15 14:16:23 UTC (rev 441)
+++ trunk/sandbox/rpy_nextgen/setup.py  2008-03-15 18:56:41 UTC (rev 442)
@@ -3,30 +3,42 @@
 from distutils.core import setup, Extension
 from subprocess import Popen, PIPE
 
-RHOME = os.getenv("R_HOME")
-if RHOME is None:
-    RHOME = Popen(["R", "RHOME"], stdout=PIPE).communicate()[0].strip()
 
-print('R\'s home is:%s' %RHOME)
 
-r_libs = [os.path.join(RHOME, 'lib'), os.path.join(RHOME, 'modules')]
 
+RHOMES = os.getenv('RHOMES')
 
-rinterface = Extension(
-        "rpy.rinterface",
-        ["rpy/rinterface/rinterface.c", ],
-        include_dirs=[ os.path.join(RHOME, 'include'),],
-        libraries=['R', 'Rlapack', 'Rblas'],
-        library_dirs=r_libs,
-        runtime_library_dirs=r_libs,
-        #extra_link_args=[],
-        )
+if RHOMES is None:
+    RHOMES = [Popen(["R", "RHOME"], stdout=PIPE).communicate()[0].strip(), ]
+else:
+    RHOMES = RHOMES.split(os.pathsep)
 
-setup(name="rpython",
-      version="0.0.1",
-      description="Python interface to the R language",
-      url="http://rpy.sourceforge.net";,
-      license="(L)GPL",
-      ext_modules = [rinterface],
-      packages = ['rpy', 'rpy.robjects']
-      )
+
+for RHOME in RHOMES:
+    RHOME = RHOME.strip()
+    print('R\'s home is:%s' %RHOME)
+
+    r_libs = [os.path.join(RHOME, 'lib'), os.path.join(RHOME, 'modules')]
+
+
+    rinterface = Extension(
+            "rpy.rinterface",
+            ["rpy/rinterface/rinterface.c", ],
+            include_dirs=[ os.path.join(RHOME, 'include'),],
+            libraries=['R', 'Rlapack', 'Rblas'],
+            library_dirs=r_libs,
+            runtime_library_dirs=r_libs,
+            #extra_link_args=[],
+            )
+
+    setup(name="rpython",
+          version="0.0.1",
+          description="Python interface to the R language",
+          url="http://rpy.sourceforge.net";,
+          license="(L)GPL",
+          ext_modules = [rinterface],
+          packages = ['rpy', 'rpy.robjects']
+          )
+
+
+


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