[pypy-svn] r37716 - pypy/dist/pypy/translator/cli
antocuni at codespeak.net
antocuni at codespeak.net
Thu Feb 1 11:44:31 CET 2007
Author: antocuni
Date: Thu Feb 1 11:44:30 2007
New Revision: 37716
Modified:
pypy/dist/pypy/translator/cli/rte.py
Log:
Check for the presence of 'gmcs' only when really needed, not at
import time. Thanks to fijal for the bug report.
Modified: pypy/dist/pypy/translator/cli/rte.py
==============================================================================
--- pypy/dist/pypy/translator/cli/rte.py (original)
+++ pypy/dist/pypy/translator/cli/rte.py Thu Feb 1 11:44:30 2007
@@ -27,7 +27,10 @@
ALIAS = None
FLAGS = []
DEPENDENCIES = []
- COMPILER = SDK.csc()
+
+ def get_COMPILER(cls):
+ return SDK.csc()
+ get_COMPILER = classmethod(get_COMPILER)
def get(cls):
for dep in cls.DEPENDENCIES:
@@ -53,7 +56,7 @@
log.red("Compiling %s" % (cls.ALIAS or cls.OUTPUT))
oldcwd = os.getcwd()
os.chdir(SRC_DIR)
- compiler = subprocess.Popen([cls.COMPILER] + cls.FLAGS + ['/out:%s' % out] + sources,
+ compiler = subprocess.Popen([cls.get_COMPILER()] + cls.FLAGS + ['/out:%s' % out] + sources,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = compiler.communicate()
retval = compiler.wait()
@@ -68,8 +71,11 @@
class MainStub(Target):
SOURCES = ['stub/main.il']
OUTPUT = 'main.exe'
- COMPILER = SDK.ilasm()
+ def get_COMPILER(cls):
+ return SDK.ilasm()
+ get_COMPILER = classmethod(get_COMPILER)
+
class FrameworkDLL(Target):
SOURCES = ['pypylib.cs', 'll_os.cs', 'errno.cs', 'll_math.cs']
OUTPUT = 'pypylib.dll'
More information about the pypy-svn
mailing list