Skip to content

pybop-team/pybop-diffsol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python bindings for the DiffSol library for PyBOP

Development

Getting started

You will need to have maturin installed to build the bindings. You can install it in a virtual environment like this:

python3 -m venv env
source env/bin/activate
pip install maturin

You will also need to have LLVM installed. On Ubuntu, you can install it with:

sudo apt install llvm-dev

Make a note of the directory where LLVM is installed as well as the version number, as you will need to pass it to maturin when building the bindings.

Building the bindings

To build the bindings, run the following command in the root directory of the project, replacing the llvm directory and version number with the ones you noted earlier:

LLVM_DIR=/usr/lib/llvm-17  LLVM_SYS_170_PREFIX=/usr/lib/llvm-17 maturin develop --features diffsol-llvm17

Building a wheel

To build a wheel, you can use the following command:

LLVM_DIR=/usr/lib/llvm-17  LLVM_SYS_170_PREFIX=/usr/lib/llvm-17 maturin build --release --out dist --features diffsol-llvm17

Or via pip:

MATURIN_PEP517_ARGS="--features diffsol-llvm17" pip wheel .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published