From 2ffa0e1b673bbcb7060eb85e72816fe6e697c9da Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Tue, 16 Oct 2018 21:34:45 +0200 Subject: [PATCH] pydoorlock: install pydoorlock via pip Signed-off-by: Ralf Ramsauer --- .gitignore | 2 ++ Makefile | 4 +++- setup.py | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 3993394..1ec7748 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ arch/doorlockd arch/*.xz arch/BKCA.crt gpio-wait + +pydoorlock/__pycache__/ diff --git a/Makefile b/Makefile index 60b6d30..add5629 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,9 @@ install: install doorlockd gpio-wait doorstate $(DESTDIR)/$(PREFIX)/bin/ install doorlockd-passwd $(DESTDIR)/$(PREFIX)/bin/ - install -m 0644 doorlockd.cfg $(DESTDIR)/$(SYSCONFDIR) + install -m 0644 doorlockd.default.cfg doorlockd.cfg $(DESTDIR)/$(SYSCONFDIR) install -m 0644 doorlockd.service doorstate.service $(DESTDIR)/$(SYSCONFDIR)/systemd/system + pip install --upgrade --force-reinstall --root=$(DESTDIR) . + cp -av share/* $(DESTDIR)/$(PREFIX)/share diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..381d7fd --- /dev/null +++ b/setup.py @@ -0,0 +1,22 @@ +# +# pydoorlock, the python library for doorlock +# +# Author: +# Ralf Ramsauer +# +# Copyright (c) Binary Kitchen, 2018 +# +# This work is licensed under the terms of the GNU GPL, version 2. See +# the COPYING file in the top-level directory. +# + +from setuptools import setup, find_packages + +with open("VERSION") as version_file: + version = version_file.read().lstrip("v") + +setup(name="pydoorlock", version=version, + description="A Python interface for doorlock", + license="GPLv2", url="https://github.com/Binary-Kitchen/doorlockd/", + author_email="ralf@binary-kitchen.de", + packages=find_packages())