Skip to content

Commit

Permalink
Update the installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanma committed May 8, 2024
1 parent a37786d commit cc723cb
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ project(pygafro)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
message(WARNING "We recommend the usage of clang instead of gcc, which requires significantly more memory resources to compile pygafro")
endif()


set(PYTHON_VERSION 3 CACHE STRING "Python version")
set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION} CACHE STRING "Python version used by PyBind11")

cmake_policy(SET CMP0148 OLD)

find_package(PythonInterp ${PYTHON_VERSION} REQUIRED)
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} REQUIRED)

Expand Down
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,57 @@ Please visit https://gitlab.com/gafro in order to find the entire *gafro* softwa

## Installation using pip

Requirements:

* ```Eigen 3.4+```

Due to the template-based nature of *gafro* (see **Differences between *gafro* and *pygafro***
below), the compilation of pygafro can take a long time. Additionally, **using ```clang```
instead of ```gcc```** is highly recommended: ```gcc``` requires more memory resources when
compiling *pygafro*, which can become problematic on lower-end computers.

### Using the default compiler of your computer

pip install pygafro

### Forcing the usage of *clang*

(assuming that ```clang``` is installed at ```/usr/bin/clang```)

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
pip install pygafro

## Installation from source

(works either in a conda or virtual environment)

**Note:** Tests are run automatically after the compilation, and requires ```numpy``` to be installed.
Requirements:

* ```Eigen 3.4+```
* ```numpy```

Due to the template-based nature of *gafro* (see **Differences between *gafro* and *pygafro***
below), the compilation of pygafro can take a long time. Additionally, **using ```clang```
instead of ```gcc```** is highly recommended: ```gcc``` requires more memory resources when
compiling *pygafro*, which can become problematic on lower-end computers.

### Using the default compiler of your computer

git clone --recurse-submodules https://github.com/idiap/pygafro.git
mkdir build && cd build
cmake ..
make
make # or for example "make -j4" if you have enough resources
make install

### Forcing the usage of *clang*

(assuming that ```clang``` is installed at ```/usr/bin/clang```)

git clone --recurse-submodules https://github.com/idiap/pygafro.git
mkdir build && cd build
cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang ..
make # or for example "make -j4" if you have enough resources
make install

## Usage
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "pygafro"
version = "1.0.0"
version = "1.0.1"
description="Geometric algebra tools targeted towards robotics applications"
readme = "README.md"
authors = [
Expand Down

0 comments on commit cc723cb

Please sign in to comment.