Just a couple of comments/questions regarding Windows, an OS I really
do not know well :-)...

1) Why did you need Wine?

2) Why did you use regedit to setup environment variables?
http://support.microsoft.com/kb/310519

3) Regarding setuptools... Why the exe installers at PyPI are not
enough for you?

4) Regarding numpy...  Why the exe installers are SourceForge are not
enough for you?


2009/6/10 Stéfan van der Walt <[email protected]>:
> Hi all,
>
> Yesterday, I had to build a Cython extension for a colleague using
> Windows, so here are the steps required:
>
> 1. Install Wine (on OSX I used http://www.macports.org/)
> 2. Install Python 2.5 from the http://www.python.org .exe
> 3. Install mingw from http://www.mingw.org/.  Install the base system and g++.
> 4. Start the registry editor (wine regedit) and setup the system path:
>
>  - Search for Environment and find the PATH key
>  - Append to it c:\python25;c:\mingw\bin;c:\python25\scripts
>  - Add a new key called "HOME" and set it to c:\windows\profiles\yourusername
>
> 5. Create a new file in ~/.wine/drive_c/windows/profiles/yourusername/
> called pydistutils.cfg that contains
>
> [build]
> compiler=mingw32
>
> This tells distutils not to look for MSVC7, but to use mingw as the
> default compiler.
>
> 6. Install setuptools (not necessary, but convenient if you want to
> install any other packages).
>
> Get the .tar.gz from http://pypi.python.org/pypi/setuptools.
> Unpack.
> wine python setup.py install
>
> 7. Install Cython (either from source as in 6 or using `easy_install cython`)
> 8. Compile you extension (from your package source directory):
>
> python setup.py bdist_wininst
>
> This will only work if you have a setup.py file, similar to the one in
>
> http://dip.sun.ac.za/~stefan/code/cython_demo.git
>
> This step should then generate a .exe in the dist/ directory.
>
> If your package requires NumPy to work, you'll have to install that
> prior to step 8, by
>
> 1. Extracting the numpy source tree
> 2. python setup.py build -c mingw32
> 3. python setup.py install --skip-build
>
> I hope someone else finds this recipe useful!
>
> Regards
> Stéfan
> _______________________________________________
> 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

Reply via email to