I thought we were trying to solve the OPs problem? The OPs problem has 
nothing to do with setuptools (or perhaps more correctly the python 
distutils package); setuptools/distutils is not used in the OPs installer 
and there is no error re distutils in the provided console output. If the 
absence of setuptools/distutils was the issue the error trace would clearly 
identify this.

Sure, I have used distutils in my installers and when run on a system where 
the in-use python version no longer includes distutils (python 3.12 and 
later) the installer will fail - as you found with StackedWindRose.

Gary
On Thursday 29 February 2024 at 13:13:45 UTC+10 vince wrote:

> Dunno Gary but I had to install that for StackedWindRose to get v5 pip to 
> install it successfully here.  Details on the issue I opened on your github 
> repo.
>
> On Wednesday, February 28, 2024 at 5:56:14 PM UTC-8 gjr80 wrote:
>
>> Not quite sure of the relevance of setuptools; if that was the problem 
>> here it would be VERY evident.
>>
>> Gary
>>
>>
>> On Thursday 29 February 2024 at 11:26:15 UTC+10 vince wrote:
>>
>> I found an old extension of Gary’s the other day that needed setuptools 
>> to be able to install it…it has the same old syntax…
>>
>> On Wednesday, February 28, 2024 at 4:52:49 PM UTC-8 Tom Keffer wrote:
>>
>> I haven't tried it, but I'm thinking the problem is that the awekas 
>> extension uses
>>
>> *from setup import ExtensionInstaller*
>>
>>
>> which has been deprecated for a long time and will no longer work with 
>> V5. It should be
>>
>> *from weecfg.extension import ExtensionInstaller*
>>
>>
>> Try modifying the extension and see if that helps.
>>
>> On Wed, Feb 28, 2024 at 12:32 AM gjr80 <gjrod...@gmail.com> wrote:
>>
>> What does unzip -l AWEKAS.zip show? Does bin/user/awekaswx.py actually 
>> exist in the zip file?
>>
>> Gary
>> On Wednesday 28 February 2024 at 17:54:49 UTC+10 remy.l...@gmail.com 
>> wrote:
>>
>> Hello Tom,
>> First problem : when trying to install a driver in virtual environnement :
>>
>> (weewx-venv) remy@remy-virtual-machine:~/weewx-data$ weectl extension 
>> install AWEKAS.zip
>> Using configuration file /home/remy/weewx-data/weewx.conf
>> Install extension 'AWEKAS.zip' (y/n)? y
>> Extracting from zip archive AWEKAS.zip
>> Traceback (most recent call last):
>>   File "/home/remy/weewx-venv/bin/weectl", line 8, in <module>
>>     sys.exit(main())
>>   File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectl.py", 
>> line 66, in main
>>     namespace.func(namespace)
>>   File 
>> "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/__init__.py", 
>> line 121, in dispatch
>>     namespace.action_func(config_dict, namespace)
>>   File 
>> "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/extension_cmd.py",
>>  
>> line 116, in install_extension
>>     ext.install_extension(namespace.source, no_confirm=namespace.yes)
>>   File 
>> "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", 
>> line 138, in install_extension
>>     extension_name = self._install_from_file(extension_path, filetype)
>>   File 
>> "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", 
>> line 168, in _install_from_file
>>     extension_name = self.install_from_dir(extension_dir)
>>   File 
>> "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", 
>> line 185, in install_from_dir
>>     self._install_files(installer['files'], extension_dir)
>>   File 
>> "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", 
>> line 269, in _install_files
>>     shutil.copy(source_path, destination_path)
>>   File "/usr/lib/python3.8/shutil.py", line 418, in copy
>>     copyfile(src, dst, follow_symlinks=follow_symlinks)
>>   File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
>>     with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
>> FileNotFoundError: [Errno 2] No such file or directory: 
>> '/tmp/tmprpxo6tw5/AWEKAS/bin/user/awekaswx.py'
>>
>> *and the install.py :*
>>
>> # installer for Awekas Bresser awekaswx driver
>> # Copyright 2024 Remy LAVABRE
>>
>> from setup import ExtensionInstaller
>>
>> def loader():
>>     return awekaswxInstaller()
>>
>> class awekaswxInstaller(ExtensionInstaller):
>>     def __init__(self):
>>         super(awekaswxInstaller, self).__init__(
>>             version="1.3",
>>             name='awekaswx',
>>             description='Get Bresser 7in1 data on Awekas',
>>             author="Remy LAVABRE",
>>             author_email="remy.l...@gmail.com",
>>             files=[('bin/user', ['bin/user/awekaswx.py'])],
>>             config={
>>                 'awekaswx': {
>>                     'driver' : 'bin.user.awekaswx',
>>                     'poll_interval': '60',
>>                     'awekasapikey' :'My_API_Awekas_Key','
>>                     'openweatherapikey': 'My_API_OpenWeather_Key',
>>                     'send_syslog': 'True',
>>                     'model': 'Bresser 7in1'
>>                 }
>>             }
>>         )
>>
>> *Rémy LAVABRE*
>>
>>
>> Le dim. 25 févr. 2024 à 22:45, Tom Keffer <tke...@gmail.com> a écrit :
>>
>> From your description, you're installing it in the correct spot, however 
>> you're not giving us much information. Instead of just showing the single 
>> error line, it would be helpful to see the log from startup. The reason is 
>> that it will log the location of the user directory.
>>
>> Set debug=1, then restart weewxd. Post the log *from startup* through 
>> the error.
>>
>> On Sun, Feb 25, 2024 at 10:55 AM Remy Lavabre <remy.l...@gmail.com> 
>> wrote:
>>
>> Hello,
>>
>> weewx is installed in virtual PIP mode -> ~/weewx-data/... and 
>> ~/weewx-venv/...
>> I manually added the xxx.py driver for my weather station in the 
>> ~/weewx-data/bin/user directory.
>> It is declared in weewx.conf as "driver = usr.xxx", as was done in 
>> version 4.x
>>
>> When launching weewxd, I get the message:
>>    File 
>> "/home/pi/weewx-venv/lib/python3.8/site-packages/weewx/engine.py", line 
>> 104, in setupStation
>>      __import__(driver)
>> ModuleNotFoundError: *No module named 'usr'*
>>
>> I tried "driver = xxx.py" without success
>>
>> if I put my driver in 
>> ~/weewx-venv/lib/python3.8/site-packages/weewx/drivers/xxx.py and I put 
>> driver = xxx.py in weewx.conf there is no longer the error.
>>
>> Moral: Would it be possible to tell me the exact location where to put my 
>> driver in the user directory and how to declare it in weewx.conf ?
>>
>> Thank you...
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/a6fe6217-0ad7-45b0-8dae-74c94db83fbdn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/a6fe6217-0ad7-45b0-8dae-74c94db83fbdn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com.
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/CAPq0zEBr%2BYP_ch%2ButQWFxOZ2gQW%3DzzO3xyGWK6q3j_KOQdh98w%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEBr%2BYP_ch%2ButQWFxOZ2gQW%3DzzO3xyGWK6q3j_KOQdh98w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com.
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/edae91cb-4ada-4dd9-a67a-bcd4f3bdbeb9n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/edae91cb-4ada-4dd9-a67a-bcd4f3bdbeb9n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f32feb13-3707-4ce7-8686-7bcf79e48b04n%40googlegroups.com.

Reply via email to