X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.vim%2Fpython%2Fvirtualenv.py;h=62316009e94bfe707b5cdc5cf6b465283375ab03;hb=342c4ffb5a689c52f8b4b053d72b834f23cff558;hp=ed46739fb6774130b760abc3caef0a0017d711a5;hpb=f2e9bb3e4991fafccdf54035fb74ce7b2623c607;p=dotfiles.git diff --git a/.vim/python/virtualenv.py b/.vim/python/virtualenv.py index ed46739..6231600 100644 --- a/.vim/python/virtualenv.py +++ b/.vim/python/virtualenv.py @@ -3,12 +3,12 @@ import sys, os # noqa: E401 multiple imports on one line virtualenv_dir = os.environ.get('VIRTUAL_ENV') if virtualenv_dir: if ( - (sys.version_info[0] == 2) - and os.path.exists( - os.path.join(virtualenv_dir, 'lib', 'python2.7')) - ) or ( - not os.path.exists( - os.path.join(virtualenv_dir, 'lib', 'python2.7')) + os.path.exists( + os.path.join( + virtualenv_dir, 'lib', + 'python%d.%d' % (sys.version_info[0], sys.version_info[1]) + ) + ) ): for activate_this in [ os.path.join(virtualenv_dir, 'bin', 'activate_this.py'),