Skip to content

Commit 2f24096

Browse files
committed
Merge pull request #65 from stonebig/master
wppm fix for wheels
2 parents 67bdf83 + 3a3faf7 commit 2f24096

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

make.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -462,15 +462,13 @@ def _install_required_packages(self):
462462
if self.python_version == '3.3':
463463
self.install_package('get-pip-([0-9\.]*[a-z]*[0-9]?).%s(-py%s)?.exe'
464464
% (self.py_arch, self.python_version))
465-
if self.python_version == '2.7':
465+
if self.python_version == '2.7' or self.python_version == '3.4':
466466
self.install_package('%s-([0-9\.]*[a-z]*[0-9]?)(.*)(\.exe|\.whl)' %
467-
'setuptools', install_options=['--upgrade', '--no-deps'])
468-
self.install_package('%s-([0-9\.]*[a-z]*[0-9]?)(.*)(\.exe|\.whl)' %
469-
'pip', install_options=['--upgrade', '--no-deps'])
467+
'setuptools', install_options=['--upgrade', '--no-deps'])
470468

471469
# Install 'main packages' first (was before Wheel idea, keep for now)
472-
for happy_few in['sqlite_bro', 'wheel', 'pywin32', 'six', 'numpy', 'spyder',
473-
'scipy', 'matplotlib', 'pandas']:
470+
for happy_few in['pip', 'wheel', 'pywin32', 'six', 'numpy', 'spyder',
471+
'scipy', 'matplotlib', 'pandas']:
474472
# can be a wheel now
475473
self.install_package(
476474
'%s-([0-9\.]*[a-z\+]*[0-9]?)(.*)(\.exe|\.whl)' % happy_few)
@@ -1155,8 +1153,8 @@ def make_all(build_number, release_level, pyver,
11551153
# DO create only what version at a time
11561154
# You may have to manually delete previous build\winpython-.. directory
11571155

1158-
make_all(2, '', pyver='3.4', rootdir=r'D:\Winpython',
1159-
verbose=False, archis=(32, ))
1156+
#make_all(2, '', pyver='3.4', rootdir=r'D:\Winpython',
1157+
# verbose=False, archis=(32, ))
11601158
#make_all(2, '', pyver='3.4', rootdir=r'D:\Winpython',
11611159
# verbose=False, archis=(64, ), flavor='')
11621160
#make_all(7, '', pyver='3.3', rootdir=r'D:\Winpython',
@@ -1175,8 +1173,8 @@ def make_all(build_number, release_level, pyver,
11751173
# verbose=False, archis=(32, ), flavor='FlavorKivy')
11761174
#make_all(2, '', pyver='3.4', rootdir=r'D:\Winpython',
11771175
# verbose=False, archis=(32, ), flavor='FlavorRfull')
1178-
#make_all(2, '', pyver='3.4', rootdir=r'D:\Winpython',
1179-
# verbose=False, archis=(64, ), flavor='FlavorRfull')
1176+
make_all(2, '', pyver='3.4', rootdir=r'D:\Winpython',
1177+
verbose=False, archis=(64, ), flavor='FlavorRfull')
11801178
#make_all(2, '', pyver='3.4', rootdir=r'D:\Winpython',
11811179
# verbose=False, archis=(32, ), flavor='FlavorJulia')
11821180
#make_all(3, '', pyver='2.7', rootdir=r'D:\Winpython',

winpython/wppm.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def install(self, package, install_options=None):
341341
"""Install package in distribution"""
342342
assert package.is_compatible_with(self)
343343
tmp_fname = None
344-
self.uninstall_existing(package)
344+
# (tragic if pip) self.uninstall_existing(package)
345345
if package.fname.endswith(('.tar.gz', '.zip')):
346346
self._print(package, "Building")
347347
try:
@@ -461,7 +461,12 @@ def uninstall(self, package):
461461
self._print(package, "Uninstalling")
462462
if isinstance(package, WininstPackage):
463463
package.uninstall()
464-
else:
464+
package.remove_log(self.logdir)
465+
elif not package.name == 'pip':
466+
subprocess.call([os.path.dirname(sys.executable) + r'\python.exe',
467+
'-m', 'pip', 'uninstall', package.name, '-y'],
468+
cwd=os.path.dirname(sys.executable))
469+
# legacy, if some package installed by old non-pip means
465470
package.load_log(self.logdir)
466471
for fname in reversed(package.files):
467472
path = osp.join(self.target, fname)

0 commit comments

Comments
 (0)