Skip to content

Commit

Permalink
Merge pull request #201 from stdweird/setup_test
Browse files Browse the repository at this point in the history
install.shared_setup: Do not reload the vsc modules by default
  • Loading branch information
boegel committed Oct 12, 2015
2 parents 83e8dc4 + d2c8bab commit 07dd5be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions lib/vsc/install/shared_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
URL_GH_HPCUGENT = 'https://github.com/hpcugent/%(name)s'
URL_GHUGENT_HPCUGENT = 'https://github.ugent.be/hpcugent/%(name)s'

RELOAD_VSC_MODS = False

def find_extra_sdist_files():
"""Looks for files to append to the FileList that is used by the egg_info."""
Expand Down Expand Up @@ -315,7 +316,11 @@ def reload_vsc_modules(self):

# reimport
for name in reload_vsc_modules:
__import__(name)
try:
__import__(name)
except ImportError:
log.error('Failed to reload/import %s (sys.path %s).', name, sys.path)
raise

def force_xmlrunner(self):
"""
Expand Down Expand Up @@ -367,7 +372,8 @@ def run_tests(self):

cleanup = self.setup_sys_path()

self.reload_vsc_modules()
if RELOAD_VSC_MODS:
self.reload_vsc_modules()

res = TestCommand.run_tests(self)

Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ def remove_bdist_rpm_source_file():

shared_setup.remove_extra_bdist_rpm_files = remove_bdist_rpm_source_file

# Re-reload the vsc modules that vsc-base ships
shared_setup.RELOAD_VSC_MODS = True

PACKAGE = {
'name': 'vsc-base',
'version': '2.4.1',
'version': '2.4.2',
'author': [sdw, jt, ag, kh],
'maintainer': [sdw, jt, ag, kh],
'packages': ['vsc', 'vsc.install', 'vsc.utils'],
Expand Down

0 comments on commit 07dd5be

Please sign in to comment.