Tom Keffer <[email protected]> writes: > On Wed, May 6, 2020 at 6:30 AM Greg Troxel <[email protected]> wrote: > >> Tom Keffer <[email protected]> writes: >> >> > In fact, I would appreciate it if you could point me to any non-trivial >> > application that pip installs. I couldn't find any. Just libraries. >> >> home assistant >> >> which is sort of like weewx, but more complicated. >> >> My home assistant install, via pip in a venv, has 119 modules. >> > > Thanks. Can you point me to its page on pypi? All I'm seeing is this one, > and it seems to be a front-end framework, not an application: > https://pypi.org/project/home-assistant-frontend/
pip show prints out Name: homeassistant Version: 0.108.6 Summary: Open-source home automation platform running on Python 3. Home-page: https://www.home-assistant.io/ Author: The Home Assistant Authors Author-email: [email protected] License: Apache License 2.0 Location: /d0/u0/home/gdt/HASS/lib/python3.7/site-packages Requires: astral, ruamel.yaml, voluptuous, python-slugify, importlib-metadata, requests, attrs, pyyaml, voluptuous-serialize, jinja2, ciso8601, aiohttp, pip, pytz, cryptography, async-timeout, PyJWT, certifi, bcrypt Required-by: and I think this is: https://pypi.org/project/homeassistant/ (The -frontend package is I think the stuff that gets downloaded to your browser to access the server.) I have been upgrading this via pip for quite a while. > >> Requirements for a pip install: >> > >> > 1. Ability to install into one directory, such as /home/weewx. It's OK >> > if it takes some contorted setting of install directories in order to >> do >> > this, but I like having all state, all libraries, all code, in one >> spot. It >> > makes my life easier. >> >> Is that really a pip requirement? pip can install in a virtualenv, and >> for instance I have all homeassistant stuff in a venv in ~/HASS. > > Yes, that can work, although it has a different set of problems. > > - Another tool to learn. > - Yes, everything in one virtual environment, but the bits and pieces > are scattered about within that environment. > - Venvs tend to be "disposable", so it's no place to put the database, > which would still have to be put somewhere else. > - Same with skins I was not suggesting that everybody use pip/venv. I was just commenting about the pip way. I favor having a distribution that follows norms and then having that distribution and all dependencies wrapped by a packaging system (each one, really), so that on any given system, the native package tools work for weewx, just like they do for the large number of other packages. My understanding, pretty fuzzy, is that there is a debian package that rearranges a bunch of the install stuff. >> As for namespaces, weewx may need to install all modules as weewx/foo >> instead of foo. That doesn't seem terrible. > > Yes, that's the solution, but it would require patching all *.conf files to > reflect the new location of user modules and schemas. Or, we can install a > custom __import__ that first tries (for example) weewx.schema, then schema. I don't follow this. weewx.conf is not in python and I don't see module names in it. I'm sure I'm missing something here. Is this also about third-party modules that want to import things? > I hope I'm not coming across as passive-aggressive, because, really, I'm > not. It's just that all these solutions have been considered in the past > and rejected for one reason or another. This isn't the first time we've > looked at this. The requirements I listed in an earlier email are there for > a reason. You are not coming across as unreasonable. It is rather seeming like the historical path has led to a bad situation, where weewx isn't doing thigns the normal way, leading to it needing special manual attention, and it's also awkward to adjust it. I would be inclined to not so much focus on pip per se but to move towards a bin, lib/pythonN.Y, etc/weewx, var/weewx, and so on split and namespace cleanup as necessary (perhaps limited to things in lib/pythonN.Y all being under weewx). That is probably 90% of what pip needs. -- 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/rmimu6lko76.fsf%40s1.lexort.com.
signature.asc
Description: PGP signature
