diff options
author | Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> | 2019-12-26 00:00:37 +0900 |
---|---|---|
committer | Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> | 2019-12-26 09:48:41 +0900 |
commit | f1656ee6787f2459c191f3c42ecb328491c545cd (patch) | |
tree | d13c54c3d0b6ec574ed59ff6546a113b683e1d51 /installer/pip_install.cmd | |
parent | 0bc757a306ec6a34c495341fe2d63c867aaa9831 (diff) | |
download | vim-lsp-settings-f1656ee6787f2459c191f3c42ecb328491c545cd.tar.gz vim-lsp-settings-f1656ee6787f2459c191f3c42ecb328491c545cd.tar.bz2 vim-lsp-settings-f1656ee6787f2459c191f3c42ecb328491c545cd.zip |
Windows native python3(python.exe) and MSYS2 python3 support
Diffstat (limited to 'installer/pip_install.cmd')
-rw-r--r-- | installer/pip_install.cmd | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/installer/pip_install.cmd b/installer/pip_install.cmd index 9b8a0b1..c551b7b 100644 --- a/installer/pip_install.cmd +++ b/installer/pip_install.cmd @@ -8,6 +8,30 @@ rd /Q /S "%server_dir%" 2>NUL md "%server_dir%" cd "%server_dir%" +where python && goto :python +:python_fail +where python3 && goto :python3 +:python3_fail +goto :EOF + +:python +python -c "import sys; from distutils.version import LooseVersion;sys.exit(0 if (LooseVersion(sys.version) > LooseVersion('3')) else 1)" +if errorlevel 1 goto :python_fail + +python -m venv ./venv +venv\Scripts\pip3 install %2 + +echo @echo off ^ + +%%~dp0\venv\Scripts\%1.exe %%* ^ + +> %1.cmd +goto :EOF + +:python3 +python3 -c "import sys; from distutils.version import LooseVersion;sys.exit(0 if (LooseVersion(sys.version) > LooseVersion('3')) else 1)" +if errorlevel 1 goto :python3_fail + python3 -m venv ./venv venv\bin\pip3 install %2 @@ -16,3 +40,4 @@ echo @echo off ^ %%~dp0\venv\bin\%1.cmd %%* ^ > %1.cmd +goto :EOF |