I deleted daemon_config.py in 5.0.0a11, so it is consistent. :-)

I couldn't get sudo weectl daemon install to work because sudo causes the
path to change. So, the user would have to give an explicit path to weectl.
Too complicated.



On Mon, Jan 16, 2023 at 2:36 PM Vince Skahan <[email protected]> wrote:

> I'm suggesting adding one more lowest-precedence check before giving up,
> just like you do in the other utility.
>
> Not seeing a downside here.  This closes one chance for failure to install.
>
>    - If you are installing and 'not' in a venv, it would try ~/.local/bin
>    as a last-gasp try to find it in the place pip put it.   That fixes the
>    clean installation problem.
>
>
>    - If you 'are' in an activated venv, it will find the right weewxd
>    since the venv's bin/ tree is first in an activated venv's $PATH, so no
>    later belts+suspenders checks are never called.  You could put lowest
>    precedence 20 'try here, no here' checks in there safely.  (tested on
>    ubuntu2204)
>
> But I'd suggest there some should be consistency in daemon_config.py
> (which has the last-gasp test) and station_config.py (which does not).
> Personally I'd cut+paste from one to the other and have the last-gasp check
> in both.
>
> On Monday, January 16, 2023 at 1:35:18 PM UTC-8 Tom Keffer wrote:
>
>> I abandoned that approach because it's possible that the user is
>> installing into a virtual environment. Searching ~/.local/bin could find a
>> weewxd that is not at all related to the implementation at hand.
>>
>> On Mon, Jan 16, 2023 at 12:17 PM Vince Skahan <[email protected]> wrote:
>>
>>> Quick grep for weewxd in the v5 branch says that station_config.py will
>>> fail if $PATH isn't complete, but it looks at first glance like
>>> daemom_install in daemon_config.py has a nicer failsafe way to search for
>>> weewxd.   Maybe it's just a cut+paste thing to try (?)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "weewx-development" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-development/0681d169-bb7e-4e15-94de-96c59897b0a5n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-development/0681d169-bb7e-4e15-94de-96c59897b0a5n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/d13f4e75-672d-467f-aa8d-42c8859a5db6n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/d13f4e75-672d-467f-aa8d-42c8859a5db6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zED%3DX_hcuuCUDA81JLW1fnHHbVwpkjYkiK6Cz-MLH_ubBQ%40mail.gmail.com.

Reply via email to