Fix linux binary installer bug

This commit is contained in:
Kovid Goyal
2010-08-20 15:27:53 -06:00
parent 71839f0a35
commit 88cd5dc1a6
48 changed files with 4084 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#------------------------------------------------------------------------------
# SharedLibSource.py
# Initialization script for cx_Freeze which imports the site module (as per
# normal processing of a Python script) and then searches for a file with the
# same name as the shared library but with the extension .pth. The entries in
# this file are used to modify the path to use for subsequent imports.
#------------------------------------------------------------------------------
import os
import sys
import warnings
# the site module must be imported for normal behavior to take place; it is
# done dynamically so that cx_Freeze will not add all modules referenced by
# the site module to the frozen executable
__import__("site")
# now locate the pth file to modify the path appropriately
baseName, ext = os.path.splitext(FILE_NAME)
pathFileName = baseName + ".pth"
sys.path = [s.strip() for s in file(pathFileName).read().splitlines()] + \
sys.path