Commit a2552b7e authored by Jim Fulton's avatar Jim Fulton

Be more careful about which py files we recompile.

parent 79ef8441
...@@ -504,6 +504,8 @@ class Installer: ...@@ -504,6 +504,8 @@ class Installer:
else: else:
shutil.copyfile(dist.location, newloc) shutil.copyfile(dist.location, newloc)
redo_pyc(newloc)
# Getting the dist from the environment causes the # Getting the dist from the environment causes the
# distribution meta data to be read. Cloning isn't # distribution meta data to be read. Cloning isn't
# good enough. # good enough.
...@@ -516,6 +518,8 @@ class Installer: ...@@ -516,6 +518,8 @@ class Installer:
# deal with it: # deal with it:
dists = self._call_easy_install( dists = self._call_easy_install(
dist.location, ws, self._dest, dist) dist.location, ws, self._dest, dist)
for dist in dists:
redo_pyc(dist.location)
finally: finally:
if tmp != self._download_cache: if tmp != self._download_cache:
...@@ -579,7 +583,6 @@ class Installer: ...@@ -579,7 +583,6 @@ class Installer:
if ws.find(requirement) is None: if ws.find(requirement) is None:
for dist in self._get_dist(requirement, ws, False): for dist in self._get_dist(requirement, ws, False):
ws.add(dist) ws.add(dist)
redo_pyc(dist.location)
def _constrain(self, requirement): def _constrain(self, requirement):
...@@ -617,7 +620,6 @@ class Installer: ...@@ -617,7 +620,6 @@ class Installer:
for requirement in requirements: for requirement in requirements:
for dist in self._get_dist(requirement, ws, self._always_unzip): for dist in self._get_dist(requirement, ws, self._always_unzip):
ws.add(dist) ws.add(dist)
redo_pyc(dist.location)
self._maybe_add_setuptools(ws, dist) self._maybe_add_setuptools(ws, dist)
# OK, we have the requested distributions and they're in the working # OK, we have the requested distributions and they're in the working
...@@ -644,7 +646,6 @@ class Installer: ...@@ -644,7 +646,6 @@ class Installer:
): ):
ws.add(dist) ws.add(dist)
redo_pyc(dist.location)
self._maybe_add_setuptools(ws, dist) self._maybe_add_setuptools(ws, dist)
except pkg_resources.VersionConflict, err: except pkg_resources.VersionConflict, err:
raise VersionConflict(err, ws) raise VersionConflict(err, ws)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment