Hi Lisandro,
I have just edited the Cython Wiki as you asked. I am sorry that it is late and
also that I have been unable to test the patch that you kindly suggested to me.
As I now get over 20 emails a day from this mailing list I am going to remove
myself. I just wanted to say thank you for the help! I am sure I will return to
Cython in a few years when I have matured as a programmer! If you wish to get
in contact about any developments with vcvarsall.bat or my editing of the wiki,
please email me on my personal address: [email protected].
Thanks again,
Sam
> Date: Fri, 25 Sep 2009 10:40:16 -0300
> From: [email protected]
> To: [email protected]
> Subject: Re: [Cython] vcvarsall.bat
>
> On Fri, Sep 25, 2009 at 8:38 AM, Sam Parry <[email protected]> wrote:
> > Thanks again for your reply Lisandro.
> >
> >
> >> About how to find the location to put the per-user pydistutils.cfg
> >> file, you forgot to "import os"!!! . In short, you have to enter a
> >> Python promp and do this (here doing it in Linux):
> >>
> >> >>> import os
> >> >>> os.path.expanduser('~')
> >> '/u/dalcinl'
> >
> > Hahahaha, oooops!
> >
> >
> >> If you can help me to test the patch below, then I'll start a new
> >> thread to ask the other Cython developers to push this fix.
> >>
> >> diff -r 7fbe931e5ab7 pyximport/pyxbuild.py
> >> --- a/pyximport/pyxbuild.py Wed Sep 16 15:50:00 2009 +0200
> >> +++ b/pyximport/pyxbuild.py Fri Sep 18 12:39:51 2009 -0300
> >> @@ -55,6 +55,11 @@
> >> build = dist.get_command_obj('build')
> >> build.build_base = pyxbuild_dir
> >>
> >> + config_files = dist.find_config_files()
> >> + try: config_files.remove('setup.cfg')
> >> + except ValueError: pass
> >> + dist.parse_config_files(config_files)
> >> +
> >> try:
> >> ok = dist.parse_command_line()
> >> except DistutilsArgError:
> >>
> >
> > Would you please be specific about how to apply the patch (I have never done
> > anything like this before!)?
> >
>
> Just open the file pyximport/pyxbuild.py and add these four lines
> (marked with "+") at the appropriate place.
>
> > You may have to wait a little while for any testing on my end because I
> > finish my project today (I am only doing this as a summer project for
> > someone) and so will be starting back at university soon... I will however
> > pass this information on to my successor and I may be able to do some work
> > on it if I have some spare time! I will try and put this info in the wiki
> > though, probably sometime next week.
> >
>
> BTW, I've already pushed that change to cython-devel. If you hit this link:
>
> http://hg.cython.org/cython-devel/archive/tip.zip
>
> you will be able to download a zip file with the current state of the
> cython-devel repo, with BTW is already in beta stage (release 0.11.3
> to appear very soon, likely in the weekend)
>
>
> >> On Fri, Sep 18, 2009 at 11:46 AM, Sam Parry <[email protected]>
> >> wrote:
> >> > Hi guys,
> >> >
> >> > Thanks for the prompt reply.
> >> >
> >> >
> >> >> Date: Tue, 15 Sep 2009 13:52:18 -0300
> >> >> From: [email protected]
> >> >> To: [email protected]
> >> >> Subject: Re: [Cython] vcvarsall.bat
> >> >>
> >> >> IIRC, there are some patches in http://trac.cython.org/cython_trac/ to
> >> >> make pyximport MinGW aware... Unfortunately, I did not have any chance
> >> >> to review this, and Windows is always low in my priorities... You
> >> >> know... the Windows OS has a lot of users, fans, and strong defenders
> >> >> (we already had some of these "fights" here in this list!!!)... but
> >> >> very few of them make any useful code contribution/testing/review for
> >> >> their platform...
> >> >
> >> > I have not had a look at the patches yet but thought I would just
> >> > comment on
> >> > the other things you suggested. I dual boot Windows and Linux but,
> >> > unfortunately, I am running the program on a Windows machine at work.
> >> >
> >> >
> >> >> A fast workaround for your issue if to add a file named
> >> >> "distutils.cfg" in C:\Python2.6\Lib\distutils (DISCLAIMER: do not
> >> >> remember right now if this is the actual full path of distutils!) with
> >> >> the contents below:
> >> >> [build_ext]
> >> >> compiler=mingw32
> >> >
> >> > As far as the disutils.cfg, I had already done that to no avail. It was
> >> > in
> >> > the correct place too. I just created the file using notepad and copied
> >> > in
> >> > the same text as you have writen (but from one of the install help
> >> > documents
> >> > on the cython website). As I have had this in from the start it doesn't
> >> > seem
> >> > to help (me anyway)!
> >> >
> >> >
> >> >> Alternatively, you can add a "pydistutils.cfg" file with the same
> >> >> contents in %HOME% or %UserProfile% or watever your "home" directory
> >> >> is in your Windows system (tip: use os.path.expanduser('~') in a
> >> >> Python prompt to figure out the right place)
> >> >
> >> > Thanks for your detailed directions in finding the home directory.
> >> > However,
> >> > when I type this into the command line python interpreter, I get a
> >> > NameError: 'os' is not defined. This seems a bit weird to me... As such
> >> > I am
> >> > unsure as to where to put the pydisutils.cfg file.
> >> >
> >> >
> >> >> BTW, If you can elaborate a bit more on this and contribute all this
> >> >> stuff to the Cython wiki, it would be great....
> >> >
> >> > I wouldn't mind putting this stuff in the wiki in brief if I find a
> >> > solution. It would probably be mostly copy and pasted from this
> >> > conversation
> >> > though, especially as I have no real experience at this kind of thing...
> >> >
> >> >
> >> > Thanks again for the info,
> >> >
> >> > Sam
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >> On Tue, Sep 15, 2009 at 11:14 AM, Sam Parry <[email protected]>
> >> >> wrote:
> >> >> > Hi guys,
> >> >> >
> >> >> > Not sure if I'm emailing to the correct place so apologies if I am
> >> >> > spamming
> >> >> > you...
> >> >> >
> >> >> > I am having problems with Cython compiling. I am following the
> >> >> > tutorial
> >> >> > on
> >> >> > the main website (from the Users Guide) and when I type "python
> >> >> > setup.py
> >> >> > build_ext --inplace" I get an error saying "unable to find
> >> >> > vcvarsall.bat". I
> >> >> > am using MinGW as my compiler and running on windows XP. I have
> >> >> > managed
> >> >> > to
> >> >> > find a way around this: typing "python setup.py build_ext
> >> >> > --compiler=mingw32
> >> >> > --inplace" works for the first 'hello world' tutorial part. However,
> >> >> > I
> >> >> > get
> >> >> > the vcvarsall error when trying the pyximport method. Adding the
> >> >> > "--compiler=mingw32" does not work for any of the examples using any
> >> >> > form of
> >> >> > numpy import.
> >> >> >
> >> >> > I would be grateful for any insights provided that could help me run
> >> >> > cython!
> >> >> > I am new to using the command line, c and cython (and not all that
> >> >> > experienced with python either!) so forgive me if I need more detail
> >> >> > than
> >> >> > the average user!
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Sam
> >> >> > ________________________________
> >> >> > Use Hotmail to send and receive mail from your different email
> >> >> > accounts.
> >> >> > Find out how.
> >> >> > _______________________________________________
> >> >> > Cython-dev mailing list
> >> >> > [email protected]
> >> >> > http://codespeak.net/mailman/listinfo/cython-dev
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Lisandro Dalcín
> >> >> ---------------
> >> >> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> >> >> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> >> >> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> >> >> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> >> >> Tel/Fax: +54-(0)342-451.1594
> >> >> _______________________________________________
> >> >> Cython-dev mailing list
> >> >> [email protected]
> >> >> http://codespeak.net/mailman/listinfo/cython-dev
> >> >
> >> >
> >> > ________________________________
> >> > View your Twitter and Flickr updates from one place - Learn more!
> >> > _______________________________________________
> >> > Cython-dev mailing list
> >> > [email protected]
> >> > http://codespeak.net/mailman/listinfo/cython-dev
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Lisandro Dalcín
> >> ---------------
> >> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> >> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> >> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> >> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> >> Tel/Fax: +54-(0)342-451.1594
> >> _______________________________________________
> >> Cython-dev mailing list
> >> [email protected]
> >> http://codespeak.net/mailman/listinfo/cython-dev
> >
> >
> > ________________________________
> > View your Twitter and Flickr updates from one place – Learn more!
> > _______________________________________________
> > Cython-dev mailing list
> > [email protected]
> > http://codespeak.net/mailman/listinfo/cython-dev
> >
> >
>
>
>
> --
> Lisandro Dalcín
> ---------------
> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
_________________________________________________________________
Download Messenger onto your mobile for free
http://clk.atdmt.com/UKM/go/174426567/direct/01/_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev