Archived
1
0

if/else together, newest version setup.py

This commit is contained in:
Jip J. Dekker 2014-06-04 15:29:44 +02:00
parent ae06855f35
commit 93940c99e7
2 changed files with 4 additions and 6 deletions

View File

@ -5,7 +5,7 @@ from cx_Freeze import setup, Executable
# library.zip, also the FourmiCrawler map has to be copied to both the library and the exe.win32-2.7 folder. after
# putting the files in the library the library has to be zipped and replace the old library.
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os", "scrapy", "lxml", "w3lib", "pkg_resources", "zope.interface"], "excludes": []}
build_exe_options = {"packages": ["os", "scrapy", "lxml", "w3lib", "pkg_resources", "zope.interface", "twisted.internet"], "excludes": []}
# GUI applications require a different base on Windows (the default is for a
# console application).

View File

@ -12,13 +12,11 @@ class SourceLoader:
if hasattr(sys,'frozen'):
path = os.path.dirname(sys.executable)
path += "\\" + rel_dir
known_parser = set()
else:
path = os.path.dirname(os.path.abspath(__file__))
path += "\\" + rel_dir
known_parser = set()
path += "\\" + rel_dir
known_parser = set()
for py in [f[:-3] for f in os.listdir(path) if f.endswith('.py') and f != '__init__.py']:
mod = __import__('.'.join([rel_dir.replace('\\', "."), py]), fromlist=[py])