Skip to content

Commit b8f85f5

Browse files
committed
Add long_description to setup.py based on README
1 parent 8c71f21 commit b8f85f5

1 file changed

Lines changed: 23 additions & 12 deletions

File tree

setup.py

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
1+
from os import path
12
from setuptools import setup
23

4+
description, description_content_type = get_description()
5+
36
setup(
4-
name = 'messagebird',
5-
packages = ['messagebird'],
6-
version = '1.3.0',
7-
description = "MessageBird's REST API",
8-
author = 'MessageBird',
9-
author_email = 'support@messagebird.com',
10-
url = 'https://github.com/messagebird/python-rest-api',
11-
download_url = 'https://github.com/messagebird/python-rest-api/tarball/1.3.0',
12-
keywords = ['messagebird', 'sms'],
13-
install_requires = ['requests>=2.4.1'],
14-
license = 'BSD-2-Clause',
15-
classifiers = [
7+
name = 'messagebird',
8+
packages = ['messagebird'],
9+
version = '1.3.0',
10+
description = "MessageBird's REST API",
11+
author = 'MessageBird',
12+
author_email = 'support@messagebird.com',
13+
long_description = description,
14+
long_description_content_type = description_content_type
15+
url = 'https://github.com/messagebird/python-rest-api',
16+
download_url = 'https://github.com/messagebird/python-rest-api/tarball/1.3.0',
17+
keywords = ['messagebird', 'sms'],
18+
install_requires = ['requests>=2.4.1'],
19+
license = 'BSD-2-Clause',
20+
classifiers = [
1621
'Programming Language :: Python',
1722
'Programming Language :: Python :: 2',
1823
'Programming Language :: Python :: 3',
1924
],
2025
)
26+
27+
def get_description():
28+
working_directory = path.abspath(path.dirname(__file__))
29+
readme_path = path.join(working_directory, 'README.md')
30+
with open(readme_path, encoding='utf-8') as f:
31+
return (f.read(), 'text/markdown')

0 commit comments

Comments
 (0)