From b8f85f5d213523d828fcd316f6711a8c73f7b4e9 Mon Sep 17 00:00:00 2001 From: Emile Pels Date: Fri, 2 Nov 2018 12:06:07 +0100 Subject: [PATCH 1/3] Add long_description to setup.py based on README --- setup.py | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index bcb1abe..81fc238 100644 --- a/setup.py +++ b/setup.py @@ -1,20 +1,31 @@ +from os import path from setuptools import setup +description, description_content_type = get_description() + setup( - name = 'messagebird', - packages = ['messagebird'], - version = '1.3.0', - description = "MessageBird's REST API", - author = 'MessageBird', - author_email = 'support@messagebird.com', - url = 'https://github.com/messagebird/python-rest-api', - download_url = 'https://github.com/messagebird/python-rest-api/tarball/1.3.0', - keywords = ['messagebird', 'sms'], - install_requires = ['requests>=2.4.1'], - license = 'BSD-2-Clause', - classifiers = [ + name = 'messagebird', + packages = ['messagebird'], + version = '1.3.0', + description = "MessageBird's REST API", + author = 'MessageBird', + author_email = 'support@messagebird.com', + long_description = description, + long_description_content_type = description_content_type + url = 'https://github.com/messagebird/python-rest-api', + download_url = 'https://github.com/messagebird/python-rest-api/tarball/1.3.0', + keywords = ['messagebird', 'sms'], + install_requires = ['requests>=2.4.1'], + license = 'BSD-2-Clause', + classifiers = [ 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', ], ) + +def get_description(): + working_directory = path.abspath(path.dirname(__file__)) + readme_path = path.join(working_directory, 'README.md') + with open(readme_path, encoding='utf-8') as f: + return (f.read(), 'text/markdown') From 4290d968fd5791638bd5e73aa8c421b54fce2f98 Mon Sep 17 00:00:00 2001 From: Emile Pels Date: Fri, 2 Nov 2018 12:07:56 +0100 Subject: [PATCH 2/3] Bump version to 1.3.1 --- messagebird/client.py | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/messagebird/client.py b/messagebird/client.py index 1b9fc48..42d6b04 100644 --- a/messagebird/client.py +++ b/messagebird/client.py @@ -14,7 +14,7 @@ from messagebird.verify import Verify ENDPOINT = 'https://rest.messagebird.com' -CLIENT_VERSION = '1.3.0' +CLIENT_VERSION = '1.3.1' PYTHON_VERSION = '%d.%d.%d' % (sys.version_info[0], sys.version_info[1], sys.version_info[2]) USER_AGENT = 'MessageBird/ApiClient/%s Python/%s' % (CLIENT_VERSION, PYTHON_VERSION) diff --git a/setup.py b/setup.py index 81fc238..dafeffb 100644 --- a/setup.py +++ b/setup.py @@ -6,14 +6,14 @@ setup( name = 'messagebird', packages = ['messagebird'], - version = '1.3.0', + version = '1.3.1', description = "MessageBird's REST API", author = 'MessageBird', author_email = 'support@messagebird.com', long_description = description, long_description_content_type = description_content_type url = 'https://github.com/messagebird/python-rest-api', - download_url = 'https://github.com/messagebird/python-rest-api/tarball/1.3.0', + download_url = 'https://github.com/messagebird/python-rest-api/tarball/1.3.1', keywords = ['messagebird', 'sms'], install_requires = ['requests>=2.4.1'], license = 'BSD-2-Clause', From b192bdecddfc3cb54a0eb843d5de752c27930d16 Mon Sep 17 00:00:00 2001 From: Emile Pels Date: Fri, 2 Nov 2018 12:13:00 +0100 Subject: [PATCH 3/3] Fix syntax error in setup.py --- setup.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index dafeffb..e21ddbb 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,12 @@ from os import path from setuptools import setup +def get_description(): + working_directory = path.abspath(path.dirname(__file__)) + readme_path = path.join(working_directory, 'README.md') + with open(readme_path, encoding='utf-8') as f: + return (f.read(), 'text/markdown') + description, description_content_type = get_description() setup( @@ -11,7 +17,7 @@ author = 'MessageBird', author_email = 'support@messagebird.com', long_description = description, - long_description_content_type = description_content_type + long_description_content_type = description_content_type, url = 'https://github.com/messagebird/python-rest-api', download_url = 'https://github.com/messagebird/python-rest-api/tarball/1.3.1', keywords = ['messagebird', 'sms'], @@ -23,9 +29,3 @@ 'Programming Language :: Python :: 3', ], ) - -def get_description(): - working_directory = path.abspath(path.dirname(__file__)) - readme_path = path.join(working_directory, 'README.md') - with open(readme_path, encoding='utf-8') as f: - return (f.read(), 'text/markdown')