You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Beginning in 3006.0, any Salt extensions that are installed via PIP that are installed to the onedir extras directory are not accessible by Salt
Steps to Reproduce the behavior
Install a Salt extension via PIP that will be installed to the onedir extras directory
Expected behavior
Salt extension should be accessible.
The text was updated successfully, but these errors were encountered:
This is also impacting any libraries installed to the extras directory. For example if using salt-pip to install heist-salt:
(heist-3.8) ch3ll@megan-precision5550 ~/onedir ./salt/extras-3.10/bin/heist --version
./salt/extras-3.10/bin/heist: line 3: /home/ch3ll/onedir/salt/extras-3.10/bin/python3: No such file or directory
If I update the heist file to directly point to ./salt/bin/python3:
#!/bin/sh
"true" ''''
"exec" "/home/ch3ll/onedir/salt/bin/python3" "$0" "$@"
'''
# -*- coding: utf-8 -*-
import re
import sys
from distro.distro import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
I get this error:
(heist-3.8) ch3ll@megan-precision5550 ~/onedir/salt ./extras-3.10/bin/heist --version
Traceback (most recent call last):
File "/home/ch3ll/onedir/salt/./extras-3.10/bin/heist", line 8, in <module>
from heist.scripts import start
ModuleNotFoundError: No module named 'heist'
This is because the extras directory is not in the sys.path:
(heist-3.8) ch3ll@megan-precision5550 ~/onedir/salt ./bin/python3
Python 3.10.11 (main, Apr 14 2023, 05:57:16) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/home/ch3ll/onedir/salt/lib/python310.zip', '/home/ch3ll/onedir/salt/lib/python3.10', '/home/ch3ll/onedir/salt/lib/python3.10/lib-dynload', '/home/ch3ll/onedir/salt/lib/python3.10/site-packages']
>>>
(heist-3.8) ch3ll@megan-precision5550 ~/onedir/salt ./bin/python3
Python 3.10.11 (main, Apr 14 2023, 05:57:16) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import heist
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'heist'
>>> sys.path.append('/home/ch3ll/onedir/salt/extras-3.10')
>>> import heist
I also tried the same thing with the distro package in extras
Description
Beginning in 3006.0, any Salt extensions that are installed via PIP that are installed to the onedir extras directory are not accessible by Salt
Steps to Reproduce the behavior
Install a Salt extension via PIP that will be installed to the onedir extras directory
Expected behavior
Salt extension should be accessible.
The text was updated successfully, but these errors were encountered: