My only complaint about Python

D

Darren Dale

I love the language. I love the community. My only complaint is that
Python for Windows is built with Visual Studio.

It is too difficult to build python, or a module, from source. This is
what open source is all about, isnt it? I even have a copy of visual
studio, and I still cant build modules from source, because my academic
copy is version 7. As a scientist funded by the NSF, I feel compelled to
do all my work using free software (I feel compelled to use free
software, regardless). And I feel compelled to contribute to the
scientific capabilities of my favorite programming language. But this
compiler issue is a big (and seemingly unnecessary) impediment. Will the
BDFL ever split with Visual Studio?
 
R

Ralf Schmitt

Darren Dale said:
I love the language. I love the community. My only complaint is that
Python for Windows is built with Visual Studio.

It is too difficult to build python, or a module, from source. This is
what open source is all about, isnt it? I even have a copy of visual
studio, and I still cant build modules from source, because my
academic copy is version 7. As a scientist funded by the NSF, I feel
compelled to do all my work using free software (I feel compelled to
use free software, regardless). And I feel compelled to contribute to
the scientific capabilities of my favorite programming language. But
this compiler issue is a big (and seemingly unnecessary)
impediment. Will the BDFL ever split with Visual Studio?

You can build modules using msys/mingw. Instructions can be found at
http://sebsauvage.net/python/mingw.html
 
I

Istvan Albert

Darren said:
I love the language. I love the community. My only complaint is that
Python for Windows is built with Visual Studio.

It is too difficult to build python, or a module, from source.

In all fairness this is more the problem with Microsoft than
python. If they had a free fully-featured compiler then Python
would be compiled with that.

Microsoft seems to have made some half-hearted attempt in
this direction so that is promising.

I know that there are other compilers for windows but their
market penetration is far less and thus expertise to use them
is hard to come by.

I myself am in a very similar position, have a hard time
deploying extension modules on windows. My usual workaround
is to have a second python available via cygwin where I can
compile everything then then use remote procedural calls
via XMPRPC to connect from the windows python. Clearly
this will work only in certain cases.

Istvan.
 
D

David Fraser

Darren said:
I love the language. I love the community. My only complaint is that
Python for Windows is built with Visual Studio.

It is too difficult to build python, or a module, from source. This is
what open source is all about, isnt it? I even have a copy of visual
studio, and I still cant build modules from source, because my academic
copy is version 7. As a scientist funded by the NSF, I feel compelled to
do all my work using free software (I feel compelled to use free
software, regardless). And I feel compelled to contribute to the
scientific capabilities of my favorite programming language. But this
compiler issue is a big (and seemingly unnecessary) impediment. Will the
BDFL ever split with Visual Studio?

I agree. I don't mind it being built with Visual Studio, but out of the
box mingw compatibility would be cool...
 
J

John Hunter

David> I agree. I don't mind it being built with Visual Studio,
David> but out of the box mingw compatibility would be cool... --
David> http://mail.python.org/mailman/listinfo/python-list

The only thing that needs to be done for mingw compatibility is to
build the import lib, right? It would be nice if the win32 python
shipped with that; it's only 37K gzipped.

I have a batch script to create libpython23.a, for those who are
interested. It requires pexports-0.42h from
http://starship.python.net/crew/kernr/mingw32/pexports-0.42h.zip
extracted to C:\Program Files\pexports-0.42h, and of course mingw.

Your paths may vary...

copy c:\windows\system32\python23.dll .
c:\progra~1\pexports-0.42h\bin\pexports python23.dll > python23.def
c:\MinGW\bin\dlltool --dllname python23.dll --def python23.def --output-lib libpython23.a

copy libpython23.a c:\python23\libs
del python23.dll
del libpython23.a
 
P

Peter Maas

Istvan said:
In all fairness this is more the problem with Microsoft than
python. If they had a free fully-featured compiler then Python
would be compiled with that.

Isn't the free Borland 5.5 compiler full featured?
 
D

Dominic

I have a batch script to create libpython23.a, for those who are
interested. It requires pexports-0.42h from
http://starship.python.net/crew/kernr/mingw32/pexports-0.42h.zip
extracted to C:\Program Files\pexports-0.42h, and of course mingw.
I have successfully built libpython23.a using
implib.exe provided with the free Borland C/C++ command line
compiler package.
Once this is done, cygwin-gcc can be used to create
_native_ windows modules.
If someone is interested I'll try to collect the
necessary commands and flags from my Makefiles.

Ciao,
Dominic
 
I

Istvan Albert

Dominic wrote:

I have successfully built libpython23.a using
implib.exe provided with the free Borland C/C++ command line
compiler package.
Once this is done, cygwin-gcc can be used to create
_native_ windows modules.
If someone is interested I'll try to collect the
necessary commands and flags from my Makefiles.

I'm interested. You should even make your copy of
libpython23.a downloadable too.

Istvan,
 
D

David Fraser

Istvan said:
In all fairness this is more the problem with Microsoft than
python. If they had a free fully-featured compiler then Python
would be compiled with that.

Microsoft seems to have made some half-hearted attempt in
this direction so that is promising.

There's a difference between free and open source. I agree that having
python compilable using a freely available open source compiler is important

David
 
G

Gisle Vanem

John Hunter said:
Your paths may vary...

copy c:\windows\system32\python23.dll .
c:\progra~1\pexports-0.42h\bin\pexports python23.dll > python23.def
c:\MinGW\bin\dlltool --dllname python23.dll --def python23.def --output-lib libpython23.a

copy libpython23.a c:\python23\libs
del python23.dll
del libpython23.a

Shouldn't that be "libpython23.dll.a" as per normal conventions
on MingW? I.e. a static lib would be "libpython23.a". But I guess
that's impossible or impractical.

--gv
 
T

Tim Peters

[Darren Dale[
...
Will the BDFL ever split with Visual Studio?

We should be clear here that this isn't Guido's decision. What you
get on Windows is what you get on all other platforms in this respect:
you get what volunteers show up to produce, year after year after
year. So you get a fine Cygwin port from Jason Tishler, seemingly
toiling all alone, and you get contributions from at least four
developers who do use Visual Studio.

I don't think that's an accident. Most open source jockeys who use
Windows do so because it's needed for their day job, and sticking with
an MS compiler is widely perceived in pointy-hair boss-land as the
safest course on Windows. And it is a first-class IDE, so there's no
pragmatic reason to wrestle with yet another system when the day job
ends. It takes real sweat to get comfortable with any C development
tool chain, and it takes years to become familiar wth each one's
maddening quirks.

I expect that's why Guido still uses Visual Studio when he's running
on Windows (and know it's why I do), but he actually hasn't had
anything to do with the Windows Python releases for years. Things
Will Change when long-term volunteers show up and change them.
 
G

Greg Ewing

David said:
I agree. I don't mind it being built with Visual Studio, but out of the
box mingw compatibility would be cool...

As a step towards this, it would be useful if it were
distributed with the libpythonXX.a that mingw requires
already built. Then it would just be a matter of giving
the appropriate flag to setup.py when compiling a module.
 
T

Tim Roberts

Darren Dale said:
.... As a scientist funded by the NSF, I feel compelled to
do all my work using free software (I feel compelled to use free
software, regardless).

Then what on Earth are you doing with Windows?
 
F

flab ba

I use Python for mission-critical enterprise level stuff, and I have to
say that on **Windows**, I'd rather it be compiled with MSVC, and not
something like MingW or GCC.

Under no circumstances would I put something in production if it was using
Cygwin.

There is nothing to stop you from compiling Python yourself with the free
Visual C++ Toolkit. Instructions are here:

http://www.vrplumber.com/programming/mstoolkit/index.html
http://mail.python.org/pipermail/python-dev/2004-February/042595.html

When the 2005 Toolkit comes out, I have a sneaky suspicion that the
"Starter" pack will be good enough to compile Python - which will be
very cheap (maybe even as low as $50).

An important part of Python for Windows is Mark Hammond's Windows
extensions - I wonder if these rely on a very "windows-savy" compiler like
(Borland or VC++ )

-Flab
 
5

510046470588-0001

flab ba said:
with the free Visual C++ Toolkit. Instructions are here:

all humbug. Visual C++ is nowhere near free, it's all proprietary.

Klaus Schilling
 
D

Darren Dale

Tim said:
[Darren Dale[
...
Will the BDFL ever split with Visual Studio?


We should be clear here that this isn't Guido's decision. What you
get on Windows is what you get on all other platforms in this respect:
you get what volunteers show up to produce, year after year after
year. So you get a fine Cygwin port from Jason Tishler, seemingly
toiling all alone, and you get contributions from at least four
developers who do use Visual Studio.

I meant no disrespect to the developers.
I don't think that's an accident. Most open source jockeys who use
Windows do so because it's needed for their day job, and sticking with
an MS compiler is widely perceived in pointy-hair boss-land as the
safest course on Windows. And it is a first-class IDE, so there's no
pragmatic reason to wrestle with yet another system when the day job
ends. It takes real sweat to get comfortable with any C development
tool chain, and it takes years to become familiar wth each one's
maddening quirks.

I expect that's why Guido still uses Visual Studio when he's running
on Windows (and know it's why I do), but he actually hasn't had
anything to do with the Windows Python releases for years. Things
Will Change when long-term volunteers show up and change them.

This comes back to the heart of the matter. How do you get volunteers
who dont have access to VS to get involved with Python development? I
think the suggestions here were right on, give Python the ability to
support MinGW out of the box. I thought that a compiler could even be
included in a version of the Windows distribution, but maybe that is
taking it too far.
 
P

Paul Boddie

Tim Peters said:
So you get a fine Cygwin port from Jason Tishler,

[...]

Yes, it certainly is a great port! I'm rarely using the native Python
under Windows, but then Cygwin is an island of sanity in that
environment.

Paul
 
D

Darren Dale

I'm going to be out of touch for a few days... sorry to leave this while
its still being discussed.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top