forked from hswaw/hscloud
vuko
3cd087d939
repository: https://code.hackerspace.pl/checkinator revision: 713c7e6c1a8fd6147522c1a5e3067898a1d8bf7a Change-Id: I1bd2975a46ec0d9a89d6594fb4b9d49832001627 Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1219 Reviewed-by: q3k <q3k@hackerspace.pl>
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
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'
|
|
],
|
|
},
|
|
)
|