socializer/src/setup.py

59 lines
2.0 KiB
Python
Raw Normal View History

2018-12-16 23:25:44 -06:00
# -*- coding: utf-8 -*-
import sys
2016-02-21 08:17:12 -06:00
import application
import platform
import os
from cx_Freeze import setup, Executable
from babel.messages import frontend as babel
2016-02-21 08:17:12 -06:00
def find_sound_lib_datafiles():
import os
import platform
import sound_lib
path = os.path.join(sound_lib.__path__[0], 'lib')
if platform.architecture()[0] == '32bit' or platform.system() == 'Darwin':
arch = 'x86'
else:
arch = 'x64'
dest_dir = os.path.join('sound_lib', 'lib', arch)
source = os.path.join(path, arch)
return (source, dest_dir)
def find_accessible_output2_datafiles():
import os
import accessible_output2
path = os.path.join(accessible_output2.__path__[0], 'lib')
dest_dir = os.path.join('accessible_output2', 'lib')
return (path, dest_dir)
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
2016-02-21 08:17:12 -06:00
build_exe_options = dict(
build_exe="dist",
2019-12-03 10:34:34 -06:00
optimize=1,
include_msvcr=True,
zip_include_packages=["accessible_output2", "sound_lib", "arrow"],
2020-05-07 17:17:07 -05:00
replace_paths = [("*", "")],
include_files=["session.defaults", "cacert.pem", "app-configuration.defaults", "locales", "sounds", "documentation", "../windows-dependencies/x86/oggenc2.exe", "../windows-dependencies/x86/bootstrap.exe", "../windows-dependencies/dictionaries", find_sound_lib_datafiles(), find_accessible_output2_datafiles(), ("../windows-dependencies/msvc32", ".")],
packages=["interactors", "presenters", "views", "wxUI"],
)
2016-02-21 08:17:12 -06:00
executables = [
Executable('main.py', base=base, targetName="socializer")
]
2016-02-21 08:17:12 -06:00
setup(name='Socializer',
version=application.version,
description=application.description,
# Register babel commands in setup file.
cmdclass = {'compile_catalog': babel.compile_catalog,
'extract_messages': babel.extract_messages,
'init_catalog': babel.init_catalog,
'update_catalog': babel.update_catalog},
message_extractors = {"socializer": [('**.py', 'python', None)]},
options = {"build_exe": build_exe_options},
executables=executables
)