8000 tweak further USERPROFILE effect by stonebig · Pull Request #846 · winpython/winpython · GitHub
[go: up one dir, main page]

Skip to content

tweak further USERPROFILE effect #846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,8 @@ def _create_batch_scripts_initial(self):
rem WinPython.ini part (removed from nsis)
rem ******************
if not exist "%WINPYDIRBASE%\settings" mkdir "%WINPYDIRBASE%\settings"
if not exist "%WINPYDIRBASE%\settings\Roaming" mkdir "%WINPYDIRBASE%\settings\Roaming"
if not exist "%WINPYDIRBASE%\settings\AppData" mkdir "%WINPYDIRBASE%\settings\AppData"
if not exist "%WINPYDIRBASE%\settings\AppData\Roaming" mkdir "%WINPYDIRBASE%\settings\AppData\Roaming"
set winpython_ini=%WINPYDIRBASE%\settings\winpython.ini
if not exist "%winpython_ini%" (
echo [debug]
Expand Down Expand Up @@ -1244,7 +1245,8 @@ def _create_batch_scripts_initial(self):
### WinPython.ini part (removed from nsis)
#####################
if (-not (Test-Path "$env:WINPYDIR\..\settings")) { md -Path "$env:WINPYDIR\..\settings" }
if (-not (Test-Path "$env:WINPYDIR\..\settings\Roaming")) { md -Path "$env:WINPYDIR\..\settings\Roaming" }
if (-not (Test-Path "$env:WINPYDIR\..\settings\AppData")) { md -Path "$env:WINPYDIR\..\settings\AppData" }
if (-not (Test-Path "$env:WINPYDIR\..\settings\AppData\Roaming")) { md -Path "$env:WINPYDIR\..\settings\AppData\Roaming" }
$env:winpython_ini = "$env:WINPYDIR\..\settings\winpython.ini"
if (-not (Test-Path $env:winpython_ini)) {
"[debug]" | Add-Content -Path $env:winpython_ini
Expand Down Expand Up @@ -1481,6 +1483,10 @@ def _create_batch_scripts(self):
echo JUPYTER_DATA_DIR = %%HOME%%
echo WINPYWORKDIR = %%HOMEDRIVE%%%%HOMEPATH%%\Documents\WinPython%%WINPYVER%%\Notebooks
) > "%winpython_ini%"
call "%~dp0env_for_icons.bat"
mkdir %HOMEDRIVE%%HOMEPATH%\Documents\WinPython%WINPYVER%\settings
mkdir %HOMEDRIVE%%HOMEPATH%\Documents\WinPython%WINPYVER%\settings\AppData
mkdir %HOMEDRIVE%%HOMEPATH%\Documents\WinPython%WINPYVER%\settings\AppData\Roaming
""",
)

Expand All @@ -1501,6 +1507,23 @@ def _create_batch_scripts(self):
""",
)

self.create_batch_script(
'make_working_directory_and_userprofile_be_winpython.bat',
r"""@echo off
set winpython_ini=%~dp0..\\settings\winpython.ini
(
echo [debug]
echo state = disabled
echo [environment]
echo ## <?> Uncomment lines to override environment variables
echo #HOME = %%HOMEDRIVE%%%%HOMEPATH%%\Documents\WinPython%%WINPYVER%%\settings
echo USERPROFILE = %%HOME%%
echo #JUPYTER_DATA_DIR = %%HOME%%
echo #WINPYWORKDIR = %%HOMEDRIVE%%%%HOMEPATH%%\Documents\WinPython%%WINPYVER%%\Notebooks
) > "%winpython_ini%"
""",
)

self.create_batch_script(
'cmd.bat',
r"""@echo off
Expand All @@ -1516,6 +1539,7 @@ def _create_batch_scripts(self):
"%WINPYDIR%\python.exe" %*
""",
)

self.create_batch_script(
'winpython.bat',
r"""@echo off
Expand Down Expand Up @@ -1907,7 +1931,8 @@ def make(
# scripts before using an executable launcher, because the latter
# is creating the directory automatically)
os.mkdir(osp.join(self.winpydir, 'settings'))
os.mkdir(osp.join(self.winpydir, 'settings', 'Roaming'))
os.mkdir(osp.join(self.winpydir, 'settings', 'AppData'))
os.mkdir(osp.join(self.winpydir, 'settings', 'AppData', 'Roaming'))
self._print_done()

if remove_existing and not self.simulation:
Expand Down
6 changes: 6 additions & 0 deletions winpython/data/packages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2599,3 +2599,9 @@ description = Bring colors to your terminal.
[mergedeep]
description = A deep merge function for &#128013;.

[botorch]
description = Bayesian Optimization in PyTorch

[gpytorch]
description = An implementation of Gaussian Processes in Pytorch

0