From 5c4dfbdd4a3b45cdebf128d0b1ef90d6ec315d07 Mon Sep 17 00:00:00 2001 From: Dan Langille Date: Wed, 29 Nov 2017 21:00:24 +0000 Subject: [PATCH] Simple command line runner on top of devel/py-daemon --- devel/Makefile | 1 + devel/py-daemon-runner/Makefile | 18 ++++++++++++++++++ devel/py-daemon-runner/distinfo | 3 +++ devel/py-daemon-runner/pkg-descr | 23 +++++++++++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 devel/py-daemon-runner/Makefile create mode 100644 devel/py-daemon-runner/distinfo create mode 100644 devel/py-daemon-runner/pkg-descr diff --git a/devel/Makefile b/devel/Makefile index 2b5b6153f04f..ef027b9caf26 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4350,6 +4350,7 @@ SUBDIR += py-cycler SUBDIR += py-d2to1 SUBDIR += py-daemon + SUBDIR += py-daemon-runner SUBDIR += py-daemonize SUBDIR += py-daemons SUBDIR += py-dal diff --git a/devel/py-daemon-runner/Makefile b/devel/py-daemon-runner/Makefile new file mode 100644 index 000000000000..4039b3493c4c --- /dev/null +++ b/devel/py-daemon-runner/Makefile @@ -0,0 +1,18 @@ +# Created by: Dan Langille +# $FreeBSD$ + +PORTNAME= daemon-runner +PORTVERSION= 0.0.15 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= dvl@FreeBSD.org +COMMENT= Simple command line runner on top of python-daemon + +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}daemon>0:devel/py-daemon + +USES= python +USE_PYTHON= distutils autoplist + +.include diff --git a/devel/py-daemon-runner/distinfo b/devel/py-daemon-runner/distinfo new file mode 100644 index 000000000000..e99a033ccf11 --- /dev/null +++ b/devel/py-daemon-runner/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1511988782 +SHA256 (daemon-runner-0.0.15.tar.gz) = 6b74e6da04598fc8f13c26452f3d5827625c6befe8110e4c07e30307b143857a +SIZE (daemon-runner-0.0.15.tar.gz) = 3044 diff --git a/devel/py-daemon-runner/pkg-descr b/devel/py-daemon-runner/pkg-descr new file mode 100644 index 000000000000..959e795aa817 --- /dev/null +++ b/devel/py-daemon-runner/pkg-descr @@ -0,0 +1,23 @@ +Simple command line runner on top of python-daemon, a library which implements +the well-behaved daemon specification of PEP 3143, ???Standard daemon process +library. + +A well-behaved Unix daemon process is tricky to get right, but the required +steps are much the same for every daemon program. A DaemonContext instance +holds the behaviour and configured process environment for the program; use +the instance as a context manager to enter a daemon state. + +Simple example of usage: + +import daemon + +from spam import do_main_program + +with daemon.DaemonContext(): + do_main_program() + +Customisation of the steps to become a daemon is available by setting options +on the DaemonContext instance; see the documentation for that class for each +option. + +WWW: https://pypi.python.org/pypi/daemon-runner