From bb9811987721c5443ec1b8f23a3bc47ac1604823 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sat, 24 Oct 2015 10:36:17 +0200 Subject: [PATCH] Add setup.py --- README.rst | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 10 ++++++++ setup.py | 23 +++++++++++++++++ sid/__init__.py | 8 ++++++ 4 files changed, 108 insertions(+) create mode 100644 README.rst create mode 100644 requirements.txt create mode 100755 setup.py diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..15cc8f6 --- /dev/null +++ b/README.rst @@ -0,0 +1,67 @@ +=============== +sid an xmpp bot +=============== + +Getting sid +------------ + +Currently unreleased, only a development version is available. + + http://git.kaliko.me/?p=sid.git + +Getting the latest source code +------------------------------ + +If you would instead like to use the latest source code, you can grab a copy +of the development version from git by running the command: + + git clone git://git.kaliko.me/sid.git + + +Installing from source +---------------------- + +To install sid from source, simply run the command (within a virtualenv preferably):: + + python3 setup.py install + +You can use the `--help` switch to `setup.py` for a complete list of commands +and their options. See the `Installing Python Modules`_ document for more details. + + +Using the bot +------------- + +Here is a plain example:: + + #!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import getpass + from sid.sid import MUCBot + from sid.ping import Ping + + JID = 'bot@example.org' + NICK = 'sid' + PASS = getpass.getpass('Password for "{}": '.format(JID)) + ROOM = 'room@conf.example.org' + + xmpp = MUCBot(JID, PASS, ROOM, NICK) + xmpp.register_bot_plugin(Ping) + # Connect to the XMPP server and start processing XMPP stanzas. + if xmpp.connect(): + xmpp.process(block=True) + xmpp.shutdown_plugins() + xmpp.log.info('Done') + else: + xmpp.log.info('Unable to connect.') + + +Contacting authors +------------------ + +The current maintainer can be found on xmpp chat room +or you can contact him by email/xmpp . + + .. _Installing Python Modules: http://docs.python.org/3/install/ + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..911b7e5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +PySimpleSOAP==1.16 +aiodns==1.0.0 +feedparser==5.2.1 +pyasn1==0.1.9 +pyasn1-modules==0.0.8 +pycares==1.0.0 +python-debianbts==2.6.0 +sleekxmpp==1.3.1 +slixmpp==1.1 +soap2py==1.16 diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..a1c881f --- /dev/null +++ b/setup.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +from sid import __version__, __url__, __author__, __email__ + +setup( + name='sid', + author = __author__, + author_email = __email__, + version=__version__, + download_url=__url__, + packages=find_packages(), + install_requires=['sleekxmpp>=1.3.0'], + description="An xmpp bot based on sleekxmpp", + license='GPL-3', + keywords = "xmpp bot", + +) + +# VIM MODLINE +# vim: ai ts=4 sw=4 sts=4 expandtab diff --git a/sid/__init__.py b/sid/__init__.py index e69de29..144c7bf 100644 --- a/sid/__init__.py +++ b/sid/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +"""Module info +""" + +__author__ = 'Kaliko' +__email__ = 'kaliko@azylum.org' +__version__ = '0.1' +__url__ = 'http://git.kaliko.me/?p=sid.git' -- 2.39.2