Skip to content

Commit

Permalink
Merge pull request #1 from mwarkentin/pip-distribution
Browse files Browse the repository at this point in the history
Set project up for pip distribution -- yeah i want to do that soon
  • Loading branch information
kurttheviking committed Sep 7, 2012
2 parents b1dcede + 48fedb8 commit 0a026bc
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ var
sdist
develop-eggs
.installed.cfg
MANIFEST

# Installer logs
pip-log.txt
Expand Down
22 changes: 22 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License

Copyright (c) 2012 K R Ericson
Inspired & derived from Daniel R. Craig's pingdom wrapper

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.rst
include *.txt
10 changes: 7 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ None beyond the Python standard library.
Usage
-----

Install::

pip install python-simple-hipchat

Instantiate::

import hipchat.py
import hipchat
hipster = hipchat.HipChat(token=YourHipChatToken)

Request a URI endpoint as described in the HipChat API docs::
Expand All @@ -27,10 +31,10 @@ Example methods::

# List rooms
hipster.method('rooms/list')

# Post a message to a HipChat room
hipster.method('rooms/message', method='POST', parameters={'room_id': 8675309, 'from': 'HAL', 'message': 'All your base...'})

Two handy shortcut methods::

# List rooms, print response JSON
Expand Down
23 changes: 0 additions & 23 deletions hipchat.py → hipchat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
# The MIT License
#
# Copyright (c) 2012 K R Ericson
# Inspired & derived from Daniel R. Craig's pingdom wrapper
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from urlparse import urljoin
from urllib import urlencode
import urllib2
Expand Down
11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from distutils.core import setup

setup(
name='python-simple-hipchat',
url='https://github.com/kurttheviking/python-simple-hipchat',
version='0.1',
packages=['hipchat'],
author='Kurt Ericson',
license='MIT',
long_description=open('README.rst').read()
)

0 comments on commit 0a026bc

Please sign in to comment.