diff options
| author | martin | 2022-05-01 22:41:20 +0200 |
|---|---|---|
| committer | GitHub | 2022-05-01 22:41:20 +0200 |
| commit | 4c5aa37aa6f41d909153a2b7d522db6d7582659a (patch) | |
| tree | 326aa67921439defcb8c25ea5f770feb63e878a4 /setup.py | |
| parent | 4a3ff8bfce622de0e5affa312d50557b5d336371 (diff) | |
| parent | 820358a79a87b214139eb7693ce80e96be79e3d8 (diff) | |
Merge pull request #69 from djfun/feature-newgui
GUI Redesign with Component System
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 92 |
1 files changed, 62 insertions, 30 deletions
@@ -1,30 +1,62 @@ -from cx_Freeze import setup, Executable - -# Dependencies are automatically detected, but it might need -# fine tuning. -buildOptions = dict(packages = [], excludes = [ - "apport", - "apt", - "ctypes", - "curses", - "distutils", - "email", - "html", - "http", - "json", - "xmlrpc", - "nose" - ], include_files = ["main.ui"]) - -import sys -base = 'Win32GUI' if sys.platform=='win32' else None - -executables = [ - Executable('main.py', base=base, targetName = 'audio-visualizer-python') -] - -setup(name='audio-visualizer-python', - version = '1.0', - description = 'a little GUI tool to render visualization videos of audio files', - options = dict(build_exe = buildOptions), - executables = executables) +from setuptools import setup, find_packages +from importlib import import_module +from os import path +import re + + +def getTextFromFile(filename, fallback): + try: + with open( + path.join(path.abspath(path.dirname(__file__)), filename), encoding="utf-8" + ) as f: + output = f.read() + except Exception: + output = fallback + return output + + +PACKAGE_NAME = 'avp' +SOURCE_DIRECTORY = 'src' +SOURCE_PACKAGE_REGEX = re.compile(rf'^{SOURCE_DIRECTORY}') +PACKAGE_DESCRIPTION = 'Create audio visualization videos from a GUI or commandline' + + +avp = import_module(SOURCE_DIRECTORY) +source_packages = find_packages(include=[SOURCE_DIRECTORY, f'{SOURCE_DIRECTORY}.*']) +proj_packages = [SOURCE_PACKAGE_REGEX.sub(PACKAGE_NAME, name) for name in source_packages] + + +setup( + name='audio_visualizer_python', + version=avp.__version__, + url='https://github.com/djfun/audio-visualizer-python', + license='MIT', + description=PACKAGE_DESCRIPTION, + author=getTextFromFile('AUTHORS', 'djfun, tassaron'), + long_description=getTextFromFile('README.md', PACKAGE_DESCRIPTION), + classifiers=[ + 'Development Status :: 4 - Beta', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3 :: Only', + 'Intended Audience :: End Users/Desktop', + 'Topic :: Multimedia :: Video :: Non-Linear Editor', + ], + keywords=[ + 'visualizer', 'visualization', 'commandline video', + 'video editor', 'ffmpeg', 'podcast' + ], + packages=proj_packages, + package_dir={PACKAGE_NAME: SOURCE_DIRECTORY}, + include_package_data=True, + install_requires=[ + 'Pillow', + 'PyQt5', + 'numpy', + 'pytest' + ], + entry_points={ + 'gui_scripts': [ + f'avp = {PACKAGE_NAME}.main:main' + ], + } +) |
