solvespace/cython/platform/set_pycompiler.bat

19 lines
576 B
Batchfile
Raw Normal View History

2019-09-23 05:28:43 +00:00
echo off
REM Usage: set_pycompiler C:\Python37
REM Where %PYTHON_DIR% is the directory of your Python installation.
REM In Pyslvs project.
set HERE=%~dp0
set PYTHON_DIR=%1
REM Create "distutils.cfg"
echo [build]>> "%PYTHON_DIR%\Lib\distutils\distutils.cfg"
echo compiler=mingw32>> "%PYTHON_DIR%\Lib\distutils\distutils.cfg"
REM Apply the patch of "cygwinccompiler.py".
REM Unix "patch" command of Msys.
patch "%PYTHON_DIR%\lib\distutils\cygwinccompiler.py" "%HERE%patch.diff"
REM Copy "vcruntime140.dll" to "libs".
copy "%PYTHON_DIR%\vcruntime140.dll" "%PYTHON_DIR%\libs"