diff --git a/.gitignore b/.gitignore index d18fa18..f73ae16 100755 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ __pycache__ /stage.py *.egg *.egg-info -/dist/ \ No newline at end of file +/dist/*.tar.gz +/build diff --git a/.travis.yml b/.travis.yml index 7a6f33c..fcfde88 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: - "2.7" - - "3.2" + - "3.6" install: "python setup.py install" script: python -m unittest discover -s test/ \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index 0cfccf3..63347d5 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Chris Brand +Copyright (c) 2019 Clickatell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index daad682..6dd0528 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Clickatell Python Library ================================ -This library supports version **2** of Python. +This library supports version **2.7** & **3.6** of Python. ------------------------------------ @@ -16,7 +16,7 @@ You can install this library via PIP as part of your requirements file. pip install clickatell-platform ``` -[Clickatell Python PyPI](https://pypi.python.org/pypi?name=clickatell&version=0.0.1&:action=display) +[Clickatell Python PyPI](https://pypi.python.org/pypi?name=clickatell-platform&version=2.0.1&:action=display) Usage ------------------ diff --git a/clickatell/__init__.py b/clickatell/__init__.py index c9e1dac..3edf733 100755 --- a/clickatell/__init__.py +++ b/clickatell/__init__.py @@ -2,6 +2,7 @@ import urllib import json import re +import sys class Transport: """ @@ -57,7 +58,7 @@ def request(self, action, data={}, headers={}, method='GET'): :return: The request response """ http = httplib2.Http() - body = urllib.urlencode(data) + body = urllib.urlencode(data) if (sys.version_info[0] < 3) else urllib.parse.urlencode(data) url = 'https://' + self.endpoint + '/' + action url = (url + '?' + body) if (method == 'GET') else url resp, content = http.request(url, method, headers=headers, body=json.dumps(data)) diff --git a/dist/clickatell_platform-2.0.1-py2-none-any.whl b/dist/clickatell_platform-2.0.1-py2-none-any.whl new file mode 100644 index 0000000..abb14a9 Binary files /dev/null and b/dist/clickatell_platform-2.0.1-py2-none-any.whl differ diff --git a/dist/clickatell_platform-2.0.1-py3-none-any.whl b/dist/clickatell_platform-2.0.1-py3-none-any.whl new file mode 100644 index 0000000..a6eba33 Binary files /dev/null and b/dist/clickatell_platform-2.0.1-py3-none-any.whl differ diff --git a/setup.py b/setup.py index de17a99..d056336 100755 --- a/setup.py +++ b/setup.py @@ -1,18 +1,27 @@ -from setuptools import setup, find_packages +import setuptools -setup( +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( name="clickatell-platform", - version="2.0.0", - author="Chris Brand, Stephen Leibbrandt", + version="2.0.1", + author="Chris Brand, Stephen Leibbrandt, Renier Minne", author_email="support@clickatell.com", - keywords=["clickatell","sms"], - packages=find_packages(), + keywords=["clickatell","sms","platform"], + packages=setuptools.find_packages(), include_package_data=True, url="https://github.com/clickatell/clickatell-python", - license="LICENSE", description="Library for interacting with the Clickatell Platform SMS Gateway", long_description=open("README.md").read(), + long_description_content_type="text/markdown", + license="LICENSE", install_requires=[ "httplib2", - ] -) + ], + classifiers=[ + "Programming Language :: Python", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], +) \ No newline at end of file