Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.project
LICENSE_HEADER
*.pyc
*.pyo
*.nja
build/
dist/
Expand Down
2 changes: 2 additions & 0 deletions easybuild/tools/build_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class EasyBuildError(LoggedException):
"""
LOC_INFO_TOP_PKG_NAMES = ['easybuild', 'vsc']
LOC_INFO_LEVEL = 1
# always include location where error was raised from, even under 'python -O'
INCLUDE_LOCATION = True

# use custom error logging method, to make sure EasyBuildError isn't being raised again to avoid infinite recursion
# only required because 'error' log method raises (should no longer be needed in EB v3.x)
Expand Down
2 changes: 0 additions & 2 deletions easybuild/tools/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@
"""
import copy
import os
import re
import sys
from datetime import datetime
from time import gmtime, strftime

import easybuild.tools.config as config
from easybuild.framework.easyblock import build_easyconfigs
from easybuild.framework.easyconfig.tools import process_easyconfig
from easybuild.framework.easyconfig.tools import skip_available
Expand Down
7 changes: 7 additions & 0 deletions eb
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,11 @@ then
exit 3
fi

# enable optimization, unless $PYTHONOPTIMIZE is defined (use "export PYTHONOPTIMIZE=0" to disable optimization)
if [ -z $PYTHONOPTIMIZE ]
then
# instruct Python to turn on basic optimizations (equivalent to using 'python -O')
export PYTHONOPTIMIZE=1
fi

$PYTHON -m easybuild.main "$@"
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[install]
# generate .pyo files, 'eb' uses 'python -O' or sets $PYTHONOPTIMIZE
optimize=1

[bdist_rpm]
requires = environment-modules, bash, python >= 2.6, python < 3

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def find_rel_test():
provides=["eb"] + easybuild_packages,
test_suite="test.framework.suite",
zip_safe=False,
install_requires=["vsc-base >= 2.2.4"],
install_requires=["vsc-base >= 2.2.6"],
extras_require = {
'yeb': ["PyYAML >= 3.11"],
},
Expand Down
4 changes: 4 additions & 0 deletions test/framework/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def setUp(self):
"""Set up testcase."""
super(EnhancedTestCase, self).setUp()

# make sure option parser doesn't pick up any cmdline arguments/options
while len(sys.argv) > 1:
sys.argv.pop()

# keep track of log handlers
log = fancylogger.getLogger(fname=False)
self.orig_log_handlers = log.handlers[:]
Expand Down