|
1 |
| -Embedded python distribution |
2 |
| ----------------------------- |
| 1 | +Embedded Python as a Conan package |
| 2 | +---------------------------------- |
3 | 3 |
|
4 | 4 | [](https://github.com/lumicks/embedded_python/actions)
|
5 | 5 |
|
6 |
| -This conan recipe builds an embedded Python distribution which can be placed directly into the `bin` directory of an application for its exclusive use. |
7 |
| -Windows-only for now. |
| 6 | +This Conan recipe builds an embedded Python distribution that is intended to be used as part of an application (e.g. placed into the `bin` directory). |
| 7 | +The application can then execute Python code internally. |
8 | 8 |
|
9 |
| -The base recipe uses the stock embeddable Python version from the python.org website. |
10 |
| -The Python version is specified using the mandatory `embedded_python:version=x.y.z` option. |
11 |
| -If the `embedded_python:packages=...` option is passed, the recipe will `pip install` additional packages. |
12 |
| -The contents of that option is hashed by Conan, so `embedded_python:packages="numpy=1.15 scipy=1.2"` is clearly different from `embedded_python:packages="numpy=1.16 scipy=1.3"`. |
13 |
| -That way, the full Python environment is controlled via Conan. |
14 |
| -The initial build of a new Python environment can take some time but after that it's caches as a binary package. |
| 9 | +## Motivation |
| 10 | + |
| 11 | +Python.org provides an [embeddable package](https://docs.python.org/3/using/windows.html#the-embeddable-package) as a minimal distribution that is intended exactly for this purpose. |
| 12 | +The documentation suggests that it is possible to install third-party packages within this distribution and embed everything into an application, but it's quite short on details. |
| 13 | +By design, `pip` is not available in the embedded Python in order to ensure that the environment is frozen after deployment. |
| 14 | +However, this does make it difficult to get third-party packages into the environment in the first place. |
| 15 | + |
| 16 | +The aim of this Conan recipe is to make it easy to build an embedded Python distribution with any third-third party packages available on pypi.org. |
0 commit comments