Gitlab Community Edition Instance

Commit 352fcca3 authored by mhellka's avatar mhellka
Browse files

Added console_scripts entry point to setup.py

parent 312eded6
......@@ -28,6 +28,9 @@ setup(
long_description_content_type='text/markdown',
packages=find_packages(where='src'),
package_dir={'': 'src'},
entry_points = {
'console_scripts': ['pycdstar3=pycdstar3.__main__:main'],
},
include_package_data=True,
zip_safe=False,
platforms='any',
......
import sys
import pycdstar3.cli
def main():
return pycdstar3.cli.main(*sys.argv[1:])
if __name__ == '__main__':
from pycdstar3.cli import main
import sys
sys.exit(main() or 0)
......@@ -33,7 +33,7 @@ subparsers = parser.add_subparsers(title="available commands",
printer = Printer(level=0, file=sys.stderr)
def main(args=None):
def main(*args):
# Load and register all built-in commands
for name in BUILDIN_COMMANDS:
importlib.import_module(".commands." + name, __name__).register(subparsers)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment