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
17 lines
388 B
Python
17 lines
388 B
Python
import carchive
|
|
import sys
|
|
import os
|
|
|
|
this = carchive.CArchive(sys.executable)
|
|
tk = this.openEmbedded('tk.pkg')
|
|
targetdir = os.environ['_MEIPASS2']
|
|
for fnm in tk.contents():
|
|
stuff = tk.extract(fnm)[1]
|
|
outnm = os.path.join(targetdir, fnm)
|
|
dirnm = os.path.dirname(outnm)
|
|
if not os.path.exists(dirnm):
|
|
os.makedirs(dirnm)
|
|
open(outnm, 'wb').write(stuff)
|
|
tk = None
|
|
|