[Distutils] Question about usage of pje's setuptools
Phillip J. Eby
pje at telecommunity.com
Thu Nov 17 22:44:28 CET 2005
At 05:11 PM 11/17/2005 +0000, Luc Stepniewski wrote:
>I have made a program that I want to distribute as an egg. The problem is
>I need to put some files in directories like /etc/init.d and some
>configurations in a newly created directory in /etc.
>I know there is the "entry_points" + "console_scripts" stuff that I can
>my setup.py, but this is only for putting executables in /usr/bin.
>I know that setuptools is pretty new, and I understand the reasons why the
>sandbox refuses to create files outside of it, but if so, how do people
>big applications, that require configuration files, init files (at boot I
The common approach to this is to define console scripts that perform
installation and uninstallation of configuration files, creation of project
At some point, I'm thinking it might be useful to provide some install-time
entry point facility for doing these things as part of installation, but in
the meantime the recommended approach is to provide console scripts that
the user runs.
(One advantage to separate scripts is that you can offer either an
interactive setup or provide task-specific command-line options, since it's
rare that you have an application whose /etc configuration can be 100%
automated, due to differences in setup from one machine to the next.)
More information about the Distutils-SIG