fix manage.py

This commit is contained in:
j 2022-04-22 18:07:32 +01:00
parent 8d7adf1eb2
commit 696717d138

View file

@ -3,11 +3,13 @@
import os
import sys
def activate_venv(base):
if os.path.exists(base):
old_os_path = os.environ.get('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)
import site
site.addsitedir(site_packages)