check in checkinator into hswaw/checkinator

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>
diff --git a/hswaw/checkinator/setup.py b/hswaw/checkinator/setup.py
new file mode 100644
index 0000000..be35cc5
--- /dev/null
+++ b/hswaw/checkinator/setup.py
@@ -0,0 +1,42 @@
+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'
+        ],
+    },
+)