From c32273d3989b50bb65b76ff0be8e8450719d9d38 Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Sun, 17 Jun 2018 09:36:34 +0200 Subject: Improve project page on PyPI See https://pypi.org/project/python-magic/ --- setup.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index ca702c1..2d56cec 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,15 @@ # -*- coding: utf-8 -*- from setuptools import setup +import io +import os + + +def read(file_name): + """Read a text file and return the content as a string.""" + with io.open(os.path.join(os.path.dirname(__file__), file_name), + encoding='utf-8') as f: + return f.read() setup(name='python-magic', description='File type identification using libmagic', @@ -10,10 +19,8 @@ setup(name='python-magic', url="http://github.com/ahupp/python-magic", version='0.4.15', py_modules=['magic'], - long_description="""This module uses ctypes to access the libmagic file type -identification library. It makes use of the local magic database and -supports both textual and MIME-type output. -""", + long_description=read('README.md'), + long_description_content_type='text/markdown', keywords="mime magic file", license="MIT", test_suite='test', -- cgit v1.2.1