Commit 3e3a9a74 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Make modulefinder importable

Paste kind of uses it.

It might also be ok to just have it throw an ImportError()
parent 1354c854
......@@ -17,12 +17,13 @@ else:
# remain compatible with Python < 2.3
READ_MODE = "r"
LOAD_CONST = chr(dis.opname.index('LOAD_CONST'))
IMPORT_NAME = chr(dis.opname.index('IMPORT_NAME'))
STORE_NAME = chr(dis.opname.index('STORE_NAME'))
STORE_GLOBAL = chr(dis.opname.index('STORE_GLOBAL'))
STORE_OPS = [STORE_NAME, STORE_GLOBAL]
HAVE_ARGUMENT = chr(dis.HAVE_ARGUMENT)
# Pyston change: comment these out
# LOAD_CONST = chr(dis.opname.index('LOAD_CONST'))
# IMPORT_NAME = chr(dis.opname.index('IMPORT_NAME'))
# STORE_NAME = chr(dis.opname.index('STORE_NAME'))
# STORE_GLOBAL = chr(dis.opname.index('STORE_GLOBAL'))
# STORE_OPS = [STORE_NAME, STORE_GLOBAL]
# HAVE_ARGUMENT = chr(dis.HAVE_ARGUMENT)
# Modulefinder does a good job at simulating Python's, but it can not
# handle __path__ modifications packages make at runtime. Therefore there
......
# Make sure we can at least support people who want to register themselves with modulefinder,
# even if we don't actually support using modulefinder to find modules.
import modulefinder
modulefinder.AddPackagePath("foo", "bar")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment