Doug: Yes: you'd either install using pip, or a package installer (apt,
yum, etc.). I'd sure like to get out of the business of custom installs
and, instead, rely on Python tools and all their goodness.

Vince: The thinking is that the config file, skins, and database would all
be initialized on first use, using the supplied readonly data as templates.
The problem is that it's hard to get weewxd going without doing some
customization, albeit via a series of prompts the way setup.py works now.

Alternatively, after the pip install, but before first use, the user would
be expected to "initialize" or "customize" the install via a tool, which is
when these resources would be copied into place.

The advantage of either of these approaches is that it mirrors what the
package installers do now, so it eliminates a lot of custom code.

The last possibility, albeit not the supported approach, is to do what I do
most of the time: run right out of the git repository.

I hear you on the complexity of Python packaging. I've been using node for
a few years now and they have done a much better job. Unfortunately, the
Python gods have decided to create a backend standard (PEP 517
<https://peps.python.org/pep-0517/>), and then rely on a 3rd party
ecosystem to do the actual packaging.


On Sun, Nov 6, 2022 at 1:32 PM Vince Skahan <[email protected]> wrote:

> Wow if you drill down through that thread it gets crazy confusing....but (this
> one)
> <https://discuss.python.org/t/should-there-be-a-new-standard-for-installing-arbitrary-data-files/7853/12>
> does help a little although (this other one)
> <https://discuss.python.org/t/modernising-my-packages-am-i-thinking-about-this-all-wrong/14558>
> got me confused again.  Seems like untrodden ground.
>
> That whole forum tagged with Packaging there can sure make your head spin !
>
> On Sunday, November 6, 2022 at 11:55:38 AM UTC-8 Tom Keffer wrote:
>
>> installs can only be done within "sys.prefix
>> <https://docs.python.org/3/library/sys.html#sys.prefix>". You can't just
>> roam around the file system and install things wherever you like. Hence,
>> a more unixy setup could not be done with pip, even if we wanted to.
>>
>
> Got it - but we're not installing a python 'module' here.  We're
> installing a pure python 'application' that is massively configurable by
> the user.  How do you do both ?
>
> Would it be a multi-step installation ala:
>
>    - install unconfigured weewx as a library under
>    /usr/lib/python3/dist-packages or the like (raspi example)
>    - and then have a utility therein that writes a customized config to
>    /home/weewx like it does now ?
>    - and how would skins, services, extensions, etc. be
>    installed/uninstalled/enabled/disabled/edited ?
>
> Guess I'm lost here for how we'd mechanically do a future installation
> updating a current very tweaked setup.py installation....or even how would
> I build one up from scratch.
>
>
>
> --
> 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/c128da8b-3837-4feb-be89-04a8d3dbf35cn%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/c128da8b-3837-4feb-be89-04a8d3dbf35cn%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/CAPq0zEAKrYy72i4n%3DzvcCxjJ6St5MvSaaZYtqTVvpwdiTCHPug%40mail.gmail.com.

Reply via email to