You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/backends.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,26 @@ To decouple the building of a conda package from Pixi we provide something what
2
2
These are essentially executables following a specific protocol that is implemented for both Pixi and the build backend.
3
3
This also allows for decoupling of the build backend from Pixi and it's manifest specification.
4
4
5
-
The backends we are currently developing are available in the following [conda channel](https://prefix.dev/channels/pixi-build-backends).
6
-
And are being developed in the [pixi-build-backends](https://github.com/prefix-dev/pixi-build-backends) repository.
5
+
The Prefix.dev managed backends are being developed in the [pixi-build-backends](https://github.com/prefix-dev/pixi-build-backends) repository, and have their own
5. This will allow Pixi to install desired backends from the `pixi-build-backends` channel, and any requirements from `conda-forge`. Backends are installed into isolated environments, and will be shared across Pixi workspaces.
16
+
For custom backend channels, you can add the channel to the `channels` section of the manifest file:
Sometimes you want to override the build backend that is used by pixi. Meaning overriding the backend that is specified in the [`[package.build]`](../reference/pixi_manifest.md#the-build-system). We currently have two environment variables that allow for this:
24
+
Sometimes you want to override the build backend that is used by pixi. Meaning overriding the backend that is specified in the [`[package.build]`](../reference/pixi_manifest.md#build-table). We currently have two environment variables that allow for this:
21
25
22
26
1.`PIXI_BUILD_BACKEND_OVERRIDE`: This environment variable allows for overriding of one or multiple backends. Use `{name}={path}` to specify a backend name mapped to a path and `,` to separate multiple backends.
23
27
For example: `pixi-build-cmake=/path/to/bin,pixi-build-python` will:
A package section needs to be inside a `workspace`,
909
+
either in the same manifest file as the `[workspace]` table or in a sub folder `pixi.toml`/`pyproject.toml` file.
936
910
937
-
### Host, Build, dependencies
911
+
These packages will be built into a conda package that can be installed into a conda environment.
912
+
The package section is defined using the following fields:
938
913
939
-
The package section re-uses the `host-dependencies` and `build-dependencies`,
940
-
which you can read about here: [host-build-dependencies](#host-dependencies) and [build-dependencies](#build-dependencies).
941
-
If you have the `preview = ["pixi-build"]` enabled these are interpreted as part of the package.
914
+
-`name`: The name of the package.
915
+
-`version`: The version of the package.
916
+
-`build`: The build system used to build the package.
917
+
-`build-dependencies`: The build dependencies of the package.
918
+
-`host-dependencies`: The host dependencies of the package.
919
+
-`run-dependencies`: The run dependencies of the package.
920
+
-`target`: The target table to configure target specific dependencies. (Similar to the [target](#the-target-table) table)
942
921
943
-
### Run dependencies
922
+
And to extend the basics, it can also contain the following fields:
944
923
945
-
Run dependencies are dependencies that are required at runtime by your package.
946
-
For Python packages, these are the most common dependency types.
947
-
For compiled languages, these are less common and would basically be dependencies that you do not need when compiling the package but are needed when running it.
924
+
-`description`: A short description of the package.
925
+
-`authors`: A list of authors of the package.
926
+
-`license`: The license of the package.
927
+
-`license-file`: The license file of the package.
928
+
-`readme`: The README file of the package.
929
+
-`homepage`: The homepage link of the package.
930
+
-`repository`: The repository link of the package.
931
+
-`documentation`: The documentation link of the package.
We are currently not publishing the backends on conda-forge, but will do so in the future.
969
-
For now the backends are published at [conda channel](https://prefix.dev/channels/pixi-build-backends).
967
+
968
+
### The `build``host` and `run` dependencies tables
969
+
The dependencies of a package are split into three tables.
970
+
Each of these tables has a different purpose and is used to define the dependencies of the package.
971
+
972
+
-[`build-dependencies`](#build-dependencies): Dependencies that are required to build the package on the build platform.
973
+
-[`host-dependencies`](#host-dependencies): Dependencies that are required during the build process, to link against the package on the target platform.
974
+
-[`run-dependencies`](#run-dependencies): Dependencies that are required to run the package on the target platform.
975
+
976
+
977
+
### `build-dependencies`
978
+
Build dependencies are required in the build environment and contain all tools that are not needed on the host of the package.
979
+
980
+
Following packages are examples of typical build dependencies:
0 commit comments