README: Explain the new development setup.

master
Damir Jelić 2020-01-05 17:39:20 +01:00
parent 32b6b67af4
commit 2db8116a8d
1 changed files with 30 additions and 5 deletions

View File

@ -9,14 +9,39 @@ Python bindings for tantivy.
# Installation # Installation
The bindings can be installed using setuptools: The bindings can be installed using from pypi using pip:
python3 setup.py install --user pip install tantivy-py
Note that this requires setuptools-rust to be installed. Another thing to note If no binary wheel is present for your operating system the bindings will be
is that the bindings are using [PyO3](https://github.com/PyO3/pyo3), which build from source, this means that Rust needs to be installed before building
can succeed.
Note that the bindings are using [PyO3](https://github.com/PyO3/pyo3), which
requires rust nightly and only supports python3. requires rust nightly and only supports python3.
# Development
Developing tantivy-py can be done in a virtual environment using `pipenv` or
using local packages using the provided `Makefile`.
For the `pipenv` setup install the virtual environment and build the bindings using:
pipenv install --dev
pipenv run maturin develop
After the bindings are build, the tests can be run using:
pipenv run python -m pytest
For the `Makefile` based setup run:
make
Running the tests is done using:
make test
# Usage # Usage
tantivy-py has a similar API to tantivy. To create a index first a schema tantivy-py has a similar API to tantivy. To create a index first a schema