fix manage for python3.10

This commit is contained in:
j 2022-04-22 18:07:46 +01:00
parent 65710e5ef1
commit 1b0de9ade4

View file

@ -10,7 +10,8 @@ def activate_venv(base):
bin_path = os.path.join(base, 'bin') bin_path = os.path.join(base, 'bin')
if bin_path not in old_os_path: if bin_path not in old_os_path:
os.environ['PATH'] = os.path.join(base, 'bin') + os.pathsep + old_os_path os.environ['PATH'] = os.path.join(base, 'bin') + os.pathsep + old_os_path
site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages') version = '%s.%s' % (sys.version_info.major, sys.version_info.minor)
site_packages = os.path.join(base, 'lib', 'python%s' % version, 'site-packages')
prev_sys_path = list(sys.path) prev_sys_path = list(sys.path)
import site import site
site.addsitedir(site_packages) site.addsitedir(site_packages)