Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wintel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
opentelemac
wintel
Commits
5643c33d
Commit
5643c33d
authored
3 years ago
by
Boris Basic
Browse files
Options
Downloads
Patches
Plain Diff
Use a better method to set TELEMAC-MASCARET Python as the default one
parent
960c0cf9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/pysource.win.bat
+7
-14
7 additions, 14 deletions
config/pysource.win.bat
config/pysource.win.debug.bat
+7
-14
7 additions, 14 deletions
config/pysource.win.debug.bat
with
14 additions
and
28 deletions
config/pysource.win.bat
+
7
−
14
View file @
5643c33d
...
...
@@ -14,31 +14,24 @@ set SYSTELCFG=%HOMETEL%\configs\systel.edf.cfg
rem Name of the configuration to use
set
USETELCFG
=
win
.gnu
rem Add TELEMAC-MASCARET Python to PATH, its modules to PYTHONPATH and set it
rem as the default one by updating the registry and setting-up a py.ini local
rem file. This file will need to be removed manually to restore the default
rem Python version, if any.
rem Add Python to PATH, its modules to PYTHONPATH and set it as the
rem default one to launch Python scripts from the command line
setlocal
enabledelayedexpansion
set
python
=
python
-
3
.7.9
endlocal
&
(
set
"PATH=
%TELEMACDEPS%
\
%python%
;
%TELEMACDEPS%
\
%python%
\Scripts;
%PATH%
"
set
"PYTHONPATH=
%TELEMACDEPS%
\
%python%
\Lib\site-packages"
reg
add
HKCU
\SOFTWARE\
Python\PythonCore\3.7_otm\InstallPath
/ve /d
%TELEMACDEPS%
\
%python%
/f
1
>
null
reg
add
HKCU
\SOFTWARE\
Python\PythonCore\3.7_otm\InstallPath
/v
ExecutablePath
/d
%TELEMACDEPS%
\
%python%
\python.exe
/f
1
>
null
reg
delete
HKCU
\SOFTWARE\
Classes\.py\OpenWithProgids
/f
1
>
null
reg
add
HKCU
\SOFTWARE\
Classes\.py\shell\open\command
/ve /f
/d
"
%TELEMACDEPS%
\
%python%
\python.exe
\"
%%
1
\
"
%%
*"
1
>
null
)
(
echo
[
defaults
]
echo
python
=
3
.7_otm
echo
python3
=
3
.7_otm
)
>
%LOCALAPPDATA%
\py.ini
rem Add Mingw to PATH i
f
found
rem Add Mingw to PATH i
s it is
found
call
:find
_mingw
rem Add TELEMAC binaries
and scripts
director
ies
to PATH
rem Add TELEMAC binaries director
y
to PATH
set
PATH
=
%HOMETEL%
\builds\
%USETELCFG%
\lib
;
%PATH%
rem Add TELEMAC Python scripts to PATH and to Python environment
set
PATH
=
%HOMETEL%
\scripts\python3
;
%PATH%
rem Add TELEMAC Python scripts to the Python environment
set
PYTHONPATH
=
%HOMETEL%
\scripts\python3
;
%PYTHONPATH%
set
PYTHONPATH
=
%HOMETEL%
\builds\
%USETELCFG%
\wrap_api\lib
;
%PYTHONPATH%
...
...
This diff is collapsed.
Click to expand it.
config/pysource.win.debug.bat
+
7
−
14
View file @
5643c33d
...
...
@@ -14,31 +14,24 @@ set SYSTELCFG=%HOMETEL%\configs\systel.edf.cfg
rem Name of the configuration to use
set
USETELCFG
=
win
.gnu.debug
rem Add TELEMAC-MASCARET Python to PATH, its modules to PYTHONPATH and set it
rem as the default one by updating the registry and setting-up a py.ini local
rem file. This file will need to be removed manually to restore the default
rem Python version, if any.
rem Add Python to PATH, its modules to PYTHONPATH and set it as the
rem default one to launch Python scripts from the command line
setlocal
enabledelayedexpansion
set
python
=
python
-
3
.7.9
endlocal
&
(
set
"PATH=
%TELEMACDEPS%
\
%python%
;
%TELEMACDEPS%
\
%python%
\Scripts;
%PATH%
"
set
"PYTHONPATH=
%TELEMACDEPS%
\
%python%
\Lib\site-packages"
reg
add
HKCU
\SOFTWARE\
Python\PythonCore\3.7_otm\InstallPath
/ve /d
%TELEMACDEPS%
\
%python%
/f
1
>
null
reg
add
HKCU
\SOFTWARE\
Python\PythonCore\3.7_otm\InstallPath
/v
ExecutablePath
/d
%TELEMACDEPS%
\
%python%
\python.exe
/f
1
>
null
reg
delete
HKCU
\SOFTWARE\
Classes\.py\OpenWithProgids
/f
1
>
null
reg
add
HKCU
\SOFTWARE\
Classes\.py\shell\open\command
/ve /f
/d
"
%TELEMACDEPS%
\
%python%
\python.exe
\"
%%
1
\
"
%%
*"
1
>
null
)
(
echo
[
defaults
]
echo
python
=
3
.7_otm
echo
python3
=
3
.7_otm
)
>
%LOCALAPPDATA%
\py.ini
rem Add Mingw to PATH i
f
found
rem Add Mingw to PATH i
s it is
found
call
:find
_mingw
rem Add TELEMAC binaries
and scripts
director
ies
to PATH
rem Add TELEMAC binaries director
y
to PATH
set
PATH
=
%HOMETEL%
\builds\
%USETELCFG%
\lib
;
%PATH%
rem Add TELEMAC Python scripts to PATH and to Python environment
set
PATH
=
%HOMETEL%
\scripts\python3
;
%PATH%
rem Add TELEMAC Python scripts to the Python environment
set
PYTHONPATH
=
%HOMETEL%
\scripts\python3
;
%PYTHONPATH%
set
PYTHONPATH
=
%HOMETEL%
\builds\
%USETELCFG%
\wrap_api\lib
;
%PYTHONPATH%
...
...
This diff is collapsed.
Click to expand it.
Boris Basic
@boris.basic
mentioned in issue
#6 (closed)
·
3 years ago
mentioned in issue
#6 (closed)
mentioned in issue #6
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment