File: README.md

package info (click to toggle)
ros2-ament-cmake 2.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,556 kB
  • sloc: python: 697; xml: 485; cpp: 91; ansic: 84; sh: 8; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 1,180 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# ament_cmake_python

This package adds functions for installing Python packages and modules in CMake.

## API

Calling `find_package(ament_cmake_python)` will make the following API available.

### ament_get_python_install_dir

The CMake function [`ament_get_python_install_dir`](cmake/ament_get_python_install_dir.cmake) gets the path Python packages will be installed to.
The path is always relative to `CMAKE_INSTALL_PREFIX`.

The path can be customized by setting `PYTHON_INSTALL_DIR` on the command line.
It must be a relative path.
For example, the cmake command bellow would cause Python code to be installed to `${CMAKE_INSTALL_PREFIX}/foobar/site-packages`.

```console
$ cmake ../path/to/package/using/ament_cmake_python -DPYTHON_INSTALL_DIR=foobar/site-packages
```

### ament_python_install_module

The  CMake macro [`ament_python_install_module`](cmake/ament_python_install_module.cmake) will install a single Python module to the Python install directory.

### ament_python_install_package

The CMake macro [`ament_python_install_package`](cmake/ament_python_install_package.cmake) will install a Python package and all subpackages to the Python install directory.