Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(979)

Unified Diff: psyco_win32/psyco/__init__.py

Issue 6777021: Adding Win32 installation of Psyco. This will be used to speed up GYP, adding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « psyco_win32/README.chromium ('k') | psyco_win32/psyco/_psyco.pyd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: psyco_win32/psyco/__init__.py
===================================================================
--- psyco_win32/psyco/__init__.py (revision 0)
+++ psyco_win32/psyco/__init__.py (revision 0)
@@ -0,0 +1,54 @@
+###########################################################################
+#
+# Psyco top-level file of the Psyco package.
+# Copyright (C) 2001-2002 Armin Rigo et.al.
+
+"""Psyco -- the Python Specializing Compiler.
+
+Typical usage: add the following lines to your application's main module,
+preferably after the other imports:
+
+try:
+ import psyco
+ psyco.full()
+except ImportError:
+ print 'Psyco not installed, the program will just run slower'
+"""
+###########################################################################
+
+
+#
+# This module is present to make 'psyco' a package and to
+# publish the main functions and variables.
+#
+# More documentation can be found in core.py.
+#
+
+
+# Try to import the dynamic-loading _psyco and report errors
+try:
+ import _psyco
+except ImportError, e:
+ extramsg = ''
+ import sys, imp
+ try:
+ file, filename, (suffix, mode, type) = imp.find_module('_psyco', __path__)
+ except ImportError:
+ ext = [suffix for suffix, mode, type in imp.get_suffixes()
+ if type == imp.C_EXTENSION]
+ if ext:
+ extramsg = (" (cannot locate the compiled extension '_psyco%s' "
+ "in the package path '%s')" % (ext[0], '; '.join(__path__)))
+ else:
+ extramsg = (" (check that the compiled extension '%s' is for "
+ "the correct Python version; this is Python %s)" %
+ (filename, sys.version.split()[0]))
+ raise ImportError, str(e) + extramsg
+
+# Publish important data by importing them in the package
+from support import __version__, error, warning, _getrealframe, _getemulframe
+from support import version_info, __version__ as hexversion
+from core import full, profile, background, runonly, stop, cannotcompile
+from core import log, bind, unbind, proxy, unproxy, dumpcodebuf
+from _psyco import setfilter
+from _psyco import compact, compacttype
Property changes on: psyco_win32\psyco\__init__.py
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « psyco_win32/README.chromium ('k') | psyco_win32/psyco/_psyco.pyd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698