422,751 Members | 2,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,751 IT Pros & Developers. It's quick & easy.

building C modules in windows + Python 2.3 + cygwin

P: n/a
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.
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Andreou,

On Thu, Feb 05, 2004 at 07:13:45PM +0200, Andreou Giannis wrote:
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

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6

Jul 18 '05 #2

P: n/a
On 2004-02-05, Andreou Giannis <ga******@unipi.gr> wrote:
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.

--
{ Marek Baczyński :: UIN 57114871 :: GG 161671 :: JID im******@jabber.gda.pl }
{ http://www.vlo.ids.gda.pl/ | imbaczek at poczta fm | http://www.promode.org }
... .. .. .. ... ... ...... evolve or face extinction ...... ... ... .. .. .. ..
Jul 18 '05 #3

P: n/a
Marek 'Baczek' Baczyński <im******@poczta.no.onet.spam.pl> writes:
On 2004-02-05, Andreou Giannis <ga******@unipi.gr> wrote:
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?)

[...]

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
Jul 18 '05 #4

P: n/a
Hi!

Andreou Giannis <ga******@unipi.gr> wrote in message news:<40***************@unipi.gr>...
Allthough it is possible to build modules in Python2.3.3 and distutils
with cygwin, .... I do not want to install VS ver.6.

....

Look here:
http://sebsauvage.net/python/mingw.html
Writing C/C++ Python extensions without Microsoft Visual C++

--
Oleg
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.