Skip to content

Commit 07dd5be

Browse files
committed
Merge pull request #201 from stdweird/setup_test
install.shared_setup: Do not reload the vsc modules by default
2 parents 83e8dc4 + d2c8bab commit 07dd5be

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

lib/vsc/install/shared_setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
URL_GH_HPCUGENT = 'https://github.com/hpcugent/%(name)s'
9494
URL_GHUGENT_HPCUGENT = 'https://github.ugent.be/hpcugent/%(name)s'
9595

96+
RELOAD_VSC_MODS = False
9697

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

316317
# reimport
317318
for name in reload_vsc_modules:
318-
__import__(name)
319+
try:
320+
__import__(name)
321+
except ImportError:
322+
log.error('Failed to reload/import %s (sys.path %s).', name, sys.path)
323+
raise
319324

320325
def force_xmlrunner(self):
321326
"""
@@ -367,7 +372,8 @@ def run_tests(self):
367372

368373
cleanup = self.setup_sys_path()
369374

370-
self.reload_vsc_modules()
375+
if RELOAD_VSC_MODS:
376+
self.reload_vsc_modules()
371377

372378
res = TestCommand.run_tests(self)
373379

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ def remove_bdist_rpm_source_file():
5151

5252
shared_setup.remove_extra_bdist_rpm_files = remove_bdist_rpm_source_file
5353

54+
# Re-reload the vsc modules that vsc-base ships
55+
shared_setup.RELOAD_VSC_MODS = True
5456

5557
PACKAGE = {
5658
'name': 'vsc-base',
57-
'version': '2.4.1',
59+
'version': '2.4.2',
5860
'author': [sdw, jt, ag, kh],
5961
'maintainer': [sdw, jt, ag, kh],
6062
'packages': ['vsc', 'vsc.install', 'vsc.utils'],

0 commit comments

Comments
 (0)