From 491bd718d573d28a1ff04e529f9f395ee9061546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20L=C3=B6nnberg?= Date: Tue, 15 Aug 2023 08:40:28 +0200 Subject: [PATCH] Updated README to instruct how to build with swig for python --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d44380c..ce59dc0 100644 --- a/README.md +++ b/README.md @@ -63,18 +63,18 @@ To use the encoders and decoders in other languages than C/C++, use the below pr ``` sudo apt install swig ``` -#### Python -2. Start your python virtual environment or use your base environment at your own risk. -3. Start terminal and move to iso22133 folder to the setup.py file folder. -4. Run the following command (it will build the python extension): - ``` - python setup.py build_ext - ``` -5. Now install the extension to your python virtual enviroment or add the generated .so file to your path in .bashrc(.zshrc) -6. For installation run in terminal: - ``` - python setup.py install - ``` +### Build with SWIG for Python +In the build directory, remove old content, if needed, then: +``` +cmake -DWITH_SWIG=TRUE -DSWIG_WITH_PYTHON=TRUE .. +make +``` + +If you want it installed on the local machine: +``` +sudo make install +``` + #### Java 1. Make sure you have Java JDK is installed. 2. Make sure the iso22133.i file includes the line %javaconst(1)