music-dl/src/setup.py

47 lines
1.4 KiB
Python
Raw Normal View History

2020-07-07 17:21:31 -05:00
# -*- coding: utf-8 -*-
import sys
import platform
2020-07-07 17:21:31 -05:00
import os
import i18n
from cx_Freeze import setup, Executable
from babel.messages import frontend as babel
i18n.setup()
import application
def find_accessible_output2_datafiles():
import accessible_output2
path = os.path.join(accessible_output2.__path__[0], 'lib')
dest_dir = os.path.join('accessible_output2', 'lib')
return (path, dest_dir)
2020-07-07 17:21:31 -05:00
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
2020-07-07 17:21:31 -05:00
build_exe_options = dict(
build_exe="dist",
optimize=1,
include_msvcr=True,
zip_include_packages=["accessible_output2"],
replace_paths = [("*", "")],
include_files=["app-configuration.defaults", "cacerts.txt", "locales", "plugins", "libvlc.dll", "libvlccore.dll", find_accessible_output2_datafiles()],
)
2020-07-07 17:21:31 -05:00
executables = [
Executable('main.py', base=base, targetName="MusicDL")
]
2020-07-07 17:21:31 -05:00
setup(name='musicDL',
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 = {"musicdl": [('**.py', 'python', None)]},
options = {"build_exe": build_exe_options},
executables=executables
)