[issue1759] writing __version__.py and permissions when installing

David M. Cooke mercurial-bugs at selenic.com
Thu Jul 23 23:28:45 UTC 2009


New submission from David M. Cooke <david.m.cooke at gmail.com>:

I install python packages by building them as one user, and installing them 
as another (non-root!) user. This second user doesn't have write permissions 
to the directory where I'm building from, so writing 
mercurial/__version__.py fails.

Additionally, if the root user is used to install, mercurial/__version__.py 
will be owned by root.

The attached patch only writes mercurial/__version__.py if the version from 
there doesn't match the one determined by the version-detecting code (i.e., 
the file doesn't exist, or belongs to an different version). In particular, 
if 'python setup.py build' is first issued, 'python setup.py install' will 
not write __version__.py out, fixing the two problems above.

Patch is against changeset 65719472bfa2 (Thu Jul 23 15:26:29 2009 -0500)

----------
files: writing__version__.diff
messages: 10189
nosy: dmcooke
priority: bug
status: unread
title: writing __version__.py and permissions when installing

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://mercurial.selenic.com/bts/issue1759>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: writing__version__.diff
Type: application/octet-stream
Size: 782 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090723/d3fa84b6/attachment.obj 


More information about the Mercurial-devel mailing list