From fe6ce229083ba1b1257d5de697b2afc2fcd543b5 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 12 Oct 2022 19:11:17 +0200 Subject: [PATCH] Add setup.py, to be installable via pip This is a simpler way to install Limnoria plugin: https://docs.limnoria.net/develop/plugin_distribution.html#via-pip-pypi This will allow installing ChanTracker with this command: pip3 install git+https://github.com/ncoevoet/ChanTracker.git --- README.md | 6 ++++++ setup.py | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 setup.py diff --git a/README.md b/README.md index 5389fb6..1f3fdf1 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,14 @@ This supybot plugin keeps records of channel mode changes in a sqlite database a The plugin is used in various and large channels on Libera.Chat and others networks This version works with python 3 +## Install + Note that you may need a newer version of Limnoria than your distribution provides, and you may need to install from the Limnoria source code or from PyPI / `pip` to make it function. (Currently requires Limnoria version `2018.04.14` or newer) +You can install this plugin with: `pip3 install git+https://github.com/ncoevoet/ChanTracker.git`. +(Or, with Limnoria versions older than 2020.05.08: `git clone https://github.com/ncoevoet/ChanTracker.git` in your bot's `plugins/` directory.) +Then, `@load ChanTracker`. + ## Commands ## !b,e,i,q [] [,] [y] [w] [d] [h] [m] [s] [<-1> or empty means forever] ) -- +mode targets for duration is mandatory diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..8d01d61 --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +import os +import sys + +from supybot.setup import plugin_setup + +# Workaround pip changing the name of the root directory +(parent, dir_) = os.path.split(os.path.dirname(__file__)) +sys.path.insert(0, parent) +sys.modules["ChanTracker"] = __import__(dir_) + +plugin_setup( + 'ChanTracker', +)