[pypy-svn] r30978 - pypy/dist/pypy/translator
antocuni at codespeak.net
antocuni at codespeak.net
Fri Aug 4 09:58:05 CEST 2006
Author: antocuni
Date: Fri Aug 4 09:58:03 2006
New Revision: 30978
Modified:
pypy/dist/pypy/translator/driver.py
Log:
module/__builtin__/importing.py is imported at target setup time at is
uses os.O_* flags at top level, so we need to patch os before that to
let it see the "right" values.
Modified: pypy/dist/pypy/translator/driver.py
==============================================================================
--- pypy/dist/pypy/translator/driver.py (original)
+++ pypy/dist/pypy/translator/driver.py Fri Aug 4 09:58:03 2006
@@ -200,18 +200,6 @@
return res
def task_annotate(self):
- # XXX: this should be a separate task, but I don't know how to
- # specify a task to be executed before annotation only if the
- # backend is 'cli'
-
- # patch some attributes of the os module to make sure they
- # have the same value on every platform.
- backend, ts = self.get_backend_and_type_system()
- if backend == 'cli':
- from pypy.translator.cli.support import patch_os
- self.old_os_defs = patch_os()
- # end of XXX
-
# includes annotation and annotatation simplifications
translator = self.translator
policy = self.policy
@@ -532,6 +520,13 @@
options = _default_options
driver = TranslationDriver(options, default_goal, disable)
+ # patch some attributes of the os module to make sure they
+ # have the same value on every platform.
+ backend, ts = driver.get_backend_and_type_system()
+ if backend == 'cli':
+ from pypy.translator.cli.support import patch_os
+ driver.old_os_defs = patch_os()
+
target = targetspec_dic['target']
spec = target(driver, args)
More information about the Pypy-commit
mailing list