[Python-Dev] MS VC 7 offer
Greg Spencer
greg_spencer@acm.org
Wed, 7 May 2003 10:58:03 -0600
Well, I'm almost done with the SCons integration for both VC6 and VC7. Just
some tests to write and integration into the current codeline to do.
Paolo, I'm not sure what you mean by "full" support for VC7, but here's what
I'm working on:
1) SCons writes out and maintains (as a "product" of the build) a .dsw and
.dsw file for VC6, or an .sln and .vcproj file for VC7.
2) The project and solution files contain "External Makefile" targets, which
in MSVC means that it will launch an external command when the "build"
button is pressed.
3) The project files contain all of the sources configured in the SCons
file, and you can include as many additional files as you would like. The
SConscript file that generated the .dsp or .vcproj file is automatically
included in the source list so you can edit it from the IDE.
With this scheme, you can browse the class hierarchy, edit resource files,
build the project, double-click on errors (if any :-), edit source files
from the IDE, launch the executable (if any) in the debugger, lather, rinse,
repeat.
The build is then completely controlled by the Python SConscripts, with the
full flexibility that offers, and the project files are now just products of
the build that will be blown away and regenerated any time they need to be
rebuilt.
The only things I've discovered that you can't do with this scheme are
insert ActiveX controls (because the menu items are disabled) and build
individual object files.
At first glance, it seems like the logical choice for VS integration is to
build a plugin to Visual Studio, but for VS6, there aren't really enough
trigger events to capture the appropriate information at the right times, so
it's not really feasible.
For VS7, I think things are much more promising in the plugin department,
but truthfully, I'm not sure there's much added value. You could insert new
ActiveX controls with the wizard and build individual files, sure. But do
you really want to change build settings from within the IDE's dialogs? I
haven't really decided how this would even work. Probably you'd need a
third configuration file that both the VS7 tool and the SConscript could
share so that they could get their build setting information. Yet another
config file, and now you'd have to keep the .sln and .vcproj files too,
making a total of four files that control the build. They'd be in sync, but
one file is always better than four. Also, this only works for VS7, and
it's complex.
I'm still considering a VS7 plugin as a possible future direction, but I
need some compelling reasons to do it. I've used the "External Makefile"
scheme with classic Cons for four years now, and I haven't had any major
complaints from anyone -- they're just overjoyed that their build is
automated and "just works", and they can still use the IDE for 90% of what
they used it for before. Not to mention all the benefits of using a build
system like SCons (centralized setting of build parameters for all projects,
for instance).
I hope that addresses your needs. If you have suggestions or questions,
feel free to e-mail me.
BTW, I don't subscribe to python-dev, so be sure to CC me in this thread.
-Greg.
P.S. Thanks for creating a language that a Perl guy can learn in a week.
And I thought shifting from classic cons to scons would be hard... :-)
-----Original Message-----
From: Paolo Invernizzi [mailto:paoloinvernizzi@dmsware.com]
Sent: Wednesday, May 07, 2003 1:13 AM
To: python-dev@python.org
Cc: Mark Hammond; greg_spencer@acm.org
Subject: Re: [Python-Dev] MS VC 7 offer
Mark Hammond wrote:
>Another thing to consider is the "make" environment. If we don't use
>DevStudio, then presumably our existing project files will become useless.
>Not a huge problem, but a real one. MSVC exported makefiles are not
>designed to be maintained. I'm having good success with autoconf and
Python
>on other projects, but that would raise the barrier to including cygwin in
>your build environment.
>
I think the scons (www.scons.org) will have in its next release full
support for building targets using VC6 *project* file, and full support
for VC7.
Actually it has support also for cygwin and mingw...
So I think is possible to have an automated way for building VC7 python
based only on some scons script and VC6 project files...
The possible goal is to keep working with VC6 IDE as now, and have a
simple build script able to automatically build the VC7 version tracking
changes..
I've inserted Greg Spencer, who I know is working on this... surely he
can bring us more details.
---
Paolo Invernizzi.