From e2d7115d4ec4ee451c7f8e86a4f7277a940d9036 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 15 Dec 2016 06:17:09 +0000 Subject: [PATCH] Package the daemon executable as an entrypoint Move the daemon executable into the Python package and define an entrypoint for it in setup.cfg so a similar `mudpy` executable will still be installed. Drop the unnecessary import path override now while at it. --- bin/mudpy => mudpy/daemon.py | 5 ----- setup.cfg | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) rename bin/mudpy => mudpy/daemon.py (88%) diff --git a/bin/mudpy b/mudpy/daemon.py similarity index 88% rename from bin/mudpy rename to mudpy/daemon.py index d7ec045..2413204 100755 --- a/bin/mudpy +++ b/mudpy/daemon.py @@ -1,15 +1,10 @@ -#!/usr/bin/env python3 -"""Skeletal executable for the mudpy engine.""" - # Copyright (c) 2004-2016 Jeremy Stanley . Permission # to use, copy, modify, and distribute this software is granted under # terms provided in the LICENSE file distributed with this software. # core objects for the mudpy engine import imp -import os import sys -sys.path.append(os.path.realpath(".")) import mudpy diff --git a/setup.cfg b/setup.cfg index c1e4624..35cd6bc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,3 +28,7 @@ classifier = [files] packages = mudpy + +[entry_points] +console_scripts = + mudpy = mudpy.daemon:main -- 2.11.0