Do not attempt to reinstall python if it already exists (#394)
* Do not attempt to reinstall python if it already exists, since that python may be interpreting the current emsdk.py script that is being executed to do the installation. * Add TODO comment about refactoring install scheme
This commit is contained in:
9
emsdk.py
9
emsdk.py
@@ -1698,6 +1698,15 @@ class Tool(object):
|
|||||||
print("Done installing SDK '" + str(self) + "'.")
|
print("Done installing SDK '" + str(self) + "'.")
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
# We should not force reinstallation of python if it already exists, since that very python
|
||||||
|
# may be interpreting the current emsdk.py script we are executing. On Windows this would
|
||||||
|
# lead to a failure to uncompress the python zip file as the python executable files are in use.
|
||||||
|
# TODO: Refactor codebase to avoid needing this kind of special case check by being more
|
||||||
|
# careful about reinstallation, see https://github.com/emscripten-core/emsdk/pull/394#issuecomment-559386468
|
||||||
|
# for a scheme that would work.
|
||||||
|
if self.id == 'python' and self.is_installed():
|
||||||
|
print("Skipped installing " + self.name + ", already installed.")
|
||||||
|
return True
|
||||||
print("Installing tool '" + str(self) + "'..")
|
print("Installing tool '" + str(self) + "'..")
|
||||||
url = self.download_url()
|
url = self.download_url()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user