[Distutils] Problems with distutils and multiple developers under sol2 (unix)

Berthold Höllmann hoel@germanlloyd.org
Mon Jan 15 05:49:01 2001


hoel@germanlloyd.org (Berthold Höllmann) writes:

> Hello,
> 
> We are developing a set of inhouse applications using Python. To put
> our Python code to the appropriate places under different Operating
> systems, we use distutils. But we have a problem with the unix
> permissons. User A develops package a.py and installs it using
> distutils. Later user B finds an enhancement/bug, corrects package
> a.py. But when he tries to install this using distutils he always gets
> an error message when distutils try to set the file permissions this
> fails because user A is still owner of the copied file after the
> copiing process. I think, distutils should first delete an old file,
> before trying to install/copy a new one. Can anyone see any problem
> with this aproach? Or should the "chmod" command simly included in a
> "try:" block to ignore errors that might occur?

As a followup, here my solution of the problem for distutils 1.0.1:

in the file "file_util.py" I inserted the 

            if os.path.isfile(dst): os.remove(dst)

as new line 40 in the function "_copy_file_contents". This seems to
work at least for us. I hope, that something like that can make its
way into the next distutils versions.


Thanks

Berthold
-- 
       email: hoel@GermanLloyd.org
   )   tel. : +49 (40) 3 61 49 - 73 74
  (
C[_]  These opinions might be mine, but never those of my employer.