From 82dbd452eac52d7ec754eb377a4c73ca519d3472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 2 Aug 2019 17:21:13 +0200 Subject: [PATCH 1/4] Cargo.toml: Switch to a cdylib. pyo3-pack requires the library to be a cdylib. This patch allows us to use pyo3-pack to build and publish tantivy-py using pyo3-pack. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e108ee4..0ff22e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT" [lib] name = "tantivy" -crate-type = ["dylib"] +crate-type = ["cdylib"] [dependencies] chrono = "0.4" From 2745c03384f0a4789f172b4b64a3948f7fee0699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 2 Aug 2019 17:53:48 +0200 Subject: [PATCH 2/4] Cargo.toml: Use the same version as the core tantivy lib. This closes #6. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0ff22e9..f61f2f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tantivy-py" -version = "0.1.0" +version = "0.10.1" authors = ["Damir Jelić "] edition = "2018" license = "MIT" From 7afe8905c062f4a4874364bee0edd3805b5baa25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Sat, 3 Aug 2019 11:52:23 +0200 Subject: [PATCH 3/4] setup.py: Bump the version to be the same as tantivy. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 91ddbe2..ba4e824 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ except ImportError: setup( name="tantivy", - version="0.9.1", + version="0.10.1", rust_extensions=[RustExtension("tantivy.tantivy", binding=Binding.PyO3)], packages=["tantivy"], zip_safe=False, 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 4/4] 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, )