
[David Goodger]
Distutils doesn't seem to be able to handle packages and individual modules simultaneously. Distutils complains if I specify both "packages" and "py_modules" in a single call.
[Thomas Heller]
I found the following code (commented out) in one of my setup scripts. It might do what you want, but it is untested:
It does exactly what I want; thanks! New setup.py: <http://docutils.sf.net/setup.py>. With this pointer, I looked up the Distutils source and found this comment in distutils.command.build_py.build_py.run: Two options control which modules will be installed: 'packages' and 'py_modules'. The former lets us work with whole packages, not specifying individual modules at all; the latter is for specifying modules one-at-a-time. Currently they are mutually exclusive: you can define one or the other (or neither), but not both. It remains to be seen how limiting this is. It seems (to me at least) that this is an arbitrary limitation. Is there any good reason not to allow both 'packages' and 'py_modules' in one call? If not, why not remove the limitation for everyone's benefit? -- David Goodger