mirror of
https://github.com/kennethreitz-archive/pyinstaller.git
synced 2026-06-05 23:50:17 +00:00
b98a53df92
git-svn-id: http://svn.pyinstaller.org/trunk@2 8dd32b29-ccff-0310-8a9a-9233e24343b1
12 lines
424 B
Python
12 lines
424 B
Python
attrs = [('notamodule','')]
|
|
def hook(mod):
|
|
import os, sys, marshal
|
|
other = os.path.join(mod.__path__[0], '../pkg2/__init__.pyc')
|
|
if os.path.exists(other):
|
|
co = marshal.loads(open(other,'rb').read()[8:])
|
|
else:
|
|
co = compile(open(other[:-1],'r').read()+'\n', other, 'exec')
|
|
mod.__init__(mod.__name__, other, co)
|
|
mod.__path__.append(os.path.join(mod.__path__[0], 'extra'))
|
|
return mod
|