- A compiler with C++11 support
- Pip 10+ or CMake >= 4.1
- Ninja or Pip 10+
Just clone this repository and pip install. Note the --recursive
option which is
needed for the pybind11 submodule:
sudo apt install libelf-dev
git clone --recursive https://github.com/varun-r-mallya/pylibbpf.git
pip install .
With the setup.py
file included in this example, the pip install
command will
invoke CMake and build the pybind11 module as specified in CMakeLists.txt
.
Do this before running to make sure Python can manipulate bpf programs without sudo
sudo setcap cap_bpf,cap_sys_admin+ep /usr/bin/python3.12
The documentation here is still boilerplate.