From db0c4df4d551634eb35b28880fb2afaa837594a0 Mon Sep 17 00:00:00 2001 From: Kosat <153023+Kosat@users.noreply.github.com> Date: Fri, 29 Mar 2019 21:52:54 +0100 Subject: [PATCH] Added PyPi packaging --- MANIFEST.in | 1 + README.md | 4 ++++ setup.py | 26 +++++++++++++++++++------- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index c39d216..1af7d74 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ exclude .gitignore exclude .coverage exclude .travis.yml +exclude .vscode include README.md exclude setup.cfg prune .cache diff --git a/README.md b/README.md index 42db180..35850fa 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ This is a simple console tool for dumping message history from a Telegram chat into a __jsonl__, __csv__ or plain __text__ file. ## Installation +**From PyPI:** +``` +pip install telegram-messages-dump +``` **From sources:** Fetch the latest sources with git: ``` diff --git a/setup.py b/setup.py index c9e47c7..f379a6f 100644 --- a/setup.py +++ b/setup.py @@ -1,25 +1,37 @@ -# pylint: disable=missing-docstring + +"""Setup script for telegram-messages-dump""" + +import os.path from setuptools import setup from telegram_messages_dump import __version__ +# The directory containing this file +HERE = os.path.abspath(os.path.dirname(__file__)) + +# The text of the README file +with open(os.path.join(HERE, "README.md")) as fid: + README = fid.read() + setup( name='telegram-messages-dump', version=__version__, - description='Telegram Messages Dump console util.', - author='Kostya K', + description='Telegram Messages Dump console utility.', + long_description_content_type="text/markdown", + long_description=README, + author='Kostya Kravets', author_email='kostikkv@gmail.com', url='https://github.com/Kosat/telegram-messages-dump', download_url='https://github.com/Kosat/telegram-messages-dump/releases', install_requires=['telethon==1.6.2'], + license="MIT", packages=['telegram_messages_dump', "telegram_messages_dump.exporters"], + include_package_data=True, classifiers=[ 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', - 'License :: MIT', - 'Operating System :: MacOS', - 'Operating System :: Unix', - 'Operating System :: Windows', + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", 'Programming Language :: Python :: 3' ], entry_points={