Author: Maciej Fijalkowski <fij...@gmail.com> Branch: Changeset: r54571:483b9f63a068 Date: 2012-04-20 12:27 +0200 http://bitbucket.org/pypy/pypy/changeset/483b9f63a068/
Log: merge diff --git a/lib_pypy/pyrepl/reader.py b/lib_pypy/pyrepl/reader.py --- a/lib_pypy/pyrepl/reader.py +++ b/lib_pypy/pyrepl/reader.py @@ -152,8 +152,8 @@ (r'\<delete>', 'delete'), (r'\<backspace>', 'backspace'), (r'\M-\<backspace>', 'backward-kill-word'), - (r'\<end>', 'end'), - (r'\<home>', 'home'), + (r'\<end>', 'end-of-line'), # was 'end' + (r'\<home>', 'beginning-of-line'), # was 'home' (r'\<f1>', 'help'), (r'\EOF', 'end'), # the entries in the terminfo database for xterms (r'\EOH', 'home'), # seem to be wrong. this is a less than ideal diff --git a/pypy/module/cpyext/pyerrors.py b/pypy/module/cpyext/pyerrors.py --- a/pypy/module/cpyext/pyerrors.py +++ b/pypy/module/cpyext/pyerrors.py @@ -314,7 +314,10 @@ """This function simulates the effect of a SIGINT signal arriving --- the next time PyErr_CheckSignals() is called, KeyboardInterrupt will be raised. It may be called without holding the interpreter lock.""" - space.check_signal_action.set_interrupt() + if space.check_signal_action is not None: + space.check_signal_action.set_interrupt() + #else: + # no 'signal' module present, ignore... We can't return an error here @cpython_api([PyObjectP, PyObjectP, PyObjectP], lltype.Void) def PyErr_GetExcInfo(space, ptype, pvalue, ptraceback): diff --git a/pypy/module/rctime/interp_time.py b/pypy/module/rctime/interp_time.py --- a/pypy/module/rctime/interp_time.py +++ b/pypy/module/rctime/interp_time.py @@ -24,10 +24,9 @@ from pypy.module.thread import ll_thread as thread eci = ExternalCompilationInfo( + includes = ['windows.h'], post_include_bits = ["BOOL pypy_timemodule_setCtrlHandler(HANDLE event);"], separate_module_sources=[''' - #include <windows.h> - static HANDLE interrupt_event; static BOOL WINAPI CtrlHandlerRoutine( diff --git a/pypy/module/zipimport/interp_zipimport.py b/pypy/module/zipimport/interp_zipimport.py --- a/pypy/module/zipimport/interp_zipimport.py +++ b/pypy/module/zipimport/interp_zipimport.py @@ -229,7 +229,11 @@ startpos = fullname.rfind('.') + 1 # 0 when not found assert startpos >= 0 subname = fullname[startpos:] - return self.prefix + subname.replace('.', '/') + if ZIPSEP == os.path.sep: + return self.prefix + subname.replace('.', '/') + else: + return self.prefix.replace(os.path.sep, ZIPSEP) + \ + subname.replace('.', '/') def make_co_filename(self, filename): """ diff --git a/pypy/module/zipimport/test/test_zipimport.py b/pypy/module/zipimport/test/test_zipimport.py --- a/pypy/module/zipimport/test/test_zipimport.py +++ b/pypy/module/zipimport/test/test_zipimport.py @@ -313,13 +313,11 @@ assert z.get_filename("package") == mod.__file__ def test_subdirectory_twice(self): - import os, zipimport + #import os, zipimport self.writefile("package/__init__.py", "") self.writefile("package/subpackage/__init__.py", "") self.writefile("package/subpackage/foo.py", "") - import sys - print sys.path mod = __import__('package.subpackage.foo', None, None, []) assert mod diff --git a/pypy/rlib/ropenssl.py b/pypy/rlib/ropenssl.py --- a/pypy/rlib/ropenssl.py +++ b/pypy/rlib/ropenssl.py @@ -6,6 +6,7 @@ import sys, os link_files = [] +testonly_libraries = [] if sys.platform == 'win32' and platform.name != 'mingw32': libraries = ['libeay32', 'ssleay32', 'user32', 'advapi32', 'gdi32', 'msvcrt', 'ws2_32'] @@ -27,6 +28,7 @@ # amount of troubles due to symbol versions # and 0.9.8/1.0.0 link_files += ['/usr/lib/libssl.a', '/usr/lib/libcrypto.a'] + testonly_libraries += ['ssl', 'crypto'] else: libraries += ['ssl', 'crypto'] @@ -41,6 +43,7 @@ eci = ExternalCompilationInfo( libraries = libraries, link_files = link_files, + testonly_libraries = testonly_libraries, includes = includes, export_symbols = [], post_include_bits = [ diff --git a/pypy/rpython/lltypesystem/ll2ctypes.py b/pypy/rpython/lltypesystem/ll2ctypes.py --- a/pypy/rpython/lltypesystem/ll2ctypes.py +++ b/pypy/rpython/lltypesystem/ll2ctypes.py @@ -1072,7 +1072,7 @@ try: eci = _eci_cache[old_eci] except KeyError: - eci = old_eci.compile_shared_lib() + eci = old_eci.compile_shared_lib(ignore_a_files=True) _eci_cache[old_eci] = eci libraries = eci.testonly_libraries + eci.libraries + eci.frameworks diff --git a/pypy/translator/tool/cbuild.py b/pypy/translator/tool/cbuild.py --- a/pypy/translator/tool/cbuild.py +++ b/pypy/translator/tool/cbuild.py @@ -267,9 +267,12 @@ d['separate_module_files'] = () return files, ExternalCompilationInfo(**d) - def compile_shared_lib(self, outputfilename=None): + def compile_shared_lib(self, outputfilename=None, ignore_a_files=False): self = self.convert_sources_to_files() - if not self.separate_module_files: + if ignore_a_files: + if not [fn for fn in self.link_files if fn.endswith('.a')]: + ignore_a_files = False # there are none + if not self.separate_module_files and not ignore_a_files: if sys.platform != 'win32': return self if not self.export_symbols: @@ -288,6 +291,13 @@ num += 1 basepath.ensure(dir=1) outputfilename = str(pth.dirpath().join(pth.purebasename)) + + if ignore_a_files: + d = self._copy_attributes() + d['link_files'] = [fn for fn in d['link_files'] + if not fn.endswith('.a')] + self = ExternalCompilationInfo(**d) + lib = str(host.compile([], self, outputfilename=outputfilename, standalone=False)) d = self._copy_attributes() _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit