Skip to content

Commit

Permalink
Merge pull request #209 from cdeil/astropy-helpers-update
Browse files Browse the repository at this point in the history
Updated astropy-helpers to v1.0.2

Thanks for the PR, @cdeil
  • Loading branch information
mwcraig committed Apr 23, 2015
2 parents b2ceaa0 + bdcc791 commit 69dfd4c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ nosetests.xml

#editors
.swp
.idea
26 changes: 13 additions & 13 deletions ah_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,19 @@ def run(self):
strategies = ['local_directory', 'local_file', 'index']
dist = None

# First, remove any previously imported versions of astropy_helpers;
# this is necessary for nested installs where one package's installer
# is installing another package via setuptools.sandbox.run_setup, as in
# the case of setup_requires
for key in list(sys.modules):
try:
if key == PACKAGE_NAME or key.startswith(PACKAGE_NAME + '.'):
del sys.modules[key]
except AttributeError:
# Sometimes mysterious non-string things can turn up in
# sys.modules
continue

# Check to see if the path is a submodule
self.is_submodule = self._check_submodule()

Expand Down Expand Up @@ -311,19 +324,6 @@ def run(self):
# Note: Adding the dist to the global working set also activates it
# (makes it importable on sys.path) by default.

# But first, remove any previously imported versions of
# astropy_helpers; this is necessary for nested installs where one
# package's installer is installing another package via
# setuptools.sandbox.run_set, as in the case of setup_requires
for key in list(sys.modules):
try:
if key == PACKAGE_NAME or key.startswith(PACKAGE_NAME + '.'):
del sys.modules[key]
except AttributeError:
# Sometimes mysterious non-string things can turn up in
# sys.modules
continue

try:
pkg_resources.working_set.add(dist, replace=True)
except TypeError:
Expand Down

0 comments on commit 69dfd4c

Please sign in to comment.