Skip to content

Commit db4628e

Browse files
committed
tweak further USERPROFILE effect
1 parent 79a8d24 commit db4628e

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

make.py

+28-3
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,8 @@ def _create_batch_scripts_initial(self):
11011101
rem WinPython.ini part (removed from nsis)
11021102
rem ******************
11031103
if not exist "%WINPYDIRBASE%\settings" mkdir "%WINPYDIRBASE%\settings"
1104-
if not exist "%WINPYDIRBASE%\settings\Roaming" mkdir "%WINPYDIRBASE%\settings\Roaming"
1104+
if not exist "%WINPYDIRBASE%\settings\AppData" mkdir "%WINPYDIRBASE%\settings\AppData"
1105+
if not exist "%WINPYDIRBASE%\settings\AppData\Roaming" mkdir "%WINPYDIRBASE%\settings\AppData\Roaming"
11051106
set winpython_ini=%WINPYDIRBASE%\settings\winpython.ini
11061107
if not exist "%winpython_ini%" (
11071108
echo [debug]
@@ -1244,7 +1245,8 @@ def _create_batch_scripts_initial(self):
12441245
### WinPython.ini part (removed from nsis)
12451246
#####################
12461247
if (-not (Test-Path "$env:WINPYDIR\..\settings")) { md -Path "$env:WINPYDIR\..\settings" }
1247-
if (-not (Test-Path "$env:WINPYDIR\..\settings\Roaming")) { md -Path "$env:WINPYDIR\..\settings\Roaming" }
1248+
if (-not (Test-Path "$env:WINPYDIR\..\settings\AppData")) { md -Path "$env:WINPYDIR\..\settings\AppData" }
1249+
if (-not (Test-Path "$env:WINPYDIR\..\settings\AppData\Roaming")) { md -Path "$env:WINPYDIR\..\settings\AppData\Roaming" }
12481250
$env:winpython_ini = "$env:WINPYDIR\..\settings\winpython.ini"
12491251
if (-not (Test-Path $env:winpython_ini)) {
12501252
"[debug]" | Add-Content -Path $env:winpython_ini
@@ -1481,6 +1483,10 @@ def _create_batch_scripts(self):
14811483
echo JUPYTER_DATA_DIR = %%HOME%%
14821484
echo WINPYWORKDIR = %%HOMEDRIVE%%%%HOMEPATH%%\Documents\WinPython%%WINPYVER%%\Notebooks
14831485
) > "%winpython_ini%"
1486+
call "%~dp0env_for_icons.bat"
1487+
mkdir %HOMEDRIVE%%HOMEPATH%\Documents\WinPython%WINPYVER%\settings
1488+
mkdir %HOMEDRIVE%%HOMEPATH%\Documents\WinPython%WINPYVER%\settings\AppData
1489+
mkdir %HOMEDRIVE%%HOMEPATH%\Documents\WinPython%WINPYVER%\settings\AppData\Roaming
14841490
""",
14851491
)
14861492

@@ -1501,6 +1507,23 @@ def _create_batch_scripts(self):
15011507
""",
15021508
)
15031509

1510+
self.create_batch_script(
1511+
'make_working_directory_and_userprofile_be_winpython.bat',
1512+
r"""@echo off
1513+
set winpython_ini=%~dp0..\\settings\winpython.ini
1514+
(
1515+
echo [debug]
1516+
echo state = disabled
1517+
echo [environment]
1518+
echo ## <?> Uncomment lines to override environment variables
1519+
echo #HOME = %%HOMEDRIVE%%%%HOMEPATH%%\Documents\WinPython%%WINPYVER%%\settings
1520+
echo USERPROFILE = %%HOME%%
1521+
echo #JUPYTER_DATA_DIR = %%HOME%%
1522+
echo #WINPYWORKDIR = %%HOMEDRIVE%%%%HOMEPATH%%\Documents\WinPython%%WINPYVER%%\Notebooks
1523+
) > "%winpython_ini%"
1524+
""",
1525+
)
1526+
15041527
self.create_batch_script(
15051528
'cmd.bat',
15061529
r"""@echo off
@@ -1516,6 +1539,7 @@ def _create_batch_scripts(self):
15161539
"%WINPYDIR%\python.exe" %*
15171540
""",
15181541
)
1542+
15191543
self.create_batch_script(
15201544
'winpython.bat',
15211545
r"""@echo off
@@ -1907,7 +1931,8 @@ def make(
19071931
# scripts before using an executable launcher, because the latter
19081932
# is creating the directory automatically)
19091933
os.mkdir(osp.join(self.winpydir, 'settings'))
1910-
os.mkdir(osp.join(self.winpydir, 'settings', 'Roaming'))
1934+
os.mkdir(osp.join(self.winpydir, 'settings', 'AppData'))
1935+
os.mkdir(osp.join(self.winpydir, 'settings', 'AppData', 'Roaming'))
19111936
self._print_done()
19121937

19131938
if remove_existing and not self.simulation:

winpython/data/packages.ini

+6
Original file line numberDiff line numberDiff line change
@@ -2599,3 +2599,9 @@ description = Bring colors to your terminal.
25992599
[mergedeep]
26002600
description = A deep merge function for &#128013;.
26012601
2602+
[botorch]
2603+
description = Bayesian Optimization in PyTorch
2604+
2605+
[gpytorch]
2606+
description = An implementation of Gaussian Processes in Pytorch
2607+

0 commit comments

Comments
 (0)