Commit 1fcfcbd8 authored by Klaus Reuter's avatar Klaus Reuter
Browse files

fix a few typos

parent 6996e91e
......@@ -2,11 +2,11 @@
## Introduction
With the popularity and success of the python programming language, it has become increasingly important for researches to be able to make software developments available to the python eco-system by means of extension packages. To this end, the [Pybind11](https://github.com/pybind/pybind11) library provides a convenient approach to generate python bindings for (existing) C++ code. In this context, the [sciki-build](https://github.com/scikit-build/scikit-build) project can be used to bridge python's `setuptools` with [CMake](https://cmake.org/). As a resuls, CMake's features such as, e.g., choice of build-generators, dependency management or cross-compilation, can easily be exploited from within the installation process of the developed python extension.
With the popularity and success of the Python programming language, it has become increasingly important for researchers to be able to make software developments available to the Python eco-system by means of extension packages. To this end, the [Pybind11](https://github.com/pybind/pybind11) library provides a convenient approach to generate Python bindings for (existing) C++ code. In this context, the [sciki-build](https://github.com/scikit-build/scikit-build) project can be used to bridge Python's `setuptools` with [CMake](https://cmake.org/). As a result, CMake's features such as, e.g., choice of build-generators, dependency management or cross-compilation, can easily be exploited from within the installation process of the developed Python extension.
## Basic Usage
The basic usage of pybind11 in combindation with scikit-build will be demonstrated in the following using a 'hello-world' python extension package that can be accessed [here](sebak/pybind11-hello-world).
The basic usage of pybind11 in combination with scikit-build will be demonstrated in the following using a 'hello-world' Python extension package that can be accessed [here](sebak/pybind11-hello-world).
## pybind11 hello-world
......@@ -28,7 +28,7 @@ PYBIND11_MODULE(_hello, m) {
}
```
In order for this example to be compiled, the pybind11 headers (as any other potential dependency) must be available. pybind11 can be installed in [several ways](https://pybind11.readthedocs.io/en/stable/installing.html) and it also natively support various [build systems](https://pybind11.readthedocs.io/en/stable/compiling.html#compiling). However using scikit-build provides a particulary easy approach which is shown in the following.
In order for this example to be compiled, the pybind11 headers (as any other potential dependency) must be available. pybind11 can be installed in [several ways](https://pybind11.readthedocs.io/en/stable/installing.html) and it also natively support various [build systems](https://pybind11.readthedocs.io/en/stable/compiling.html#compiling). However using scikit-build provides a particularly easy approach which is shown in the following.
## build with scikit-learn
......@@ -48,7 +48,7 @@ pybind11_add_module(_hello MODULE src/hello/hello.cpp)
install(TARGETS _hello DESTINATION .)
```
Build-system dependencies have to be specified the project's `pyproject.toml` file:
Build-system dependencies have to be specified via the project's `pyproject.toml` file:
```
[build-system]
......@@ -62,7 +62,6 @@ requires = [
build-backend = "setuptools.build_meta"
```
With modern python packaging, it is thus not necessary to manually install scikit-build, but all build-dependencies will be installed in an isolated build-enviroment. Like this, also dependecies like pybind11 or CMake can be made available with an up-to-date version of `pip`. Please note that the `[global]` feature of the pybind11 requirement, which installs headers and libraries, does not apply to the used python installation or environment but to the dedicated build environment and can thus be used savely here.
With modern Python packaging, it is thus not necessary to manually install scikit-build, but all build-dependencies will be installed in an isolated build-environment. Like this, also dependencies like pybind11 or CMake can be made available with an up-to-date version of `pip`. Please note that the `[global]` feature of the pybind11 requirement, which installs headers and libraries, does not apply to the used Python installation or environment but to the dedicated build environment and can thus be used safely here.
*Sebastian Kehl, Klaus Reuter*
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment