8000 Merge pull request #185 from stonebig/master · Aikes/winpython@cc33898 · GitHub
[go: up one dir, main page]

Skip to content

Commit cc33898

Browse files
committed
Merge pull request winpython#185 from stonebig/master
add scripts to make winpython movable or fix
2 parents 9995982 + 25cb956 commit cc33898

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

make.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,24 @@ def _create_batch_scripts(self):
676676
echo [config]>%pydistutils_cfg%
677677
""")
678678

679+
self.create_batch_script('make_winpython_movable.bat',r"""@echo off
680+
call %~dp0env.bat
681+
echo patch pip and current launchers fopr move
682+
rem %WINPYDIR%\python.exe -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%WINPYDIR%\Lib\site-packages\pip\_vendor\distlib\scripts.py', 'executable = get_executable()', 'executable = os.path.join(os.path.basename(get_executable()))' )"
683+
684+
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip');dist.patch_all_shebang(to_movable=True)"
685+
pause
686+
""")
687+
688+
self.create_batch_script('make_winpython_fix.bat',r"""@echo off
689+
call %~dp0env.bat
690+
echo patch pip and current launchers for non-move
691+
%WINPYDIR%\python.exe -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%WINPYDIR%\Lib\site-packages\pip\_vendor\distlib\scripts.py', 'executable = os.path.join(os.path.basename(get_executable()))', 'executable = get_executable()' )"
692+
693+
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_all_shebang(to_movable=False)"
694+
pause
695+
""")
696+
679697
self.create_batch_script('cmd.bat', r"""@echo off
680698
call %~dp0env.bat
681699
cmd.exe /k""")

winpython/data/packages.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,9 @@ description=Tool for transforming reStructuredText to PDF using ReportLab
633633
[runipy]
634634
description=Run IPython notebooks from the command line
635635

636+
[rx]
637+
description=Reactive Extensions (Rx) for Python
638+
636639
[scidoc]
637640
description=Scidoc installs scientific libraries documentation (NumPy, SciPy, ...)
638641

0 commit comments

Comments
 (0)
0