| from setuptools import setup |
| import grpc_tools.protoc |
| import pkg_resources |
| from pathlib import Path |
| |
| setupdir = Path(__file__).parent |
| |
| proto_include = pkg_resources.resource_filename('grpc_tools', '_proto') |
| |
| compiled_proto = Path('at/tracker_pb2.py') |
| if compiled_proto.exists(): |
| compiled_proto.unlink() |
| |
| grpc_tools.protoc.main([ |
| 'grpc_tools.protoc', |
| f'-I{setupdir!s}', |
| '--python_out=./', |
| '--grpc_python_out=./', |
| 'at/tracker.proto' |
| ]) |
| |
| assert compiled_proto.exists() |
| |
| setup( |
| name='hswaw-at', |
| version='0.1', |
| description='warsaw hackerspace checkinator', |
| |
| packages=['at'], |
| package_data={"at": ["templates/*"]}, |
| python_requires='>=3.6,', |
| install_requires=['Flask', 'requests', 'flask-spaceauth', 'pyyaml', 'grpcio', 'protobuf'], |
| entry_points={ |
| 'console_scripts': [ |
| 'checkinator-list=at.cmd:list', |
| 'checkinator-tracker=at.tracker:server', |
| 'checkinator-tracker-list=at.cmd:tracker_list', |
| 'checkinator-tracker-get-hwaddr=at.cmd:tracker_get_hwaddr', |
| 'checkinator-web-debug=at.webapp:run_debug' |
| ], |
| }, |
| ) |