On Fri, Oct 2, 2015 at 2:45 PM, Nathaniel Smith <njs@pobox.com> wrote:
> I would rather see an sdist format that can be introspected *without*
> running code or a build tool.

indeed -- this has come up a lot on this list, for binary dists, too, of course.

but  "build script as turing complete" [someone posted that in this thread...] requirement is there, too...

but maybe we can get a long way with convention, without changing the tools.

A setup.py is typically a bunc of stuff that builds up the setup, and then a call to setup.py, passing in teh objects created to various paramters.

But if we tried to establish a convention that your setup.py would do:

a_bunch_of_stuff_that_bulit_up_a_dict_of_options

then

setup(**setup_options_dict)

then the_options_dict could be introspected without actually createing a seteup object.

and in the easy cases, the_options_dict could be completely declarative, and maybe even stored in another file.

and in the complex cases, it could still have all the parts that could be pre-declared declarative, so setup.py would be:

setup_options_dict = load_options_dict("setup_options.txt")

[do assorted complex stuff to edit/add to setup_options_dict]

setup(**setup_options)

would this move us toward an as-declarative-as-possible setup.py?

-CHB


--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov