Revision: 648 http://rpy.svn.sourceforge.net/rpy/?rev=648&view=rev Author: lgautier Date: 2008-09-02 17:48:47 +0000 (Tue, 02 Sep 2008)
Log Message: ----------- fix for R include files in "other" places Modified Paths: -------------- branches/rpy_nextgen/NEWS branches/rpy_nextgen/setup.py Modified: branches/rpy_nextgen/NEWS =================================================================== --- branches/rpy_nextgen/NEWS 2008-09-01 15:34:09 UTC (rev 647) +++ branches/rpy_nextgen/NEWS 2008-09-02 17:48:47 UTC (rev 648) @@ -31,6 +31,7 @@ - proper reference counting when handling, and deleting, :attr:`Sexp.__sexp__` generated CObjects +- get properly the include directories (no matter where they are) #bug report and fix adapted from Robert Nuske Release 2.0.0a3 Modified: branches/rpy_nextgen/setup.py =================================================================== --- branches/rpy_nextgen/setup.py 2008-09-01 15:34:09 UTC (rev 647) +++ branches/rpy_nextgen/setup.py 2008-09-02 17:48:47 UTC (rev 648) @@ -4,7 +4,7 @@ pack_name = 'rpy2' -pack_version = '2.0.0-dev' +pack_version = '2.0.0a3' RHOMES = os.getenv('RHOMES') @@ -68,6 +68,8 @@ # MacOSX rconfig_m = re.match('^(-F.+) (-framework.+)$', rconfig) if rconfig_m is None: + rconfig_m = re.match('^(-I.+)$', rconfig) + if rconfig_m is None: raise Exception(cmd + '\nreturned\n' + rconfig) return rconfig_m.groups() @@ -81,7 +83,7 @@ rversions.append(rversion) def getRinterface_ext(RHOME, r_packversion): - r_libs = [os.path.join(RHOME, 'lib'), os.path.join(RHOME, 'modules')] + r_libs = [os.path.join(RHOME, 'lib'), os.path.join(RHOME, 'modules')] #FIXME: crude way (will break in many cases) #check how to get how to have a configure step @@ -101,14 +103,16 @@ #define_macros.append(('RPY_DEBUG_OBJECTINIT', 1)) #define_macros.append(('RPY_DEBUG_CONSOLE', 1)) - + include_dirs = get_rconfig(RHOME, '--cppflags')[0].split() + include_dirs = [x.lstrip('-I') for x in include_dirs] + rinterface_ext = Extension( pack_name + '.rinterface.rinterface', [os.path.join('rpy', 'rinterface', 'array.c'), os.path.join('rpy', 'rinterface', 'r_utils.c'), os.path.join('rpy', 'rinterface', 'rinterface.c')], - include_dirs = [ os.path.join(RHOME, 'include'), - os.path.join('rpy', 'rinterface')], + include_dirs = include_dirs + + [os.path.join('rpy', 'rinterface'),], libraries = ['R', 'Rlapack', 'Rblas'], library_dirs = r_libs, define_macros = define_macros, 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 the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list