From c51a59483e527a5955e89a6d546e837e12a3070c Mon Sep 17 00:00:00 2001 From: Zen Date: Thu, 23 Apr 2020 12:52:46 +0300 Subject: [PATCH] pip package --- av1an.py | 22 ++++++++++++---------- setup.py | 3 ++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/av1an.py b/av1an.py index e88cc7a..b520f7b 100755 --- a/av1an.py +++ b/av1an.py @@ -946,15 +946,17 @@ class Av1an: print('No valid work mode') exit() +def main(): + # Windows fix for multiprocessing + multiprocessing.freeze_support() + + # Main thread + try: + Av1an().main_thread() + except KeyboardInterrupt: + print('Encoding stopped') + sys.exit() + if __name__ == '__main__': - - # Windows fix for multiprocessing - multiprocessing.freeze_support() - - # Main thread - try: - Av1an().main() - except KeyboardInterrupt: - print('Encoding stopped') - sys.exit() + main() diff --git a/setup.py b/setup.py index 6f88ffe..547b7a2 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,8 @@ setuptools.setup( url="https://github.com/master-of-zen/Av1an", packages=setuptools.find_packages('.', exclude='tests'), install_requires=REQUIRES, - entry_points={"console_scripts": ["Av1an=av1an:main"]} + py_modules=['av1an'], + entry_points={"console_scripts": ["av1an=av1an:main"]}, classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License",