Skip to content

Commit

Permalink
Updated setup.py
Browse files Browse the repository at this point in the history
Relates to issue #13 and #15.
  • Loading branch information
Aeva committed Jan 7, 2017
1 parent 011b8de commit c775386
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

dist_dir = os.path.join(os.getcwd(), 'dist')
if os.path.isdir(dist_dir):
shutil.rmtree(dist_dir)
shutil.rmtree(dist_dir)
os.makedirs(dist_dir)

gnome_path = os.path.join(site.getsitepackages()[1], "gnome")
Expand All @@ -22,7 +22,8 @@
'share\\glib-2.0', 'share\\fonts', 'share\\icons', 'share\\themes\\Default',
'share\\themes\\HighContrast'
]
gnome_resources += glob.glob(os.path.join(gnome_path, "*.dll"))
for path in glob.glob(os.path.join(gnome_path, "*.dll")):
gnome_resources.append(os.path.split(path)[-1])

def bundle(resource):
src_path = os.path.join(gnome_path, resource)
Expand All @@ -33,14 +34,21 @@ def bundle(resource):
else:
shutil.copy(src_path, dest_path)

map(bundle, gnome_resources)
sys.path.append(dist_dir)
map(bundle, gnome_resources)

# note, swap "console" and "windows" below to determine if a console
# window is to be shown
setup(console=['logger.py'], options={
'py2exe': {
'includes' : ['gi', 'PIL'],
'packages': ['gi', 'PIL']
'includes' : ['gi', 'PIL.Image'],
'packages': ['gi', 'PIL'],
'dll_excludes' : ['libgstreamer-1.0-0.dll',
'api-ms-win-core-processthreads-l1-1-2.dll',
'api-ms-win-core-sysinfo-l1-2-1.dll',
'api-ms-win-core-errorhandling-l1-1-1.dll',
'api-ms-win-core-profile-l1-1-0.dll',
'api-ms-win-core-libraryloader-l1-2-0.dll',
],
}
})

0 comments on commit c775386

Please sign in to comment.