Permalink
Browse files

Added setup.py w/ entry_point, updated README.rst, edits to reflect n…

…ame change.
  • Loading branch information...
1 parent a8a898f commit c7f0f504c546a7c8923583eb478fd110cd439658 @bkjones committed Feb 20, 2012
Showing with 52 additions and 7 deletions.
  1. +12 −2 README.rst
  2. +7 −5 bunny.py → bunnyq.py
  3. +33 −0 setup.py
View
@@ -1,9 +1,9 @@
=================
-What is Bunny?
+What is Bunnyq?
=================
-Bunny aims to be a RabbitMQ administration and testing/development swiss
+Bunnyq aims to be a RabbitMQ administration and testing/development swiss
army knife. It allows you to do a large (and growing) number of tasks that are
supported by RabbitMQ's RESTful HTTP Management API. To get a list of current
tasks that are supported, run '?' from within the shell. Here's the output
@@ -41,5 +41,15 @@ Requirements
- pyrabbit (I wrote this too: http://pypi.python.org/pypi/pyrabbit)
- PyYaml (http://pypi.python.org/pypi/PyYAML)
+Installation
+------------------
+::
+
+ $ sudo pip install bunnyq
+
+Installation puts a command called 'bunnyq' in your path, so running
+'bunnyq' at a command line should get you where you want to go. For help
+run 'bunnyq --help', and for help with commands within the bunnyq shell, type
+'?' in the bunnyq shell.
View
@@ -32,7 +32,7 @@ def wrapper(inst, args):
class Bunny(cmd.Cmd):
"""Represents a session between a client and a RabbitMQ server, so you can
- pass commands using syntax like "bunny.connect(), bunny.delete_queue" etc.
+ pass commands using syntax like "bunnyq.connect(), bunnyq.delete_queue" etc.
"""
@@ -310,7 +310,7 @@ def do_exit(self):
return True
def do_options():
- parser = argparse.ArgumentParser(prog='bunny',
+ parser = argparse.ArgumentParser(prog='bunnyq',
description="A CLI for interacting w/ the " \
"RabbitMQ Management API.")
parser.add_argument('-c', '--config', type=str, default=None,
@@ -335,14 +335,13 @@ def do_options():
args = parser.parse_args()
return args
-
-if __name__ == '__main__':
+def main():
args = do_options()
if args.config:
# if there's a config arg, there should also be a host arg.
if not args.rabbithost:
- raise Exception("Specify a '-r' option so bunny knows where in "
+ raise Exception("Specify a '-r' option so bunnyq knows where in "
"the config to look for connection parameters.")
with open(args.config, 'r') as conf:
config = yaml.load(conf)
@@ -365,3 +364,6 @@ def do_options():
shell.onecmd(args.execute)
else:
shell.cmdloop()
+
+if __name__ == '__main__':
+ main()
View
@@ -0,0 +1,33 @@
+from setuptools import setup, find_packages
+
+version = '1.0'
+
+setup(name='bunnyq',
+ version=version,
+ description="A command shell for testing/administering RabbitMQ " \
+ "using its RESTful HTTP Management API.",
+ classifiers=[
+ "Intended Audience :: Developers",
+ "Intended Audience :: System Administrators",
+ "License :: OSI Approved :: MIT License",
+ "Natural Language :: English",
+ "Operating System :: POSIX",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 2.6",
+ "Programming Language :: Python :: 2.7",
+ "Topic :: Internet :: WWW/HTTP",
+ ],
+ keywords='python http amqp rabbit rabbitmq management',
+ install_requires = ['pyyaml', 'pyrabbit', 'argparse'],
+ author='Brian K. Jones',
+ author_email='bkjones@gmail.com',
+ url='http://www.github.com/bkjones/bunnyq',
+ download_url='http://www.github.com/bkjones/bunnyq',
+ license='MIT',
+ packages=find_packages(exclude='tests'),
+ include_package_data=False,
+ py_modules=['bunnyq'],
+ entry_points=dict(console_scripts=['bunnyq=bunnyq:main']),
+ zip_safe=False
+ )

0 comments on commit c7f0f50

Please sign in to comment.