
I began writing the fabled fancy setup script described in PEP 229, and then realized there was duplication going on here. The code in setup.py would need to know what libraries, #defines, &c., are needed by each module in order to check if they're needed and set them. But if Modules/Setup can be used to override setup.py's behaviour, then much of this information would need to be in that file, too; the details of compiling a module are in two places. Possibilities: 1) Setup contains fully-loaded module descriptions, and the setup script drops unneeded bits. For example, the socket module requires -lnsl on some platforms. The Setup file would contain "socket socketmodule.c -lnsl" on all platforms, and setup.py would check for an nsl library and only use if it's there. This seems dodgy to me; what if -ldbm is needed on one platform and -lndbm on another? 2) Drop setup completely and just maintain setup.py, with some different overriding mechanism. This is more radical. Adding a new module is then not just a matter of editing a simple text file; you'd have to modify setup.py, making it more like maintaining an autoconf script. Remember, the underlying goal of PEP 229 is to have the out-of-the-box Python installation you get from "./configure;make" contain many more useful modules; right now you wouldn't get zlib, syslog, resource, any of the DBM modules, PyExpat, &c. I'm not wedded to using Distutils to get that, but think that's the only practical way; witness the hackery required to get the DB module automatically compiled. You can also wave your hands in the direction of packagers such as ActiveState or Red Hat, and say "let them make to compile everything". But this problem actually inconveniences *me*, since I always build Python myself and have to extensively edit Setup, so I'd like to fix the problem. Thoughts? --amk

"A.M. Kuchling" wrote:
Can't distutils try both and then settle for the working combination ? [distutils isn't really ready for auto-configure yet, but Greg has already provided most of the needed functionality -- it's just not well integrated into the rest of the build process in version 1.0.1 ... BTW, where is Gerg ? I haven't heard from him in quite a while.]
Why not parse Setup and use it as input to distutils setup.py ?
Nice idea :-) -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/

On Fri, Dec 15, 2000 at 11:39:18PM +0100, M.-A. Lemburg wrote:
Can't distutils try both and then settle for the working combination ?
I'm worried about subtle problems; what if an unneeded -lfoo drags in a customized malloc, or has symbols which conflict with some other library.
... BTW, where is Greg ? I haven't heard from him in quite a while.]
Still around; he just hasn't been posting much these days.
Why not parse Setup and use it as input to distutils setup.py ?
That was option 1. The existing Setup format doesn't really contain enough intelligence, though; the intelligence is usually in comments such as "Uncomment the following line for Solaris". So either the Setup format is modified (bad, since we'd break existing 3rd-party packages that still use a Makefile.pre.in), or I give up and just do everything in a setup.py. --amk

Forget Setup. Convert it and be done with it. There really isn't enough there to hang on to. We'll support Setup format (through the makesetup script and the Misc/Makefile.pre.in file) for 3rd party b/w compatibility, but we won't need to use it ourselves. (Too bad for 3rd party documentation that describes the Setup format. :-) --Guido van Rossum (home page: http://www.python.org/~guido/)

Andrew Kuchling wrote:
In that case, I think the user will have to decide. setup.py should then default to not integrating the module in question and issue a warning telling the use what to look for and how to call setup.py in order to add the right combination of libs.
... BTW, where is Greg ? I haven't heard from him in quite a while.]
Still around; he just hasn't been posting much these days.
Good to know :)
I would still like a simple input to setup.py -- one that doesn't require hacking setup.py just to enable a few more modules. -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/

"A.M. Kuchling" wrote:
Can't distutils try both and then settle for the working combination ? [distutils isn't really ready for auto-configure yet, but Greg has already provided most of the needed functionality -- it's just not well integrated into the rest of the build process in version 1.0.1 ... BTW, where is Gerg ? I haven't heard from him in quite a while.]
Why not parse Setup and use it as input to distutils setup.py ?
Nice idea :-) -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/

On Fri, Dec 15, 2000 at 11:39:18PM +0100, M.-A. Lemburg wrote:
Can't distutils try both and then settle for the working combination ?
I'm worried about subtle problems; what if an unneeded -lfoo drags in a customized malloc, or has symbols which conflict with some other library.
... BTW, where is Greg ? I haven't heard from him in quite a while.]
Still around; he just hasn't been posting much these days.
Why not parse Setup and use it as input to distutils setup.py ?
That was option 1. The existing Setup format doesn't really contain enough intelligence, though; the intelligence is usually in comments such as "Uncomment the following line for Solaris". So either the Setup format is modified (bad, since we'd break existing 3rd-party packages that still use a Makefile.pre.in), or I give up and just do everything in a setup.py. --amk

Forget Setup. Convert it and be done with it. There really isn't enough there to hang on to. We'll support Setup format (through the makesetup script and the Misc/Makefile.pre.in file) for 3rd party b/w compatibility, but we won't need to use it ourselves. (Too bad for 3rd party documentation that describes the Setup format. :-) --Guido van Rossum (home page: http://www.python.org/~guido/)

Andrew Kuchling wrote:
In that case, I think the user will have to decide. setup.py should then default to not integrating the module in question and issue a warning telling the use what to look for and how to call setup.py in order to add the right combination of libs.
... BTW, where is Greg ? I haven't heard from him in quite a while.]
Still around; he just hasn't been posting much these days.
Good to know :)
I would still like a simple input to setup.py -- one that doesn't require hacking setup.py just to enable a few more modules. -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
participants (4)
-
A.M. Kuchling
-
Andrew Kuchling
-
Guido van Rossum
-
M.-A. Lemburg