Re: [Rpy] compiling rpy2 on windows R-2.8.1

2009-01-12 Thread James Yoo
Hmmm, I'm trying to use mingw to compile rpy2.   I've setup my paths to only
include R, Rtools, mingw... but for some dang reason, setup.py keeps finding
msvc instead... what am I missing here?

On Sat, Jan 3, 2009 at 2:22 AM, Laurent Gautier  wrote:

> James Yoo wrote:
>
>>
>> line 112 (or thereabouts) in setup.py:
>> include_dirs = [x.lstrip('-I') for x in include_dirs]
>>
>> lstrip tends to be too greedy and turns "-II:\path\to\include" into
>> ":\path\to\include"...
>>
>
>
> I see. I misused 'lstrip' (thinking that the characters '-I' passed where
> considered as a string, while they are considered as any possible
> characters).
> This means that the bug is more serious: any path/to/include with any
> of the characters '-' or 'I' will cause problem.
>
> The fix you propose does not solve the problem in all cases (think of
> someone having a path like /path/to/My-Includes/).
>
> I'd propose the following instead:
>
>for i, d in enumerate(include_dirs):
>if d.startswith('-I'):
>   include_dirs[i] = d[2:]
>
> Regarding the other errors you encounter, I am afraid that you are on your
> own: all compilations for win32 I know of used mingw instead of msvc.
>
>
> L.
>
>
>
>
>
>> On Fri, Jan 2, 2009 at 2:18 PM, Laurent Gautier > lgaut...@gmail.com>> wrote:
>>
>>James Yoo wrote:
>>
>>
>>Sorry for the redundant post, but I felt that I should change
>>the subject header.
>>On Fri, Jan 2, 2009 at 11:31 AM, James Yoo > >
>>>> wrote:
>>
>>   Hi,
>>
>>   Running into a couple problems compiling rpy2 on windows.
>>   I have R_HOME defined and R in the system path.
>>   first off in setup.py, def getRinterface_ext:
>>
>>   include_dirs = [x.lstrip('-I','') for x in include_dirs]
>>
>>
>>The line above does not seem to be found in setup.py
>>(as the signature for the method str.lstrip() differs)
>>
>>
>>
>>
>>
>>   is bad if your drive letter happens to be 'I', I've replaced
>> this
>>   with x.replace('-I','') in my version.
>>
>>
>>1- To my knowledge, str.strip() and str.replace() do different things.
>>2- An oversight of Win32 subtleties cannot be excluded, but telling
>>here what happens exactly what happens drive I:\ could be helpful.
>>
>>   ... moving on...
>>
>>   During setup.py install, rinterface is running into multiple
>>problems:
>>
>>   w:\rpy2-2.0.0\rpy\rinterface\rinterface.h(19)
>>   : warning C4114: same type qualifier used more than once
>>   w:\rpy2-2.0.0\rpy\rinterface\rinterface.h(20)
>>   : warning C4114: same type qualifier used more than once
>>   rpy\rinterface\array.c(110) : error C2275: 'PyArrayInterface' :
>>   illegal use of t
>>   his type as an expression
>>   rpy\rinterface\array.c(27) : see declaration of
>>   'PyArrayInterface'
>>   rpy\rinterface\array.c(110) : error C2065: 'inter' : undeclared
>>   identifier
>>   rpy\rinterface\array.c(111) : error C2143: syntax error :
>> missing
>>   ';' before 'ty
>>   pe'
>>   rpy\rinterface\array.c(112) : error C2065: 'typekind' :
>>undeclared
>>   identifier
>>   rpy\rinterface\array.c(116) : warning C4047: '=' : 'int'
>>differs in
>>   levels of in
>>   direction from 'PyArrayInterface *'
>>   rpy\rinterface\array.c(120) : error C2143: syntax error :
>> missing
>>   ';' before 'ty
>>   pe'
>>   rpy\rinterface\array.c(121) : error C2143: syntax error :
>> missing
>>   ';' before 'ty
>>   pe'
>>   rpy\rinterface\array.c(122) : error C2223: left of
>>'->version' must
>>   point to str
>>   uct/union
>>   rpy\rinterface\array.c(123) : error C2223: left of '->nd'
>>must point
>>   to struct/u
>>   nion
>>   rpy\rinterface\array.c(123) : error C2065: 'nd' : undeclared
>>identifier
>>   rpy\rinterface\array.c(124) : error C2223: left of
>>'->typekind' must
>>   point to st
>>   ruct/union
>>   rpy\rinterface\array.c(125) : error C2223: left of
>>'->itemsize' must
>>   point to st
>>   ruct/union
>>   rpy\rinterface\array.c(126) : error C2223: left of '->flags'
>> must
>>   point to struc
>>   t/union
>>   rpy\rinterface\array.c(127) : error C2223: left of '->shape'
>> must
>>   point to struc
>>   t/union
>>   rpy\rinterface\array.c(128) : error C2223: left of '->shape'
>> must
>>   point to struc
>>   t/union
>>   rpy\rinterface\array.c(128) : warning C4047: 'function' :
>>   'Py_intptr_t *' differ
>>   s in levels of indirection from 'int'

Re: [Rpy] compiling rpy2 on windows R-2.8.1

2009-01-12 Thread James Yoo
okay, I'm making some progress... finally figured out how to make sure
mingw32 is used as the compiler du jour:

python setup.py build --compiler=mingw32

running build
running build_py
running build_ext
building 'rpy2.rinterface.rinterface' extension
\tools\Rtools\MinGW\bin\gcc.exe -mno-cygwin -
mdll -O -Wall -DWin32=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1
-II:/R/R-2.8.1/include -Irpy\rinterface
-Ii:\Python2.5\include -I\43\Python2.5\PC -c
rpy\rinterface\array.c -o build\temp.win32-2.5\Release\rpy\rinterface
\array.o
\tools\Rtools\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall
-DWin32=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1
-II:/R/R-2.8.1/include -Irpy\rinterface
-I\Python2.5\include -I\43\Pytho
n2.5\PC -c rpy\rinterface\r_utils.c -o
build\temp.win32-2.5\Release\rpy\rinterface\r_utils.o
\tools\Rtools\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall
-DWin32=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1
-II:/R/R-2.8.1/include -Irpy\rinterface
-Ii:\Python2.5\include -I\43\Pytho
n2.5\PC -c rpy\rinterface\rinterface.c -o
build\temp.win32-2.5\Release\rpy\rinterface\rinterface.o
rpy\rinterface\rinterface.c: In function
'EmbeddedR_init':rpy\rinterface\rinterface.c:368: error: 'R_SignalHandlers'
undeclared (first use in this function)
rpy\rinterface\rinterface.c:368: error: (Each undeclared identifier is
reportedonly once
rpy\rinterface\rinterface.c:368: error: for each function it appears in.)
rpy\rinterface\rinterface.c:372: error: 'R_Interactive' undeclared (first
use in this function)
rpy\rinterface\rinterface.c: In function
'EmbeddedR_exception_from_errmessage':
rpy\rinterface\rinterface.c:473: warning: initialization discards qualifiers
from pointer target type
error: command 'gcc' failed with exit status 1


On Mon, Jan 12, 2009 at 11:49 AM, James Yoo  wrote:

> Hmmm, I'm trying to use mingw to compile rpy2.   I've setup my paths to
> only include R, Rtools, mingw... but for some dang reason, setup.py keeps
> finding msvc instead... what am I missing here?
>
>
> On Sat, Jan 3, 2009 at 2:22 AM, Laurent Gautier wrote:
>
>> James Yoo wrote:
>>
>>>
>>> line 112 (or thereabouts) in setup.py:
>>> include_dirs = [x.lstrip('-I') for x in include_dirs]
>>>
>>> lstrip tends to be too greedy and turns "-II:\path\to\include" into
>>> ":\path\to\include"...
>>>
>>
>>
>> I see. I misused 'lstrip' (thinking that the characters '-I' passed where
>> considered as a string, while they are considered as any possible
>> characters).
>> This means that the bug is more serious: any path/to/include with any
>> of the characters '-' or 'I' will cause problem.
>>
>> The fix you propose does not solve the problem in all cases (think of
>> someone having a path like /path/to/My-Includes/).
>>
>> I'd propose the following instead:
>>
>>for i, d in enumerate(include_dirs):
>>if d.startswith('-I'):
>>   include_dirs[i] = d[2:]
>>
>> Regarding the other errors you encounter, I am afraid that you are on your
>> own: all compilations for win32 I know of used mingw instead of msvc.
>>
>>
>> L.
>>
>>
>>
>>
>>
>>> On Fri, Jan 2, 2009 at 2:18 PM, Laurent Gautier >> lgaut...@gmail.com>> wrote:
>>>
>>>James Yoo wrote:
>>>
>>>
>>>Sorry for the redundant post, but I felt that I should change
>>>the subject header.
>>>On Fri, Jan 2, 2009 at 11:31 AM, James Yoo >> >>
>>>>> wrote:
>>>
>>>   Hi,
>>>
>>>   Running into a couple problems compiling rpy2 on windows.
>>>   I have R_HOME defined and R in the system path.
>>>   first off in setup.py, def getRinterface_ext:
>>>
>>>   include_dirs = [x.lstrip('-I','') for x in include_dirs]
>>>
>>>
>>>The line above does not seem to be found in setup.py
>>>(as the signature for the method str.lstrip() differs)
>>>
>>>
>>>
>>>
>>>
>>>   is bad if your drive letter happens to be 'I', I've replaced
>>> this
>>>   with x.replace('-I','') in my version.
>>>
>>>
>>>1- To my knowledge, str.strip() and str.replace() do different things.
>>>2- An oversight of Win32 subtleties cannot be excluded, but telling
>>>here what happens exactly what happens drive I:\ could be helpful.
>>>
>>>   ... moving on...
>>>
>>>   During setup.py install, rinterface is running into multiple
>>>problems:
>>>
>>>   w:\rpy2-2.0.0\rpy\rinterface\rinterface.h(19)
>>>   : warning C4114: same type qualifier used more than once
>>>   w:\rpy2-2.0.0\rpy\rinterface\rinterface.h(20)
>>>   : warning C4114: same type qualifier used more than once
>>>   rpy\rinterface\array.c(110) : error C2275: 'PyArrayInterface' :
>>>   illegal use of t
>>>   his type as an expression
>>>   rpy\rinterface\array.c(27) : see declaration of
>>>   'PyArrayInterface'
>>>   rpy\rinterface\array.c(110) : error C2065: 'inter' : undeclared
>>>  

Re: [Rpy] compiling rpy2 on windows R-2.8.1

2009-01-12 Thread Peter
On Mon, Jan 12, 2009 at 5:49 PM, James Yoo  wrote:
> Hmmm, I'm trying to use mingw to compile rpy2.   I've setup my paths to only
> include R, Rtools, mingw... but for some dang reason, setup.py keeps finding
> msvc instead... what am I missing here?

I think setup.py will default to the MS compiler, try:

python setup.py build --compiler=mingw32

Or, create/edit the file distutils.cfg to make mingw32 the default
compiler for distutils.

Peter

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


[Rpy] playwith

2009-01-12 Thread Jan Wijffels

Hi,

I was wondering how something like

library(playwith)
playwith(plot(1:10))

could be achieved with RPy2?


thanks,
Jan


_
Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_howitworks_012009--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


[Rpy] Rpy and concurrency

2009-01-12 Thread laurent oget
Does Rpy2 use any systemwide locking to ensure that only one instance is
running at a given time or is this only a process-wide logging to make sure
only one thread within one process is using R?

Thanks,

Laurent
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] Rpy and concurrency

2009-01-12 Thread Laurent Gautier
   Two things.

   rpy2.rinterface if making sure that R gets initialized only once 
(otherwise everything breaks), which translates at the level of 
rpy2.robjects as a singleton pattern (r singleton of class R).

   For evaluating R code, the locking is somehow ensured by Python's 
GIL. All accesses to R are at the C level, and currently none of this 
code is releasing the GIL. There a locking mechanism already present in 
the C code, but it does not have much influence in the 2.0.x serie (work 
on that is under progress, but that's for 2.1.x). When done, long 
evaluations of R code will not hold the GIL, and that locking mechanism 
will be making sure only one thread is doing R things.



L.


laurent oget wrote:
> Does Rpy2 use any systemwide locking to ensure that only one instance is 
> running at a given time or is this only a process-wide logging to make 
> sure only one thread within one process is using R?
> 
> Thanks,
> 
> Laurent
> 
> 
> 
> 
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> 
> 
> 
> 
> ___
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] Rpy and concurrency

2009-01-12 Thread laurent oget
But in any case no global between process locking through a file lock or
something of that sort, right?

L


2009/1/12 Laurent Gautier 

>  Two things.
>
>  rpy2.rinterface if making sure that R gets initialized only once
> (otherwise everything breaks), which translates at the level of
> rpy2.robjects as a singleton pattern (r singleton of class R).
>
>  For evaluating R code, the locking is somehow ensured by Python's GIL. All
> accesses to R are at the C level, and currently none of this code is
> releasing the GIL. There a locking mechanism already present in the C code,
> but it does not have much influence in the 2.0.x serie (work on that is
> under progress, but that's for 2.1.x). When done, long evaluations of R code
> will not hold the GIL, and that locking mechanism will be making sure only
> one thread is doing R things.
>
>
>
> L.
>
>
> laurent oget wrote:
>
>> Does Rpy2 use any systemwide locking to ensure that only one instance is
>> running at a given time or is this only a process-wide logging to make sure
>> only one thread within one process is using R?
>>
>> Thanks,
>>
>> Laurent
>>
>>
>> 
>>
>>
>> --
>> This SF.net email is sponsored by:
>> SourcForge Community
>> SourceForge wants to tell your story.
>> http://p.sf.net/sfu/sf-spreadtheword
>>
>>
>> 
>>
>> ___
>> rpy-list mailing list
>> rpy-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>>
>
>
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] playwith

2009-01-12 Thread Laurent Gautier

Currently, I think that your only hope is that the package "playwith" is 
working when called from rpy2.

I have something like that on my TODO list, but I am not sure on when, 
and if I can find the time to do it.


L.



Jan Wijffels wrote:
> Hi,
> 
> I was wondering how something like
> 
> library(playwith)
> playwith(plot(1:10))
> 
> could be achieved with RPy2?
> 
> 
> thanks,
> Jan
> 
> 
> 
> Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail. See how 
> it works. 
> 
> 
> 
> 
> 
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> 
> 
> 
> 
> ___
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] Rpy and concurrency

2009-01-12 Thread Laurent Gautier
No need. Because of the GIL, a C call has to return before any thread 
can proceed (or so I think - I have tried or investigated this in 
details at the moment).

laurent oget wrote:
> But in any case no global between process locking through a file lock or 
> something of that sort, right?
> 
> L
> 
> 
> 2009/1/12 Laurent Gautier mailto:lgaut...@gmail.com>>
> 
>  Two things.
> 
>  rpy2.rinterface if making sure that R gets initialized only once
> (otherwise everything breaks), which translates at the level of
> rpy2.robjects as a singleton pattern (r singleton of class R).
> 
>  For evaluating R code, the locking is somehow ensured by Python's
> GIL. All accesses to R are at the C level, and currently none of
> this code is releasing the GIL. There a locking mechanism already
> present in the C code, but it does not have much influence in the
> 2.0.x serie (work on that is under progress, but that's for 2.1.x).
> When done, long evaluations of R code will not hold the GIL, and
> that locking mechanism will be making sure only one thread is doing
> R things.
> 
> 
> 
> L.
> 
> 
> laurent oget wrote:
> 
> Does Rpy2 use any systemwide locking to ensure that only one
> instance is running at a given time or is this only a
> process-wide logging to make sure only one thread within one
> process is using R?
> 
> Thanks,
> 
> Laurent
> 
> 
> 
> 
> 
> 
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> 
> 
> 
> 
> 
> ___
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/rpy-list
> 
> 
> 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] Rpy and concurrency

2009-01-12 Thread Laurent Gautier
Laurent Gautier wrote:
> No need. Because of the GIL, a C call has to return before any thread 
> can proceed (or so I think - I have tried or investigated this in 
> details at the moment).

edit: I have *not* tried.

> laurent oget wrote:
>> But in any case no global between process locking through a file lock 
>> or something of that sort, right?
>>
>> L
>>
>>
>> 2009/1/12 Laurent Gautier > >
>>
>>  Two things.
>>
>>  rpy2.rinterface if making sure that R gets initialized only once
>> (otherwise everything breaks), which translates at the level of
>> rpy2.robjects as a singleton pattern (r singleton of class R).
>>
>>  For evaluating R code, the locking is somehow ensured by Python's
>> GIL. All accesses to R are at the C level, and currently none of
>> this code is releasing the GIL. There a locking mechanism already
>> present in the C code, but it does not have much influence in the
>> 2.0.x serie (work on that is under progress, but that's for 2.1.x).
>> When done, long evaluations of R code will not hold the GIL, and
>> that locking mechanism will be making sure only one thread is doing
>> R things.
>>
>>
>>
>> L.
>>
>>
>> laurent oget wrote:
>>
>> Does Rpy2 use any systemwide locking to ensure that only one
>> instance is running at a given time or is this only a
>> process-wide logging to make sure only one thread within one
>> process is using R?
>>
>> Thanks,
>>
>> Laurent
>>
>>
>> 
>> 
>>
>> 
>> --
>>  
>>
>> This SF.net email is sponsored by:
>> SourcForge Community
>> SourceForge wants to tell your story.
>> http://p.sf.net/sfu/sf-spreadtheword
>>
>>
>> 
>> 
>>
>> ___
>> rpy-list mailing list
>> rpy-list@lists.sourceforge.net
>> 
>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>>
>>
>>
> 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] compiling rpy2 on windows R-2.8.1

2009-01-12 Thread Laurent Gautier
Odd.
The error message suggests missing definitions found in R headers.


L.



James Yoo wrote:
> okay, I'm making some progress... finally figured out how to make sure 
> mingw32 is used as the compiler du jour:
> 
> python setup.py build --compiler=mingw32
> 
> running build
> running build_py
> running build_ext
> building 'rpy2.rinterface.rinterface' extension
> \tools\Rtools\MinGW\bin\gcc.exe -mno-cygwin -
> mdll -O -Wall -DWin32=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 
> -II:/R/R-2.8.1/include -Irpy\rinterface 
> -Ii:\Python2.5\include -I\43\Python2.5\PC -c 
> rpy\rinterface\array.c -o build\temp.win32-2.5\Release\rpy\rinterface
> \array.o
> \tools\Rtools\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall 
> -DWin32=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 
> -II:/R/R-2.8.1/include -Irpy\rinterface 
> -I\Python2.5\include -I\43\Pytho
> n2.5\PC -c rpy\rinterface\r_utils.c -o 
> build\temp.win32-2.5\Release\rpy\rinterface\r_utils.o
> \tools\Rtools\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall 
> -DWin32=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 
> -II:/R/R-2.8.1/include -Irpy\rinterface 
> -Ii:\Python2.5\include -I\43\Pytho
> n2.5\PC -c rpy\rinterface\rinterface.c -o 
> build\temp.win32-2.5\Release\rpy\rinterface\rinterface.o
> rpy\rinterface\rinterface.c: In function 
> 'EmbeddedR_init':rpy\rinterface\rinterface.c:368: error: 
> 'R_SignalHandlers' undeclared (first use in this function)
> rpy\rinterface\rinterface.c:368: error: (Each undeclared identifier is 
> reportedonly once
> rpy\rinterface\rinterface.c:368: error: for each function it appears in.)
> rpy\rinterface\rinterface.c:372: error: 'R_Interactive' undeclared 
> (first use in this function)
> rpy\rinterface\rinterface.c: In function 
> 'EmbeddedR_exception_from_errmessage':
> rpy\rinterface\rinterface.c:473: warning: initialization discards 
> qualifiers from pointer target type
> error: command 'gcc' failed with exit status 1
> 
> 
> On Mon, Jan 12, 2009 at 11:49 AM, James Yoo  > wrote:
> 
> Hmmm, I'm trying to use mingw to compile rpy2.   I've setup my paths
> to only include R, Rtools, mingw... but for some dang reason,
> setup.py keeps finding msvc instead... what am I missing here?
> 
> 
> On Sat, Jan 3, 2009 at 2:22 AM, Laurent Gautier  > wrote:
> 
> James Yoo wrote:
> 
> 
> line 112 (or thereabouts) in setup.py:  
> include_dirs = [x.lstrip('-I') for x in include_dirs]
> 
> lstrip tends to be too greedy and turns
> "-II:\path\to\include" into ":\path\to\include"...
> 
> 
> 
> I see. I misused 'lstrip' (thinking that the characters '-I'
> passed where considered as a string, while they are considered
> as any possible
> characters).
> This means that the bug is more serious: any path/to/include
> with any
> of the characters '-' or 'I' will cause problem.
> 
> The fix you propose does not solve the problem in all cases
> (think of someone having a path like /path/to/My-Includes/).
> 
> I'd propose the following instead:
> 
>for i, d in enumerate(include_dirs):
>if d.startswith('-I'):
>   include_dirs[i] = d[2:]
> 
> Regarding the other errors you encounter, I am afraid that you
> are on your own: all compilations for win32 I know of used mingw
> instead of msvc.
> 
> 
> L.
> 
> 
> 
> 
> 
> On Fri, Jan 2, 2009 at 2:18 PM, Laurent Gautier
> mailto:lgaut...@gmail.com>
> >> wrote:
> 
>James Yoo wrote:
> 
> 
>Sorry for the redundant post, but I felt that I
> should change
>the subject header.
>On Fri, Jan 2, 2009 at 11:31 AM, James Yoo
> mailto:james@gmail.com>
> >  
> 
>  
>   Hi,
> 
>   Running into a couple problems compiling rpy2 on
> windows.
>   I have R_HOME defined and R in the system path.
>   first off in setup.py, def getRinterface_ext:
> 
>   include_dirs = [x.lstrip('-I','') for x in
> include_dirs]
> 
> 
>The line above does not seem to be found in setup.py
>(as the signature for the method str.lstrip() differs)
> 
> 
>  
> 
> 
>   is bad if your drive letter happens to be 'I',
> I've replaced this
>   with x.replace('-I','') in my version.
> 
> 
>1- To my knowledge, s