From c5aff5fd3bb9f4d3d28cd63d188f005ab67d70fa Mon Sep 17 00:00:00 2001 From: "emdee@spm.plastiras.org" Date: Tue, 26 Dec 2023 06:17:14 +0000 Subject: [PATCH] setup.py --- setup.py | 31 +++++++++++++++++++++++++++++++ tox_profile.py | 11 ++++++----- 2 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1babccd --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +import sys +import os +from setuptools import setup +from setuptools.command.install import install + +version = '1.0.0' + +setup(name='tox_profile', + version=version, + description='Tox ctypes wrapping testing of Tox profiles', + long_description='Tox ctypes wrapping of Tox profiles', + url='https://git.plastiras.org/emdee/tox_profile/', + keywords='ctypes Tox messenger', + author='emdee', + maintainer='', + license='', + packages=[], + entry_points = {'console_scripts': [ 'tox_profile = tox_profile:iMain', ],}, + install_requires=[], + include_package_data=False, + classifiers=[ + "Environment :: Console", + "Topic :: Internet", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "License :: OSI Approved", + ], + zip_safe=False + ) diff --git a/tox_profile.py b/tox_profile.py index e45fea2..56a924c 100644 --- a/tox_profile.py +++ b/tox_profile.py @@ -1131,7 +1131,7 @@ def iTestTorTest(sProOrNodes, oArgs, bClean=False): def iTestOnionNodes(): return 0 -def iMain(sProOrNodes, oArgs): +def iMainFun(sProOrNodes, oArgs): global bOUT, aOUT, sENC global bSAVE @@ -1450,8 +1450,8 @@ def oMainArgparser(_=None): return parser -if __name__ == '__main__': - lArgv = sys.argv[1:] +def iMain(lArgv=None): + if lArgv is None: lArgv = sys.argv[1:] parser = oMainArgparser() oArgs = parser.parse_args(lArgv) if oArgs.command in ['edit'] and oArgs.edit == 'help': @@ -1465,6 +1465,7 @@ if __name__ == '__main__': vSetupLogging(oArgs.log_level) i = 0 for sProOrNodes in oArgs.lprofile: - i = iMain(sProOrNodes, oArgs) + i = iMainFun(sProOrNodes, oArgs) - sys.exit(i) +if __name__ == '__main__': + sys.exit(iMain(sys.argv[1:]))