pipx inject weewx requests
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/a6f1e5d9-6337-47f8-8bf7-1e7613a3f9ccn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/f50492d7-4236-48f6-a5fd-8720a9e93c40n%40googlegroups.com.
python3 -m pip install weewx --userweectl station create
WARNING: The scripts weectl and weewxd are installed in '/home/vagrant/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.I worked around it with a quickie script for ubuntu 2204...
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/af4afd20-112f-4c13-be82-2b49060a4d2fn%40googlegroups.com.
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/2f77dcb7-603e-4a01-8432-b74b4ceaf2c1n%40googlegroups.com.
The configuration file will be created at /Users/tkeffer/weewx-data/weewx.conf.
Processing configuration file /Users/tkeffer/weewx-data/weewx.conf.
Making directory /Users/tkeffer/weewx-data/skins.
Copying new skin Smartphone into /Users/tkeffer/weewx-data/skins/Smartphone.
Copying new skin Rsync into /Users/tkeffer/weewx-data/skins/Rsync.
Copying new skin Standard into /Users/tkeffer/weewx-data/skins/Standard.
Copying new skin Ftp into /Users/tkeffer/weewx-data/skins/Ftp.
Copying new skin Mobile into /Users/tkeffer/weewx-data/skins/Mobile.
Copying new skin Seasons into /Users/tkeffer/weewx-data/skins/Seasons.
Unable to find the WeeWX executable 'weewxd'.
No daemon utility files will be created.
Make sure the pip user directory (typically ~/.local/bin) is in your PATH, then retry.
Removing /Users/tkeffer/weewx-data/docs.
Copying new docs into /Users/tkeffer/weewx-data/docs.
Removing directory /Users/tkeffer/weewx-data/examples.
Copying new examples into /Users/tkeffer/weewx-data/examples.
Creating a new 'user' directory at /Users/tkeffer/weewx-data/bin/user.
Save the configuration file to /Users/tkeffer/weewx-data/weewx.conf.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/2714b0e5-9a96-41c9-9e6d-1f1351ae8457n%40googlegroups.com.
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/0681d169-bb7e-4e15-94de-96c59897b0a5n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/d13f4e75-672d-467f-aa8d-42c8859a5db6n%40googlegroups.com.
um, why is "create a station" even looking for the location of weewxd?
at 'station create' time, why not just copy all of the parameterized utils into the utils directory, without replacing any parameters?
(by 'parameters' i mean the WEEWX_ROOT, WEEWX_BINDIR, WEEWX_CFGDIR and others like them. btw we need to canonicalize that list...)
when someone actually installs something from utils, only *then* do you replace the parameters. that is done either manually, or with weectl. at that time you know *exactly* where everything is located, because if you are doing it with weectl, you know where weectl, is thus you know where weewxd is. and if you are doing it manually, then you know what you are doing.
sudo weectl daemon install
the package installers are gonna want untouched, still-with-parameters-not-replaced-in-them files in the util directory. otherwise they will have to dig through the python tree to find them in their virgin form.
or maybe i am misunderstanding this thread?
pip install weewx --userweectl station create
sudo cp ~/weewx-data/systemd/weewx.service /etc/systemd/system
i expected it would have defaulted to $HOME/weewx-data, not /Users/Shared/weewx. it succeeded only because i had /Users/Shared/weewx and had permissions on that dir leftover from macos testing.
apparently 'weectl station create' does not install the utils:
On Monday, January 16, 2023 at 8:50:35 PM UTC-5 Tom Keffer wrote:at 'station create' time, why not just copy all of the parameterized utils into the utils directory, without replacing any parameters?(by 'parameters' i mean the WEEWX_ROOT, WEEWX_BINDIR, WEEWX_CFGDIR and others like them. btw we need to canonicalize that list...)weectl station create does exactly this, although in a backwards compatible way.we might have a different interpretation of 'backward compatible'. when i say 'backward compatible', this means that i can take any old weewx config file, and it will work, unmodified, with the latest backward-compatible release. there should be no need to modify the config - if there is, then that weewx release is not backward compatible.
tkeffer@gray-owl-air weewx-4.9.1 % diff weewx.conf -c ~/git/weewx/bin/wee_resources
*** weewx.conf Tue Oct 25 04:28:25 2022
--- /Users/tkeffer/git/weewx/bin/wee_resources/weewx.conf Sun Jan 15 15:07:38 2023
***************
*** 13,18 ****
--- 13,21 ----
# Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /home/weewx
+ # Where the 'user' directory is located, relative to WEEWX_ROOT:
+ USER_ROOT = bin/user
+
# Whether to log successful operations. May get overridden below.
log_success = True
***************
*** 20,26 ****
log_failure = True
# Do not modify this. It is used when installing and updating weewx.
! version = 4.9.1
##############################################################################
--- 23,29 ----
log_failure = True
# Do not modify this. It is used when installing and updating weewx.
! version = 5.0.0a11
##############################################################################
***************
*** 28,35 ****
[Station]
! # Description of the station location
! location = "My Little Town, Oregon"
# Latitude in decimal degrees. Negative for southern hemisphere
latitude = 0.00
--- 31,38 ----
[Station]
! # Description of the station location, such as your town:
! location = "WeeWX station"
# Latitude in decimal degrees. Negative for southern hemisphere
latitude = 0.00
***************
*** 46,52 ****
# If you have a website, you may specify an URL. This is required if you
# intend to register your station.
! #station_url = http://www.example.com
# The start of the rain year (1=January; 10=October, etc.). This is
# downloaded from the station if the hardware supports it.
--- 49,55 ----
# If you have a website, you may specify an URL. This is required if you
# intend to register your station.
! #station_url = https://www.example.com
# The start of the rain year (1=January; 10=October, etc.). This is
# downloaded from the station if the hardware supports it.
***************
*** 457,464 ****
# Defaults for SQLite databases
[[SQLite]]
driver = weedb.sqlite
! # Directory in which the database files are located
! SQLITE_ROOT = %(WEEWX_ROOT)s/archive
# Defaults for MySQL databases
[[MySQL]]
--- 460,467 ----
# Defaults for SQLite databases
[[SQLite]]
driver = weedb.sqlite
! # Directory in which the database files are located, relative to WEEWX_ROOT:
! SQLITE_ROOT = archive
# Defaults for MySQL databases
[[MySQL]]
i realize that the convention for weewx has been to modify a user's config file during an upgrade. to me, this is not "backward compatible", this is an upgrade of the config file.
just to clarify: at some point we explicitly separated the config-file-upgrade code so that dpkg/rpm could invoke that independently of upgrading the weewx code. now this will be available as 'weectl station upgrade' - upgrade the indicated weewx config file - with a separate option for explicitly upgrading the skins.
Give it a try:pip install weewx --userweectl station createsudo cp ~/weewx-data/systemd/weewx.service /etc/systemd/system
sudo cp ~/weewx-data/util/systemd/weewx.service /etc/systemd/system
That's it to get a daemon going.fwiw, this is what i get on an ancient macos (intel) using anaconda3 (python 3.8):% which pip
/Volumes/Software/sw/anaconda3/bin/pip
% pip install weewx --user
Requirement already satisfied: weewx in ./.local/lib/python3.8/site-packages (5.0.0a4)
Requirement already satisfied: PyMySQL<2.0,>=1.0 in ./.local/lib/python3.8/site-packages (from weewx) (1.0.2)
Requirement already satisfied: configobj>=4.7 in /Volumes/Software/sw/anaconda3/lib/python3.8/site-packages (from weewx) (5.0.6)
Requirement already satisfied: six<2,>=1 in /Volumes/Software/sw/anaconda3/lib/python3.8/site-packages (from weewx) (1.15.0)
Requirement already satisfied: Pillow<10.0,>=9.3 in ./.local/lib/python3.8/site-packages (from weewx) (9.3.0)
Requirement already satisfied: pyusb<2.0.0,>=1.0.2 in ./.local/lib/python3.8/site-packages (from weewx) (1.2.1)
Requirement already satisfied: pyephem<4.0,>=3.7 in ./.local/lib/python3.8/site-packages (from weewx) (3.7.7.0)
Requirement already satisfied: CT3<4.0,>=3.1 in ./.local/lib/python3.8/site-packages (from weewx) (3.3.1)
Requirement already satisfied: pyserial<4.0,>=3.4 in ./.local/lib/python3.8/site-packages (from weewx) (3.5)
Requirement already satisfied: ephem==3.7.7.0 in ./.local/lib/python3.8/site-packages (from pyephem<4.0,>=3.7->weewx) (3.7.7.0)
% export PATH=/Users/mwall/.local/bin:$PATH
% weectl --version
weectl v5.0.0a4
% weectl station create
The configuration file will be created at /Users/Shared/weewx/weewx.conf.
...
i expected it would have defaulted to $HOME/weewx-data, not /Users/Shared/weewx. it succeeded only because i had /Users/Shared/weewx and had permissions on that dir leftover from macos testing.
apparently 'weectl station create' does not install the utils:
...
regarding the directory specifications in the weewx config file:1) is SQLITE_ROOT relative to WEEWX_ROOT *only* if it is a relative path? (where relative path is something that starts with anything other than /) so i assume that "SQLITE_ROOT = %(WEEWX_ROOT)s/archive" will become simply "SQLITE_ROOT = archive". however, if weewx is going to be backward compatible, then it will still have to do expansion of WEEWX_ROOT when it finds %(WEEWX_ROOT)s...
2) are SKIN_ROOT and HTML_ROOT also relative to WEEWX_ROOT? (but only if they are a relative path)
3) where do the local, html-ified weewx docs live on a pip install?