mirror of
https://github.com/Xevion/phototag.git
synced 2025-12-09 16:07:58 -06:00
setup.py update for click cli proper
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
import os
|
||||
import logging
|
||||
import click
|
||||
from package import app
|
||||
|
||||
log = logging.getLogger('main')
|
||||
@@ -8,6 +9,12 @@ log = logging.getLogger('main')
|
||||
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = os.path.join(
|
||||
sys.path[0], 'package', 'key', 'photo_tagging_service.json')
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@click.command()
|
||||
def cli():
|
||||
log.info('Executing package...')
|
||||
sys.exit(app.run())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
7
setup.py
7
setup.py
@@ -3,7 +3,7 @@ import os
|
||||
import io
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
DEPENDENCIES = []
|
||||
DEPENDENCIES = ['Click']
|
||||
EXCLUDE_FROM_PACKAGES = []
|
||||
CURDIR = sys.path[0]
|
||||
|
||||
@@ -23,7 +23,10 @@ setup(
|
||||
include_package_data=True,
|
||||
keywords=[],
|
||||
scripts=[],
|
||||
entry_points={"console_scripts": ["phototag=phototag.main:main"]},
|
||||
entry_points='''
|
||||
[console_scripts]
|
||||
phototag=phototag.phototag:cli
|
||||
''',
|
||||
zip_safe=False,
|
||||
install_requires=DEPENDENCIES,
|
||||
python_requires=">=3.6",
|
||||
|
||||
Reference in New Issue
Block a user