Roundup Tracker - Issues

Message7366

Author marcus.priesch
Recipients marcus.priesch, rouilj
Date 2021-11-10.09:00:52
Message-id <32c162ba-03f6-40f9-f5d0-d23fde144716@priesch.co.at>
In-reply-to <20211109225155.CBBB76A02DE@pe15.cs.umb.edu>
Hi John,

>>>           while tail != 'lib' and head != '':
>>>               head, tail = os.path.split(head)

I really dont know what you are trying to achieve with this piece of
code, but shouldnt there be a more general approach to get there?

i am pretty sure that other python packagers have the same problem and
it is already solved somehow ? or am i wrong ?

why do you need to access anything above "platlib" ?

>>>>> get_path("platlib")
>> '/home/pr/work/projects/5t-roundup/ve2/lib64/python2.7/site-packages'

... doesnt it always end with .../pythonX.X/site-packages ?

then you could just strip the last two dirs to get there ...

searching for something like "lib" or "lib64" without context could 
always lead to problems ... like you stated ;)

> I wonder if we can do better on the lib check. Would:
> 
>    if tail not in [ 'lib', 'lib64' ] and head != '/':

yes, until someone comes up with lib128 or lib32 ;)

> work? I am thinking of a user libby who creates a virtual env under
> /home/libby/roundup. Matching ^lib would make a mess of her home
> directory.  (Yes, a libby born in 1964 could have username lib64
> but....)

according usernames: it will find lib or lib64 before the home dir:

'/home/libby/work/projects/5t-roundup/ve2/lib64/python2.7/site-packages'
'/home/lib64/work/projects/5t-roundup/ve2/lib64/python2.7/site-packages'

ps: i worked on roundup with ralf about 15 years ago, but rarely used it
in between ... and now i am back for some project we are working on
together ;)

regards,
marcus.
History
Date User Action Args
2021-11-10 09:00:52marcus.prieschsetrecipients: + marcus.priesch, rouilj
2021-11-10 09:00:52marcus.prieschlinkissue2551169 messages
2021-11-10 09:00:52marcus.prieschcreate