building C modules in windows + Python 2.3 + cygwin

  • Thread starter Andreou Giannis
  • Start date
A

Andreou Giannis

Allthough it is possible to build modules in Python2.3.3 and distutils
with cygwin,
by running:
setup.py build --compiler=cygwin
(after i created the libpython23.a)
running:
setup.py install
afterwards, complains about not building with msvs v.6,
since my Python distribution is built with it.

Since previous Python releases for windows allowed install of modules
that were built with different compilers then that of the current
distribution, with was this feature removed from distutils in Python
version 2.3?


Is there a workaround for this problem?
Can i simply copy the module file in the proper directory?
I do not want to install VS ver.6.

Thank you.
 
J

Jason Tishler

Andreou,

Allthough it is possible to build modules in Python2.3.3 and distutils
with cygwin, by running:
setup.py build --compiler=cygwin

AFAICT, you should use --compiler=mingw32, if you want to create a
native Win32 Python extension:

$ python setup.py --dry-run build --compiler=mingw32
running build
running build_ext
building 'readline' extension
C:\Cygwin\bin\gcc.exe -mno-cygwin ...
^^^^^^^^^^^

Using --compiler=cygwin, I get the following:

$ python setup.py --dry-run build --compiler=cygwin
running build
running build_ext
building 'readline' extension
C:\Cygwin\bin\gcc.exe -mcygwin ...
^^^^^^^^

which should produce a Cygwin Python extension.
Is there a workaround for this problem?

I don't know.
Can i simply copy the module file in the proper directory?

Yes. FWIW, this is how I install the Win32 Python readline module
every time I upgrade my Win32 Python installation...

Jason
 
M

Marek 'Baczek' =?iso-8859-2?Q?Baczy=F1ski?=

Allthough it is possible to build modules in Python2.3.3 and distutils
with cygwin,
by running:
setup.py build --compiler=cygwin
(after i created the libpython23.a)
running:
setup.py install
afterwards, complains about not building with msvs v.6,
since my Python distribution is built with it.

python setup.py install --skip-build

Note that --skip-build should work in other places where it currently
doesn't/is ignored (bdist comes to mind, any workarounds for it except
bdist_wininst, which oddly works?)
Is there a workaround for this problem?
Can i simply copy the module file in the proper directory?

If it's a simple package, there shoulnd't be any problem with this.
 
J

John J. Lee

Marek 'Baczek' Baczyñski said:
python setup.py install --skip-build

Note that --skip-build should work in other places where it currently
doesn't/is ignored (bdist comes to mind, any workarounds for it except
bdist_wininst, which oddly works?)
[...]

Thomas Heller pointed out here some time back how to reorder the
arguments to work around this.

I'm too tired to remember how exactly...


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top