PBuildXPLevelAPI.gms : Test building and installing the GAMS Python API from source distribution

Description

Contributor: Clemens Westphal, March 2020


Small Model of Type : Python


Category : GAMS API library


Main file : PBuildXPLevelAPI.gms

$TITLE 'Test building and installing the GAMS Python API from source distribution' (PBUILDXPLEVELAPI,SEQ=57)

$ontext
Contributor: Clemens Westphal, March 2020
$offtext


$set sdistPath %gams.sysdir%api%system.dirsep%python%system.dirsep%sdist
$set examplePath %gams.sysdir%api%system.dirsep%python%system.dirsep%examples%system.dirsep%

$ifthen setenv PYTHON38
$  call.checkErrorLevel cd . && "%sysenv.PYTHON38%" -m pip install gamsapi --find-links "%sdistPath%" --target=api_38 --no-index --no-cache-dir
$  setEnv PYTHONPATH api_38
$  call.checkErrorLevel cd . && "%sysenv.PYTHON38%" "%examplePath%core%system.dirsep%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON38%" "%examplePath%control%system.dirsep%transport1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON38%" "%examplePath%transfer%system.dirsep%transport_gt.py" "%gams.sysdir%."
$endif

$ifthen setenv PYTHON39
$  call.checkErrorLevel cd . && "%sysenv.PYTHON39%" -m pip install gamsapi --find-links "%sdistPath%" --target=api_39 --no-index --no-cache-dir
$  setEnv PYTHONPATH api_39
$  call.checkErrorLevel cd . && "%sysenv.PYTHON39%" "%examplePath%core%system.dirsep%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON39%" "%examplePath%control%system.dirsep%transport1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON39%" "%examplePath%transfer%system.dirsep%transport_gt.py" "%gams.sysdir%."
$endif

$ifthen setenv PYTHON310
$  call.checkErrorLevel cd . && "%sysenv.PYTHON310%" -m pip install gamsapi --find-links "%sdistPath%" --target=api_310 --no-index --no-cache-dir
$  setEnv PYTHONPATH api_310
$  call.checkErrorLevel cd . && "%sysenv.PYTHON310%" "%examplePath%core%system.dirsep%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON310%" "%examplePath%control%system.dirsep%transport1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON310%" "%examplePath%transfer%system.dirsep%transport_gt.py" "%gams.sysdir%."
$endif

$ifthen setenv PYTHON311
$  call.checkErrorLevel cd . && "%sysenv.PYTHON311%" -m pip install gamsapi --find-links "%sdistPath%" --target=api_311 --no-index --no-cache-dir
$  setEnv PYTHONPATH api_311
$  call.checkErrorLevel cd . && "%sysenv.PYTHON311%" "%examplePath%core%system.dirsep%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON311%" "%examplePath%control%system.dirsep%transport1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON311%" "%examplePath%transfer%system.dirsep%transport_gt.py" "%gams.sysdir%."
$endif

$ifthen setenv PYTHON312
$  call.checkErrorLevel cd . && "%sysenv.PYTHON312%" -m pip install gamsapi --find-links "%sdistPath%" --target=api_312 --no-index --no-cache-dir
$  setEnv PYTHONPATH api_312
$  call.checkErrorLevel cd . && "%sysenv.PYTHON312%" "%examplePath%core%system.dirsep%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON312%" "%examplePath%control%system.dirsep%transport1.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON312%" "%examplePath%transfer%system.dirsep%transport_gt.py" "%gams.sysdir%."
$endif