[Distutils] Installing large applications
Fred L. Drake, Jr.
fdrake at acm.org
Tue Jun 15 12:22:21 EDT 2004
On Tuesday 15 June 2004 09:02 am, Flavio Codeco Coelho wrote:
> I would hope the installation procedure would keep all the files under a
> folder in site-packages named after the application name, which is given
> in the setup.py. That would make is easier to manually remove an
> application if necessary
If you make you application a script plus a Pyhon package, you'll get
something closer to what you're asking for. I've also merged in Phillip
Eby's package_data support for Python 2.4; this makes it easy to have data
installed into your package directly. Your setup.py could be simply:
-------------------------------------------------------
from distutils.core import setup
setup(...,
packages=['mypackage'],
package_data={'mypackage': ['mypackage/*.dat']},
scripts=['myscript.py'],
)
-------------------------------------------------------
This would cause the installation to be the script itself (still in
/usr/bin/), and a directory containing the Python package "mypackage"
(/usr/lib/python2.x/site-packages/mypackage/).
The package_data support will be available in Python 2.4, or you can use
Phillip's "setuptools" package. For more information about setuptools, see
http://cvs.sourceforge.net/viewcvs.py/python/python/nondist/sandbox/setuptools/
We've been using setuptools effectively for Zope X3, and have been pleased
with it. (We've only been using the package_data functionality, however.)
> (I reckon distutils does not support unistalls?
> please correct me if I am wrong).
Distutils is likely to grow an uninstaller at some point, once the
installation / package database is implemented. I'm not sure of the status
of that effort at this time, though I'd like to see it move forward. I know
Andrew Kuchling has worked on this and has invited others to participate, but
I'm sorry to say I've lacked the time.
> Maybe my frustrations are due to my lack of knowledge of distutils, but
> the documentation available does not help a lot.
No, the documentation doesn't help much. If you can offer *specific*
suggestions, preferrably in the form of bug reports (so they don't get lost),
I'll do what I can to improve the docs.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation
More information about the Distutils-SIG
mailing list