[Distutils] Setting group and owner on installed files

M.-A. Lemburg mal@lemburg.com
Sat Nov 10 13:59:01 2001


Fran=E7ois Pinard wrote:
>=20
> Hello, my Distutils friends! :-)
>=20
> I've been reading this list for a good while, but this is my first mess=
age
> here, so far that I remember.  Before going any further, let me express
> my satisfaction about `distutils', which gives us the mean of very simp=
le
> and surprisingly quick installations of our Python things.
>=20
> Despite we use some recent Python version on a few machines, we use Pyt=
hon
> 1.5.2 for most of them.  I installed Distutils explicitely on all those=
,
> so it is available everywhere and to everybody in the team, here.  We a=
re
> many people (accounts) installing local Python code, and we like avoidi=
ng
> being root while installing.  Our setup use 2775 on installation direct=
ories
> and 664 or 775 for installed files, everything under the same Unix grou=
p.

Well, the low-level machinery certainly is there in distutils;
it's just that the commands don't support setting the installation
mode for directories and files. Would make a nice addition indeed.

The right location for such a site-wide distutils configuration
would be a site setup.cfg file (don't remember where distutils
looks for this, but the code should have that information).

In the meantime, I'd suggest to use the Unix umask setting and
perhaps a small shell script which you tell people to use for
installing using distutils (or perhaps create a custom
distutils installation which uses your mode settings).
=20
> It would be very convenient to us if we could manage with Distutils, so
> these permissions and common group were enforced on installation files,
> directly at `python setup.py install' time.  The main purpose of this l=
etter
> is suggesting such a feature for some later version of Distutils.  But =
also,
> to welcome any clever suggestion someone could have in the meantime!

Patches are always welcome too ;-)

--=20
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/