Add setup.py
This commit is contained in:
parent
f75eee6b8a
commit
3bff5b38a7
@ -4,4 +4,5 @@ buildPythonPackage rec {
|
|||||||
name = "mqtt-dash";
|
name = "mqtt-dash";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
propagatedBuildInputs = [ flask ];
|
propagatedBuildInputs = [ flask ];
|
||||||
|
doCheck = false;
|
||||||
}
|
}
|
||||||
|
9
mqtt-dash
Executable file
9
mqtt-dash
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from mqtt_dash.app import app
|
||||||
|
|
||||||
|
|
||||||
|
app.secret_key = os.urandom(12)
|
||||||
|
app.run(debug=True, host='0.0.0.0', port=4000)
|
1
mqtt_dash/__init__.py
Normal file
1
mqtt_dash/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from .app import app
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
from flask import Flask, flash, redirect, render_template_string
|
from flask import Flask, flash, redirect, render_template_string
|
||||||
from flask import render_template, request, session, abort
|
from flask import render_template, request, session, abort
|
||||||
import os
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
@ -200,8 +199,3 @@ def home():
|
|||||||
row_layout("Some buttons", button_widget("test", "set to 1", 1),
|
row_layout("Some buttons", button_widget("test", "set to 1", 1),
|
||||||
button_widget("test", "set to foo", 'foo'))
|
button_widget("test", "set to foo", 'foo'))
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app.secret_key = os.urandom(12)
|
|
||||||
app.run(debug=True, host='0.0.0.0', port=4000)
|
|
14
setup.py
Normal file
14
setup.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from distutils.core import setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='mqtt-dash',
|
||||||
|
version='0.1',
|
||||||
|
description='MQTT Dashboard',
|
||||||
|
author='0xee',
|
||||||
|
author_email='mqtt-dash@0xee.eu',
|
||||||
|
packages=['mqtt_dash'],
|
||||||
|
scripts=['mqtt-dash'],
|
||||||
|
package_data={'mqtt_dash': ['templates/*.html']},
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user