473,734 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2425
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=mingw3 2, if you want to create a
native Win32 Python extension:

$ python setup.py --dry-run build --compiler=mingw3 2
running build
running build_ext
building 'readline' extension
C:\Cygwin\bin\g cc.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\g cc.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******@poczt a.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
7182
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. I actually got everything to build and install, but when I try to import M2Crypto-- well, here is a sample session: >>> import M2Crypto Traceback (most recent call last): File "<interactive input>", line 1, in ? File...
2
2292
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.) Do you have to use SFU for some reason? If not, try cygwin - see http://www.cygwin.com. You don't have to build python from sources (just make sure python is selected during the install process), and you can
8
3773
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 installation issue. When the person who has the problem logs into another PC the problem follows them. Any ideas as to what might me wrong? This is the traceback from IDLE: C:\Python20\Tools\idle>..\..\python.exe idle.py Traceback (most recent call...
2
2155
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 this. I've got Cygwin 5.1 with GCC 3.3.3 on it. I'm using Python 2.4. Note: You invoke the mingwin compiler *indirectly*, by running gcc with the -mno-cygwin option. So first of all, I tried exporting CC='gcc -mno-cygwin', configuring,
5
1486
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 'configure' fine, but gcc reports a compile error when it gets to posixmodule.c. Here's the first few lines of the error message: ============================== gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.
6
2235
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 works. My employer wants me to create a Windows version of my extension that works with the vanilla Python 2.5 from python.org. My employment contract states that I won't be required to run Windows, and I desperately want to honor that clause....
13
4489
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 that shebangs were only appropriate for Python code intended to be executable (i.e., run from the command line).
15
3223
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 their time to create Linux RPMs. The main thing I need are people willing to test the binaries to make sure the extension is stable. This would require installing the binary and probably downloading the source too to get the developer's test
0
1808
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 creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes/libffi creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes/libffi/src
0
8780
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9456
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9246
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9186
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8190
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6742
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6035
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4816
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.