From ce0fb4cce082ada99ec6cdda28ae6b525ba71955 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Fri, 15 Dec 2017 13:28:18 +0100 Subject: [PATCH] adding additional files in release and add pypi description in rst --- MANIFEST.in | 1 + setup.cfg | 6 ++++++ setup.py | 12 ++++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..b2cc4f5 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include README.md LICENSE requirements.txt diff --git a/setup.cfg b/setup.cfg index 642bb2e..c395875 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,11 @@ [metadata] description-file = README.md +license_file = LICENSE [bdist_wheel] python-tag = py3 # only python3 + +[files] +extra_files = + LICENSE + README.md diff --git a/setup.py b/setup.py index 6952ca4..f52bbf1 100644 --- a/setup.py +++ b/setup.py @@ -3,11 +3,15 @@ from codecs import open from os import path import catcli +readme = 'README.md' here = path.abspath(path.dirname(__file__)) -# Get the long description from the README file -with open(path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = f.read() +try: + from pypandoc import convert + read_readme = lambda f: convert(f, 'rst') +except ImportError: + print('\n[WARNING] pypandoc not found, could not convert \"{}\"\n'.format(readme)) + read_readme = lambda f: open(f, 'r').read() VERSION = catcli.__version__ @@ -16,7 +20,7 @@ setup( version=VERSION, description='The command line catalog tool for your offline data', - long_description=long_description, + long_description=read_readme(readme), url='https://github.com/deadc0de6/catcli', download_url = 'https://github.com/deadc0de6/catcli/archive/v'+VERSION+'.tar.gz',