diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 31 |
1 files changed, 20 insertions, 11 deletions
@@ -1,6 +1,11 @@ #!/usr/bin/env python3 -# coding: utf-8 -import os.path + +# Allow execution from anywhere +import os +import sys + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + import warnings import sys @@ -42,14 +47,15 @@ if sys.argv[1:2] == ['py2exe']: 'product_version': __version__, }], 'options': { - 'py2exe': { - 'bundle_files': 0, - 'compressed': 1, - 'optimize': 2, - 'dist_dir': './dist', - 'excludes': ['Crypto', 'Cryptodome'], # py2exe cannot import Crypto - 'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'], - } + 'bundle_files': 0, + 'compressed': 1, + 'optimize': 2, + 'dist_dir': './dist', + 'excludes': ['Crypto', 'Cryptodome'], # py2exe cannot import Crypto + 'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'], + # Modules that are only imported dynamically must be added here + 'includes': ['hypervideo_dl.compat._legacy', 'hypervideo_dl.compat._deprecated', + 'hypervideo_dl.utils._legacy', 'hypervideo_dl.utils._deprecated'], }, 'zipfile': None } @@ -78,7 +84,10 @@ else: } if setuptools_available: - params['entry_points'] = {'console_scripts': ['hypervideo = hypervideo_dl:main']} + params['entry_points'] = { + 'console_scripts': ['hypervideo = hypervideo_dl:main'], + 'pyinstaller40': ['hook-dirs = hypervideo_dl.__pyinstaller:get_hook_dirs'], + } else: params['scripts'] = ['hypervideo'] |