1313@ rem # the path to the Python executable to use. If < path to python.exe> is
1414@ rem # set to "path", then the executable will be the python.exe available
1515@ rem # in the PATH.
16- @ rem #
17- @ rem # < some conf path> : this must be the last argument and sets the path to a
18- @ rem # configuration directory to use.
19- @ rem ################################
20-
2116@ rem ################################
22- @ rem # Defaults. Change these variables to customize this script locally
23- @ rem ################################
24- @ rem # you can define one or more thirdparty dirs, each where the varibale name
25- @ rem # is prefixed with TPP_DIR
26- set " TPP_DIR = thirdparty"
27-
28- @ rem # default configurations for dev
29- set " CONF_DEFAULT = etc/conf/dev"
30-
31- @ rem # default thirdparty dist for dev
32- if " " %CONF_DEFAULT% " " == " " etc/conf/dev" " (
33- set " TPP_DIR_DEV = thirdparty/dev"
34- )
35-
36- @ rem # default supported version for Python 3
37- set SUPPORTED_PYTHON3 = 3.6
38-
39- @ rem #################################
40-
41- @ rem python --version
42- @ rem python -c "import sys;print(sys.executable)"
43-
4417
4518@ rem Current directory where this .bat files lives
4619set CFG_ROOT_DIR = %~dp0
47-
4820@ rem path where a configured Python should live in the current virtualenv if installed
49- set CONFIGURED_PYTHON = %CFG_ROOT_DIR% Scripts\python.exe
50-
21+ set CONFIGURED_PYTHON = %CFG_ROOT_DIR% tmp\Scripts\python.exe
5122set PYTHON_EXECUTABLE =
5223
5324@ rem parse command line options and arguments
@@ -56,13 +27,6 @@ if "%1" EQU "--help" (goto cli_help)
5627if " %1 " EQU " --clean" (call rmdir /s /q " %CFG_ROOT_DIR% tmp" ) && call exit /b
5728if " %1 " EQU " --python" (set PROVIDED_PYTHON=%~2 ) && shift && shift && goto collectopts
5829
59- @ rem We are not cleaning: Either we have a provided configure config path or we use a default.
60- if " " %1 " " == " " " " (
61- set CFG_CMD_LINE_ARGS = %CONF_DEFAULT%
62- ) else (
63- set CFG_CMD_LINE_ARGS = %1
64- )
65-
6630@ rem If we have a pre-configured Python in our virtualenv, reuse this as-is and run
6731if exist " " %CONFIGURED_PYTHON% " " (
6832 set PYTHON_EXECUTABLE = %CONFIGURED_PYTHON%
@@ -83,7 +47,6 @@ if exist ""%PROVIDED_PYTHON%"" (
8347
8448@ rem otherwise we search for a suitable Python interpreter
8549:find_python
86-
8750@ rem First check the existence of the "py" launcher (available in Python 3)
8851@ rem if we have it, check if we have a py -3 installed with the good version or a py 2.7
8952@ rem if not, check if we have an old py 2.7
@@ -116,8 +79,8 @@ if %ERRORLEVEL% == 0 (
11679 )
11780)
11881
119- :run
12082
83+ :run
12184@ rem without this things may not always work on Windows 10, but this makes things slower
12285set PYTHONDONTWRITEBYTECODE = 1
12386
@@ -141,9 +104,6 @@ echo A configuration script for Windows
141104echo usage: configure [options] [path/to/config/directory]
142105echo .
143106echo The options and arguments are:
144- echo [path/to/config/directory] : this optionally sets the path to a
145- echo configuration directory to use. Defaults to etc/conf/dev if not set
146- echo .
147107echo --clean : this is exclusive of anything else and cleans the environment
148108echo from built and installed files
149109echo .
@@ -155,6 +115,6 @@ echo.
155115
156116:activate
157117@ rem Activate the virtualenv
158- if exist " %CFG_ROOT_DIR% Scripts\activate" (
159- " %CFG_ROOT_DIR% Scripts\activate"
118+ if exist " %CFG_ROOT_DIR% tmp\ Scripts\activate" (
119+ " %CFG_ROOT_DIR% tmp\ Scripts\activate"
160120)
0 commit comments