Re: [weewx-development] Re: Package weewx like other python projects

2020-05-22 Thread Tom Keffer
Discussion (and answer) moved to issue #552 . On Fri, May 22, 2020 at 9:53 AM Till Maas wrote: > On Sun, May 10, 2020 at 10:19:41AM -0700, mwall wrote: > > > > > > On Sunday, May 10, 2020 at 11:37:17 AM UTC-4, Till Maas wrote: > > > > > > > > > >4.

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-22 Thread Till Maas
On Sun, May 10, 2020 at 10:19:41AM -0700, mwall wrote: > > > On Sunday, May 10, 2020 at 11:37:17 AM UTC-4, Till Maas wrote: > > > > > > >4. weewx.conf gets automatically patched by an upgrade. This is a big > > >feature of weewx over the standard package upgrades, which merely ask > >

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-12 Thread Tom Keffer
I don't blame you. To keep the discussion focused, and a little more formal, I've started issue #552 . Please move the discussion there. -tk On Tue, May 12, 2020 at 11:58 AM Vince Skahan wrote: > On Tuesday, May 12, 2020 at 11:30:42 AM UTC-7, Tom

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-12 Thread Vince Skahan
On Tuesday, May 12, 2020 at 11:30:42 AM UTC-7, Tom Keffer wrote: > > I'm with you, Till, but I still need a volunteer!  > > > Sorry if I diverted the discussion any. I was trying to understand what problem(s) we're trying to solve, so I can assess if I can help or not. - If the goal is to

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-12 Thread Greg Troxel
Till Maas writes: >> The downside of option-2 is what would we do if a security vulnerability > > Another downside, which is what led me to start the discussion, is that > this makes weewx different from other Python projects which makes my > generic Python/Linux experience less useful because

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-12 Thread Tom Keffer
I'm with you, Till, but I still need a volunteer!  On Tue, May 12, 2020 at 11:28 AM Till Maas wrote: > Hi, > > On Sun, May 10, 2020 at 01:27:01PM -0700, Vince Skahan wrote: > > > Option-2 is how big apps like splunk and puppet do it. They bundle the > > interpreter+libs they need under their

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-12 Thread Till Maas
Hi, On Sun, May 10, 2020 at 01:27:01PM -0700, Vince Skahan wrote: > Option-2 is how big apps like splunk and puppet do it. They bundle the > interpreter+libs they need under their tree. If you think about it, it's > also how RHEL chose to work the python issue for RHEL-8. They don't use >

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Graham Eddy
macos? fits the OS/release/cpu tuple. g-eddy > On 11 May 2020, at 9:30 am, Greg Troxel wrote: > > So the notion that a binary package in rpm, deb, whatever can be > installed on any linux flavor that has the same CPU type is basically > unsound; it would have to be built per OS/release/cpu

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Vince Skahan
On Sunday, May 10, 2020 at 4:30:46 PM UTC-7, Greg Troxel wrote: > > So the notion that a binary package in rpm, deb, whatever can be > installed on any linux flavor that has the same CPU type is basically > unsound; it would have to be built per OS/release/cpu tuple and ensure > that the

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Greg Troxel
Vince Skahan writes: > It's not a broken packaging system, it's operating system differences and > trying to use one package to handle all os variants+versions with one > package. I've battled this for 15+ years in $work. > > A python app packaged in rpm format would run on centos 5, 6, 7, 8

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Greg Troxel
Tom Keffer writes: > Vince, you're the Docker expert. Would it solve some of these problems? Is > it widely available? I don't think docker is adequately portable; it would have to run on every single posixy system that is currently capable of running python. And weewx really isn't that

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Vince Skahan
On Sunday, May 10, 2020 at 2:07:48 PM UTC-7, Tom Keffer wrote: > > Vince, you're the Docker expert. Would it solve some of these problems? Is > it widely available? > >> >> Uncertain what you're asking. Do you want to release a weewx container that is known to run ? I think several people

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Tom Keffer
Vince, you're the Docker expert. Would it solve some of these problems? Is it widely available? On Sun, May 10, 2020 at 1:47 PM Vince Skahan wrote: > On Sunday, May 10, 2020 at 1:27:01 PM UTC-7, Vince Skahan wrote: >> >> >>- (2) stop using the os's python modules. Bundle at least the

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Vince Skahan
On Sunday, May 10, 2020 at 1:27:01 PM UTC-7, Vince Skahan wrote: > > >- (2) stop using the os's python modules. Bundle at least the add-on >modules weewx needs 'with' weewx core, located under the weewx tree >someplace. Fix up PYTHONPATH or the like as needed. > > Just wanted to

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Tom Keffer
All of the packages WeeWX uses are very mature. It's the same set of pre-requisites that I started with 10+ years ago. HOWEVER, not all of them are pure Python. For example, Cheetah uses an internal C library, _namemapper, for performance. It's name follows the wheel convention (for example, it's

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Vince Skahan
On Sunday, May 10, 2020 at 12:36:58 PM UTC-7, Greg Troxel wrote: > > Vince Skahan > writes: > > > A good example is trying to do a dpkg or rpm that requires > python3-cheetah > > when your distro does not 'have' such a package. If you install cheetah > > with pip as a second way to get it

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread mwall
On Sunday, May 10, 2020 at 2:55:10 PM UTC-4, Vince Skahan wrote: > > On Sunday, May 10, 2020 at 8:37:17 AM UTC-7, Till Maas wrote: >> >> ...which I guess could be removed and users should >> be asked to install it from their distribution or via pip >> > > A good example is trying to do a

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Vince Skahan
On Sunday, May 10, 2020 at 8:37:17 AM UTC-7, Till Maas wrote: > > ...which I guess could be removed and users should > be asked to install it from their distribution or via pip > Not naysaying, but every time we ask a user to read and think and do something based on their particular os,

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Rich Bell
Till, Thanks. I’ve had it on my list to learn tox. Seems like now is the time. rich On Sunday, 10 May 2020 11:55:40 UTC-4, Till Maas wrote: > > Hi, > > On Sun, May 10, 2020 at 07:50:04AM -0700, Rich Bell wrote: > > > 2. Extension development > > 1. Download setup.py install type of WeeWX

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread mwall
On Sunday, May 10, 2020 at 11:37:17 AM UTC-4, Till Maas wrote: > > > >4. weewx.conf gets automatically patched by an upgrade. This is a big > >feature of weewx over the standard package upgrades, which merely ask > a > >user if they want to "merge" their old config file with an

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Vince Skahan
On Sunday, May 10, 2020 at 8:37:17 AM UTC-7, Till Maas wrote: > > On first thought, the best approach for me would be that the recommended > way to install extensions would be that they use pip as well for > installation. Everything that wee_extensions installs, would be best > moved to

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Till Maas
Hi, On Sun, May 10, 2020 at 07:50:04AM -0700, Rich Bell wrote: > 2. Extension development > 1. Download setup.py install type of WeeWX version and untar it > 2. Install versions of python via pyenv > 3. Install prerequisites via pip in each pyenv environment > 4. Via PYTHONPATH

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Till Maas
Hi, On Sat, May 09, 2020 at 07:12:46PM -0700, Tom Keffer wrote: > At this point, I think we've discussed this enough and it's time to > experiment. From the discussion, I'd say the requirements are: > >1. Ability to install into one directory, such as /home/weewx. It's OK >if it takes

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-10 Thread Rich Bell
I know am a bit late to the party. I am also no Python expert and I know that I will be able to work with any new packaging/install. But, I want to note my workflows that are super easy with today's packaging/install 1. Debugging base WeeWx code 1. Git fork and clone 2. Copy known

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-09 Thread Tom Keffer
At this point, I think we've discussed this enough and it's time to experiment. From the discussion, I'd say the requirements are: 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

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-09 Thread Greg Troxel
Tom Keffer writes: > If I install using > > *pip3 install ansible --root=/home/ansible --prefix=""* > > I get > > /home/ansible > ├── bin > │ ├── ansible > │ ├── ansible-config -> ansible > │ ├── ansible-connection > │ ├── ansible-console -> ansible > │ ├── ansible-doc -> ansible > │

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-07 Thread Tom Keffer
> Not sure, what exactly the application needs to be to be non-trivial. > This is a rather big project with several CLI tools: > https://pypi.org/project/ansible/ > > Oooh, that's a good example. Largeish, and it installs with a simple "pip install ansible". Wish I had found it sooner. If I

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-06 Thread Greg Troxel
Tom Keffer writes: > On Wed, May 6, 2020 at 6:30 AM Greg Troxel wrote: > >> Tom Keffer 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

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-06 Thread Tom Keffer
On Wed, May 6, 2020 at 6:30 AM Greg Troxel wrote: > Tom Keffer 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.

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-06 Thread Greg Troxel
Tom Keffer 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.

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-05 Thread Tom Keffer
As I said earlier, I put quite a bit of time trying to get pip to work. You can see the results in the 'pip' branch of the repository. NB: it's a work in progress, so the branch is not a "finished" dead end, but rather an "idea" dead end. It follows your

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-05 Thread mwall
On Tuesday, May 5, 2020 at 2:24:47 PM UTC-4, Till Maas wrote: > > > By using the standard method, it would be also very easy to package for > different distributions, since they are optimised for the default > approach. For example Fedora supports automatically generating the > python

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-05 Thread Till Maas
On Mon, May 04, 2020 at 04:53:13PM -0700, Vince Skahan wrote: > > Certainly. Too many scope-increase meetings on the project from hell at > work I guess. Sorry if I jumped the gun :-) > > Anyway, I guess I always try to think "*it it was my money funding this, > would I invest here at this

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-04 Thread Vince Skahan
Certainly. Too many scope-increase meetings on the project from hell at work I guess. Sorry if I jumped the gun :-) Anyway, I guess I always try to think "*it it was my money funding this, would I invest here at this time*", because time+blood pressure are things we all have limited budgets

Re: [weewx-development] Re: Package weewx like other python projects

2020-05-04 Thread Tom Keffer
Slow down there, everyone. Let's give Till a chance to respond. It's possible I'm totally misunderstanding what he's thinking. Install via pip would be *very* nice if it was possible. One repository for all platforms. V4 was an opportunity to try it, so I probably spent a solid week banging away

[weewx-development] Re: Package weewx like other python projects

2020-05-04 Thread Vince Skahan
> > I wonder if there is any interest/support for patches to make weewx > follow common python packaging methods, such as > > - installing python modules into /usr/lib/pythonX.Y/site-packages > - make it possible to install weewx with pip > - make weewx support normal python modules as