From 4af28e10afeb1167bd252ab9ad0d28e5383ed78e Mon Sep 17 00:00:00 2001 From: vuko Date: Tue, 24 Nov 2020 13:41:48 +0100 Subject: [PATCH] move files to package --- default.nix | 15 ++++++++++++++ app.py => lights_web/__init__.py | 0 {static => lights_web/static}/favicon.png | Bin {static => lights_web/static}/index.html | 0 setup.py | 24 ++++++++++++++++++++++ 5 files changed, 39 insertions(+) create mode 100644 default.nix rename app.py => lights_web/__init__.py (100%) rename {static => lights_web/static}/favicon.png (100%) rename {static => lights_web/static}/index.html (100%) create mode 100644 setup.py diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..ea1a0e0 --- /dev/null +++ b/default.nix @@ -0,0 +1,15 @@ +{ pkgs ? import {} }: + +pkgs.python3Packages.buildPythonPackage { + pname = "lights-web"; + version = "0.4.0"; + + src = ./.; + + propagatedBuildInputs = with pkgs; [ + python3Packages.gunicorn + python3Packages.flask + python3Packages.paho-mqtt + python3Packages.pyyaml + ]; +} diff --git a/app.py b/lights_web/__init__.py similarity index 100% rename from app.py rename to lights_web/__init__.py diff --git a/static/favicon.png b/lights_web/static/favicon.png similarity index 100% rename from static/favicon.png rename to lights_web/static/favicon.png diff --git a/static/index.html b/lights_web/static/index.html similarity index 100% rename from static/index.html rename to lights_web/static/index.html diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..61ff505 --- /dev/null +++ b/setup.py @@ -0,0 +1,24 @@ +from setuptools import setup + +setup( + name='lights-web', + version='0.4.0', + description='Warsaw Hackerspace web interface for lights control', + author='vuko', + author_email='vuko@hackerspace.pl', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'License :: OSI Approved :: zlib/libpng License', + 'Programming Language :: Python :: 3.8', + ], + + packages=['lights_web'], + package_data={"lights_web": ["static/*"]}, + python_requires='>=3.7,', + install_requires=['Flask', 'paho-mqtt', 'pyyaml'], + entry_points={ + 'console_scripts': [ + 'lights-web=lights_web:run_development', + ], + }, +)