Maciej Fijalkowski avatar Maciej Fijalkowski committed 1f52e67

some more import mess

Comments (0)

Files changed (29)

 
 
 def set_compiler(option, opt, value, parser):
-    from pypy.translator.platform import set_platform
+    from platformer import set_platform
     set_platform('host', value)
 
 def main_(argv=None):

pypy/config/translationoption.py

 # ----------------------------------------------------------------
 
 def set_platform(config):
-    from pypy.translator.platform import set_platform
+    from platformer import set_platform
     set_platform(config.translation.platform, config.translation.cc)
 
 def get_platform(config):
-    from pypy.translator.platform import pick_platform    
+    from platformer import pick_platform    
     opt = config.translation.platform
     cc = config.translation.cc
     return pick_platform(opt, cc)
 
 def _set_platform(opt, opt_str, value, parser):
     from pypy.config.translationoption import PLATFORMS
-    from pypy.translator.platform import set_platform
+    from platformer import set_platform
     if value not in PLATFORMS:
         raise ValueError("%s not in %s" % (value, PLATFORMS))
     set_platform(value, None)

pypy/module/_ffi/test/test__ffi.py

 from pypy.conftest import gettestobjspace
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform
+from platformer import platform
 
 import sys, py
 

pypy/module/_rawffi/test/test__rawffi.py

 
 
 from pypy.conftest import gettestobjspace
-from pypy.translator.platform import platform
+from platformer import platform
 from platformer.cbuild import ExternalCompilationInfo
 from pypy.module._rawffi.interp_rawffi import TYPEMAP
 from pypy.module._rawffi.tracker import Tracker

pypy/module/bz2/interp_bz2.py

 from pypy.interpreter.gateway import interp2app, unwrap_spec
 from pypy.rlib.streamio import Stream
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform as compiler
+from platformer import platform as compiler
 from pypy.rlib.rarithmetic import intmask, r_longlong
 import sys
 

pypy/module/pyexpat/interp_pyexpat.py

 from pypy.rpython.lltypesystem import rffi, lltype
 from pypy.rpython.tool import rffi_platform
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform
+from platformer import platform
 
 import sys
 import weakref

pypy/module/test_lib_pypy/ctypes_tests/conftest.py

         return True
 
 def compile_so_file():
-    from pypy.translator.platform import platform
+    from platformer import platform
     from platformer.cbuild import ExternalCompilationInfo
     udir = pytest.ensuretemp('_ctypes_test')
     cfile = py.path.local(__file__).dirpath().join("_ctypes_test.c")

pypy/rlib/_rsocket_rffi.py

 from pypy.rpython.lltypesystem.rffi import CCHARP
 from pypy.rlib.rposix import get_errno as geterrno
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform as target_platform
+from platformer import platform as target_platform
 
 from pypy.rlib.rarithmetic import intmask, r_uint
 import os,sys

pypy/rlib/clibffi.py

 from pypy.rlib import jit
 from pypy.tool.autopath import pypydir
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform
+from platformer import platform
 import py
 import os
 import sys

pypy/rlib/rdynload.py

 from pypy.rpython.lltypesystem import rffi
 from pypy.rlib.rarithmetic import r_uint
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform
+from platformer import platform
 
 import sys
 

pypy/rlib/ropenssl.py

 from pypy.rpython.lltypesystem import rffi, lltype
 from pypy.rpython.tool import rffi_platform
-from pypy.translator.platform import platform
+from platformer import platform
 from platformer.cbuild import ExternalCompilationInfo
 
 import sys, os

pypy/rlib/rsdl/eci.py

 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import CompilationError
+from platformer import CompilationError
 import py
 import sys
 

pypy/rlib/rwin32.py

 from pypy.rpython.tool import rffi_platform
 from pypy.tool.udir import udir
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import CompilationError
+from platformer import CompilationError
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.rlib.rarithmetic import intmask
 from pypy.rlib.rposix import validate_fd
         # Prior to Visual Studio 8, the MSVCRT dll doesn't export the
         # _dosmaperr() function, which is available only when compiled
         # against the static CRT library.
-        from pypy.translator.platform import host_factory
+        from platformer import host_factory
         static_platform = host_factory()
         if static_platform.name == 'msvc':
             static_platform.cflags = ['/MT']  # static CRT

pypy/rlib/rzlib.py

 from pypy.rlib.rstring import StringBuilder
 from pypy.rpython.lltypesystem import rffi, lltype
 from pypy.rpython.tool import rffi_platform
-from pypy.translator.platform import platform as compiler, CompilationError
+from platformer import platform as compiler, CompilationError
 from platformer.cbuild import ExternalCompilationInfo
 
 

pypy/rlib/test/test_clibffi.py

         lltype.free(tpe2, flavor='raw')
 
     def test_struct_by_val(self):
-        from pypy.translator.platform import platform
+        from platformer import platform
         from pypy.tool.udir import udir
 
         c_file = udir.ensure("test_libffi", dir=1).join("xlib.c")
         assert not ALLOCATED
 
     def test_ret_struct_val(self):
-        from pypy.translator.platform import platform
+        from platformer import platform
         from pypy.tool.udir import udir
 
         c_file = udir.ensure("test_libffi", dir=1).join("xlib.c")
         assert not ALLOCATED
 
     def test_cdll_life_time(self):
-        from pypy.translator.platform import platform
+        from platformer import platform
         from pypy.tool.udir import udir
 
         c_file = udir.ensure("test_libffi", dir=1).join("xlib.c")

pypy/rlib/test/test_libffi.py

         from pypy.tool.udir import udir
         from platformer.cbuild import ExternalCompilationInfo
         from platformer.cbuild import STANDARD_DEFINES
-        from pypy.translator.platform import platform
+        from platformer import platform
 
         BaseFfiTest.setup_class()
         # prepare C code as an example, so we can load it and call

pypy/rpython/lltypesystem/module/ll_math.py

 from pypy.tool.autopath import pypydir
 from pypy.rlib import jit, rposix
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform
+from platformer import platform
 from pypy.rlib.rfloat import isfinite, isinf, isnan, INFINITY, NAN
 
 use_library_isinf_isnan = False

pypy/rpython/lltypesystem/test/test_ll2ctypes.py

 
 class TestPlatform(object):
     def test_lib_on_libpaths(self):
-        from pypy.translator.platform import platform
+        from platformer import platform
 
         tmpdir = udir.join('lib_on_libppaths')
         tmpdir.ensure(dir=1)
         if not sys.platform.startswith('linux'):
             py.test.skip("Not supported")
 
-        from pypy.translator.platform import platform
+        from platformer import platform
 
         tmpdir = udir.join('lib_on_libppaths_prefix')
         tmpdir.ensure(dir=1)

pypy/rpython/tool/rffi_platform.py

 from pypy.rpython.lltypesystem import rffi
 from pypy.tool.gcc_cache import build_executable_cache, try_compile_cache
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import CompilationError
+from platformer import CompilationError
 from pypy.tool.udir import udir
 from pypy.tool.autopath import pypydir
 from pypy.rlib.rarithmetic import r_uint, r_longlong, r_ulonglong, intmask
 """
 
 def run_example_code(filepath, eci, ignore_errors=False):
-    eci = eci.convert_sources_to_files(being_main=True)
+    eci = eci.convert_sources_to_files(main_clause='#define PYPY_NOT_MAIN_FILE')
     files = [filepath]
     output = build_executable_cache(files, eci, ignore_errors=ignore_errors)
     section = None
 
 def configure_boehm(platform=None):
     if platform is None:
-        from pypy.translator.platform import platform
+        from platformer import platform
     if sys.platform == 'win32':
         import platform as host_platform # just to ask for the arch. Confusion-alert!
         if host_platform.architecture()[0] == '32bit':

pypy/rpython/tool/test/test_mkrffi.py

     def setup_class(cls):
         import ctypes
         from pypy.tool.udir import udir
-        from pypy.translator.platform import platform
+        from platformer import platform
         from platformer.cbuild import ExternalCompilationInfo
         
         c_source = """

pypy/rpython/tool/test/test_rffi_platform.py

 from pypy.rpython.lltypesystem import rffi
 from pypy.tool.udir import udir
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform
+from platformer import platform
 from pypy.rlib.rarithmetic import r_uint, r_longlong, r_ulonglong
 from pypy.rlib.rfloat import isnan
 

pypy/tool/gcc_cache.py

 from pypy.tool.autopath import pypydir
-from pypy.translator.platform import CompilationError
+from platformer import CompilationError
 from pypy.tool.compat import md5
 import py
 
 def cache_file_path(c_files, eci, cachename):
     "Builds a filename to cache compilation data"
     # Import 'platform' every time, the compiler may have been changed
-    from pypy.translator.platform import platform
+    from platformer import platform
     cache_dir = cache_dir_root.join(cachename).ensure(dir=1)
     filecontents = [c_file.read() for c_file in c_files]
     key = repr((filecontents, eci, platform.key()))
 def build_executable_cache(c_files, eci, ignore_errors=False):
     "Builds and run a program; caches the result"
     # Import 'platform' every time, the compiler may have been changed
-    from pypy.translator.platform import platform
+    from platformer import platform
     path = cache_file_path(c_files, eci, 'build_executable_cache')
     try:
         return path.read()
 def try_compile_cache(c_files, eci):
     "Try to compile a program; caches the result (starts with 'True' or 'FAIL')"
     # Import 'platform' every time, the compiler may have been changed
-    from pypy.translator.platform import platform
+    from platformer import platform
     path = cache_file_path(c_files, eci, 'try_compile_cache')
     try:
         data = path.read()

pypy/translator/c/gcc/test/test_asmgcroot.py

 from pypy.annotation.listdef import s_list_of_strings
 from pypy import conftest
 from platformer.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import platform as compiler
+from platformer import platform as compiler
 from pypy.rlib.rarithmetic import is_emulated_long
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.rlib.entrypoint import entrypoint, secondary_entrypoints

pypy/translator/c/test/test_boehm.py

 
 def setup_module(mod):
     from pypy.rpython.tool.rffi_platform import configure_boehm
-    from pypy.translator.platform import CompilationError
+    from platformer import CompilationError
     try:
         configure_boehm()
     except CompilationError:

pypy/translator/c/test/test_lltyped.py

         import sys
         from pypy.rpython.lltypesystem import llgroup
         from pypy.rpython.lltypesystem.lloperation import llop
-        from pypy.translator.platform import CompilationError
+        from platformer import CompilationError
         if toobig and sys.maxint > 2147483647:
             py.test.skip("not easy to test groups too big on 64-bit platforms")
         grp = llgroup.group("big")

pypy/translator/c/test/test_standalone.py

 class TestMaemo(TestStandalone):
     def setup_class(cls):
         py.test.skip("TestMaemo: tests skipped for now")
-        from pypy.translator.platform.maemo import check_scratchbox
+        from platformer.maemo import check_scratchbox
         check_scratchbox()
         from pypy.config.pypyoption import get_pypy_config
         config = get_pypy_config(translating=True)

pypy/translator/driver.py

     def possibly_check_for_boehm(self):
         if self.config.translation.gc == "boehm":
             from pypy.rpython.tool.rffi_platform import configure_boehm
-            from pypy.translator.platform import CompilationError
+            from platformer import CompilationError
             try:
                 configure_boehm(self.translator.platform)
             except CompilationError, e:

pypy/translator/tool/test/test_cbuild.py

                        'dxowqbncpqympqhe-config')
 
     def test_platforms(self):
-        from pypy.translator.platform import Platform
+        from platformer import Platform
 
         class Maemo(Platform):
             def __init__(self, cc=None):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.