Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make pydev/eclipse compile cython modules on a Windows platform

My IDE is pydev/eclipse on Win XP.

I like the idea of compiling cython modules inside the IDE, but I can only get it to work on a Linux box.

right-click on the project-->properties-->builders-->new-->program

I have tried with the simplest setup.py and helloworld.pyx as posted here:

http://docs.cython.org/src/userguide/tutorial.html

This is my screen on Linux

pydev/eclipse builder settings

It compiles the helloworld.pyx in the usual way, as

python setup.py build_ext --inplace

However, on WinXP, with the same settings, again after clicking

project-->build project

I get

enter image description here

I.e. "is not a valid Win32 application".

Any clue why this does not work on WinXP?

Update: Problem solved by Fabio. This works:

adjust_location_and_wd

like image 999
Alex van Houten Avatar asked Jan 06 '12 10:01

Alex van Houten


1 Answers

The error is because it's trying to execute setup.py as if it was an executable...

The problem in your specific use-case is that external builders know nothing about python, so, the location should actually map to your python.exe (and the setup.py location should be passed as a parameter).

like image 192
Fabio Zadrozny Avatar answered Sep 19 '22 17:09

Fabio Zadrozny