Metadata-Version: 2.4
Name: louis
Version: 3.36.0
Summary: Python bindings for liblouis
Author-email: Eitan Isaacson <eitan@ascender.com>, James Teh <jamie@jantrid.net>, Leonard de Ruijter <alderuijter@gmail.com>, Daniel Garcia Moreno <daniel.garcia@suse.com>, Rob Beezer <beezer@ups.edu>, André-Abush Clause <dev@andreabc.net>, Christian Egli <christian.egli@sbs.ch>, Bert Frees <bertfrees@gmail.com>, Dave Mielke <dave@mielke.cc>, matt venn <matt@mattvenn.net>, Davy Kager <davykager@dedicon.nl>, Davy Kager <mail@davykager.nl>, Bue Vester-Andersen <bue@vester-andersen.dk>, Michael Whapples <mwhapples@gmail.com>
License: LGPLv2.1+
Project-URL: Homepage, https://liblouis.io
Project-URL: Repository, https://github.com/liblouis/liblouis
Project-URL: Documentation, https://liblouis.io/documentation/liblouis/Python-bindings.html
Project-URL: Issues, https://github.com/liblouis/liblouis/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
Classifier: Programming Language :: Python
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Liblouis Python ctypes bindings

These bindings allow you to use liblouis from within Python. The
package is called "louis". See the documentation included in the
module for usage instructions.

These bindings use `ctypes` to access the liblouis shared library. The
liblouis shared library needs to be located in the library search
path. In most cases, if liblouis has been installed in a standard
location on your system, this is already the case and the bindings
will work without any additional steps.

A standard `pyproject.toml` script is provided for installation
tasks. To install this package for system wide use, after installing
`liblouis` itself, switch to the `python` directory and run (as root):

``` python
sudo pip install .
```

Some tests are located in `tests`. Note that these require that
you have compiled `liblouis` with support for 32-bit Unicode
characters.  See the top-level README for instructions on this option.

Remain in the `python` directory and run the tests with the
following command.  If successful, output will be brief, and note
that some tests are designed to have "expected failures".

``` console
sudo python3 tests/test_louis.py
```

## Python Virtual Environment

If you have a Python virtual environment created with the
Python `venv` module, follow these instructions to make
the `louis` module available in your virtual environment.

*  If your Python is at version 3.12 or newer, the `distutils`
module is deprecated.  You can make it available via a PIP
package with a command in your virtual environment like
```console
pip3 install setuptools
```
*  First, make yourself root or super-user with an
`su` or `sudo -s` command.
*  Then, activate your virtual environment.
*  Now do as above, but without `sudo`, since you are
already root.
```console
python3 setup.py install
```
*  You can now run the tests, as above, from within
your virtual environemnt.
