Commit d45c9fb9 authored by John Zhang's avatar John Zhang

pybenchmodules option

parent f76dd7fb
Pipeline #870 canceled with stage
......@@ -85,6 +85,8 @@ def main_(argv=None):
pypyoption.enable_allworkingmodules(config)
if config.objspace.pytestmodules:
pypyoption.enable_pytestmodules(config)
if config.objspace.pybenchmodules:
pypyoption.enable_pybenchmodules(config)
if config.objspace.usemodules._continuation:
config.translation.continuation = True
if config.objspace.usemodules.thread:
......
......@@ -61,6 +61,11 @@ pytest_modules.update([
'_collections', '_locale',
])
pybench_modules = pytest_modules.copy()
pybench_modules.update([
'unicodedata',
])
# XXX this should move somewhere else, maybe to platform ("is this posixish"
# check or something)
if sys.platform == "win32":
......@@ -173,6 +178,11 @@ pypy_optiondescription = OptionDescription("objspace", "Object Space Options", [
cmdline="--pytestmodules",
suggests=[("objspace.allworkingmodules", False)]),
BoolOption("pybenchmodules", "modules needed to run pybench",
default=False,
cmdline="--pybenchmodules",
suggests=[("objspace.allworkingmodules", False)]),
StrOption("extmodules",
"Comma-separated list of third-party builtin modules",
cmdline="--ext",
......@@ -310,6 +320,11 @@ def enable_pytestmodules(config):
modules = [name for name in modules if name not in essential_modules]
config.objspace.usemodules.suggest(**dict.fromkeys(modules, True))
def enable_pybenchmodules(config):
modules = pybench_modules
modules = [name for name in modules if name not in essential_modules]
config.objspace.usemodules.suggest(**dict.fromkeys(modules, True))
if __name__ == '__main__':
config = get_pypy_config()
print config.getpaths()
......
......@@ -234,6 +234,9 @@ class PyPyTarget(object):
if config.objspace.pytestmodules:
from pypy.config.pypyoption import enable_pytestmodules
enable_pytestmodules(config)
if config.objspace.pybenchmodules:
from pypy.config.pypyoption import enable_pybenchmodules
enable_pybenchmodules(config)
config.translation.suggest(check_str_without_nul=True)
config.translation.suggest(shared=True)
......
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