From b90b7dd610826c1b872f24861c40591bec2f2653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Sat, 3 Aug 2019 12:17:04 +0200 Subject: [PATCH] setup.py: Add a description and long description. This adds a short description and puts the contents from the README into the long description. This will be useful for packages that will end up on pypi. --- setup.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setup.py b/setup.py index ba4e824..0be28e6 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ from setuptools import setup +from os import path try: from setuptools_rust import Binding, RustExtension @@ -6,10 +7,21 @@ except ImportError: print("Please install setuptools-rust package") raise SystemExit(1) +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: + long_description = f.read() + + setup( name="tantivy", version="0.10.1", rust_extensions=[RustExtension("tantivy.tantivy", binding=Binding.PyO3)], packages=["tantivy"], + description=("Python bindings for the Tantivy full-text search engine " + "library"), + long_description=long_description, + long_description_content_type="text/markdown", + license="MIT", + zip_safe=False, )