[pypy-commit] pypy default: fix for other platforms

alex_gaynor noreply at buildbot.pypy.org
Sun Mar 11 20:29:10 CET 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r53300:da7a01508603
Date: 2012-03-11 12:28 -0700
http://bitbucket.org/pypy/pypy/changeset/da7a01508603/

Log:	fix for other platforms

diff --git a/pypy/module/__pypy__/__init__.py b/pypy/module/__pypy__/__init__.py
--- a/pypy/module/__pypy__/__init__.py
+++ b/pypy/module/__pypy__/__init__.py
@@ -1,5 +1,5 @@
+import sys
 
-# Package initialisation
 from pypy.interpreter.mixedmodule import MixedModule
 from pypy.module.imp.importing import get_pyc_magic
 from pypy.module.__pypy__ import interp_time
@@ -16,7 +16,7 @@
 class TimeModule(MixedModule):
     appleveldefs = {}
     interpleveldefs = {}
-    if interp_time.HAS_CLOCK_GETTIME:
+    if sys.platform.startswith("linux"):
         interpleveldefs["clock_gettime"] = "interp_time.clock_gettime"
         interpleveldefs["clock_getres"] = "interp_time.clock_getres"
         for name in [
diff --git a/pypy/module/__pypy__/interp_time.py b/pypy/module/__pypy__/interp_time.py
--- a/pypy/module/__pypy__/interp_time.py
+++ b/pypy/module/__pypy__/interp_time.py
@@ -7,15 +7,10 @@
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
 
 
-if sys.platform.startswith("linux"):
-    LIBRARIES = ["rt"]
-else:
-    LIBRARIES = []
-
 class CConfig:
     _compilation_info_ = ExternalCompilationInfo(
         includes=["time.h"],
-        libraries=LIBRARIES,
+        libraries=["rt"],
     )
 
     HAS_CLOCK_GETTIME = rffi_platform.Has('clock_gettime')


More information about the pypy-commit mailing list