only django<4 for now, support python3.10
This commit is contained in:
parent
0c73e90751
commit
fa0c383227
2 changed files with 6 additions and 4 deletions
|
@ -5,11 +5,13 @@ import sys
|
||||||
|
|
||||||
def activate_venv(base):
|
def activate_venv(base):
|
||||||
if os.path.exists(base):
|
if os.path.exists(base):
|
||||||
old_os_path = os.environ.get('PATH', '')
|
old_os_path = os.environ.get("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)
|
||||||
sys.real_prefix = sys.prefix
|
sys.real_prefix = sys.prefix
|
||||||
sys.prefix = base
|
sys.prefix = base
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Django
|
Django<4
|
||||||
libsass
|
libsass
|
||||||
django-compressor
|
django-compressor
|
||||||
django-sass-processor
|
django-sass-processor
|
||||||
|
|
Loading…
Reference in a new issue