473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

building C modules in windows + Python 2.3 + cygwin

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
4 2392
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Carl Waldbieser | last post by:
I tried to adapt the instructions for building the M2Crypto module (http://sandbox.rulemaker.net/ngps/m2/INSTALL.html) to build a version compatible with Python2.3, but I've had some mixed results....
2
by: Rich Krauter | last post by:
>(I am aware that there is a Windows version of Python. >But it expects the >Windows syntax for paths, not the Unix/SFU paths. And >for all I know there >are other incompatibilities as well.) ...
8
by: Jonathan Polley | last post by:
I have one account on a WindowsXP machine that refuses to run IDLE (or any other python script that uses Tk). Other people can login to that PC and IDLE runs just fine, so it is not an...
2
by: mrstephengross | last post by:
Ok, I know there are already a million posts on this group about getting Python to build with MinGW. I've been through many of them, and have still not found a good comprehensive way to accomplish...
5
by: mrstephengross | last post by:
Ok, I'm working on building python 2.4.2 on cygwin. I *think* it's version 3.0 or 3.1 (is there a quick way to find out what version of cygwin is running within a shell?) Anyway, it appears to...
6
by: JW | last post by:
I have a lousy little Python extension, generated with the generous help of Pyrex. In Linux, things are simple. I compile the extension, link it against some C stuff, and *poof*! everything...
13
by: Chris Lasher | last post by:
Should a Python module not intended to be executed have shebang/ hashbang (e.g., "#!/usr/bin/env python") or not? I'm used to having a shebang in every .py file but I recently heard someone argue...
15
by: kyosohma | last post by:
Hi, I am trying to get a small group of volunteers together to create Windows binaries for any Python extension developer that needs them, much like the package/extension builders who volunteer...
0
by: mg | last post by:
When make gets to the _ctypes section, I am getting the following in my output: building '_ctypes' extension creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.