Skip to content

improve upgradability #267

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
Feb 27, 2016
Merged
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
improve upgradability
  • Loading branch information
stonebig committed Feb 27, 2016
commit 1c674a7325d2dd5a8cc8313f59ae443cd5982cc3
8 changes: 5 additions & 3 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,15 +692,15 @@ def _create_batch_scripts(self):
call %~dp0env.bat
echo patch pip and current launchers for move

%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True);dist.patch_all_shebang(to_movable=True)"
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True)"
pause
""")

self.create_batch_script('make_winpython_fix.bat',r"""@echo off
call %~dp0env.bat
echo patch pip and current launchers for non-move

%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=False);dist.patch_all_shebang(to_movable=False)"
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=False)"
pause
""")

Expand Down Expand Up @@ -738,7 +738,7 @@ def _create_batch_scripts(self):
echo this will upgrade pip with latest version, then patch it for WinPython portability ok ?
pause
%WINPYDIR%\python.exe -m pip install --upgrade --force-reinstall pip
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip')
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True)
pause
""")

Expand Down Expand Up @@ -820,6 +820,8 @@ def make(self, remove_existing=True, requirements=None): #, find_links=None):
self._create_batch_scripts() # which set mingwpy as compiler
self._run_complement_batch_scripts("run_required_first.bat")

# pre-patch current pip (until default python has pip 8.0.3)
self.distribution.patch_standard_packages('pip')
# force update of pip (FIRST) and setuptools here
for req in ('pip', 'setuptools'):
actions = ["install","--upgrade", "--force-reinstall", req]
Expand Down