Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/other-tools/02_pixi_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pixi publish --clean --target-channel https://prefix.dev/<channel-name>

## Compiled Packaging

Take the example Python package directory tree from [A minimal compiled package with scikit-build](https://scikit-build.org/SIMPLE-Py/compiled) as a starting foundation.
Take the example Python package directory tree from the [A minimal compiled package with scikit-build](https://scikit-build.org/SIMPLE-Py/compiled) section as a starting foundation.

```bash
cp -R ./examples/2_01_package/collatz /tmp/compiled
Expand Down
27 changes: 27 additions & 0 deletions content/other-tools/03_conda_forge.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,30 @@ To get a conda recipe on conda-forge you need to submit it for build checks and

When in doubt, just ask!
The [conda-forge Zulip server](https://conda-forge.zulipchat.com/) is the best way to get responses from the community and the conda-forge/core team, but also make sure to [check out the maintainer knowledge base in the documentation](https://conda-forge.org/docs/maintainer/knowledge_base/) first.

## rattler-build recipe build example

Here is an valid `rattler-build` recipe for the `collatz` example from the [A minimal compiled package with scikit-build](https://scikit-build.org/SIMPLE-Py/compiled) section

```{literalinclude} ../../examples/5_02_pixi_build/compiled/recipe.yaml
:filename: recipe.yaml
:linenos:
```

::::{exercise} Build the `rattler-build` recipe
:label: rattler-build-collatz

Build the recipe file into a conda package with `rattler-build` and then inspect the package.

:::{solution} rattler-build-collatz
:class: dropdown

```bash
pixi global install rattler-build
rattler-build build --recipe .
rattler-build package inspect ./output/linux-64/rattler-collatz-*.conda
```

:::

::::
1 change: 1 addition & 0 deletions examples/5_02_pixi_build/compiled/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,4 @@ __marimo__/
.pixi/*
!.pixi/config.toml
pixi.lock
output/
21 changes: 21 additions & 0 deletions examples/5_02_pixi_build/compiled/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 SIMPLE-Py

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 64 additions & 0 deletions examples/5_02_pixi_build/compiled/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
schema_version: 1

context:
version: 0.1.0

package:
name: rattler-collatz
version: ${{ version }}

source:
url: https://github.com/scikit-build/SIMPLE-Py/archive/4e21e097e26365e403cb04f59abb73041cd3710c.tar.gz
# pixi global install curl openssl
# curl -sL <url> | openssl sha256
sha256: 75cf5fd9151a837a523eae5b3aa14094c2ac5cb93a22856237ef0c2700e49705

build:
number: 0
script:
env:
CMAKE_GENERATOR: Ninja
content:
- cd examples/5_02_pixi_build/compiled
- ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation

requirements:
build:
# This is provided by conda-forge and so needs to be commented out for now.
# - ${{ stdlib("c") }}
- ${{ compiler("cxx") }}
- cmake
- ninja
- if: build_platform != host_platform
then:
- cross-python_${{ host_platform }}
- python
host:
- python
- pip
- scikit-build-core
- pybind11
run:
- python

tests:
- python:
imports:
- collatz
pip_check: true

about:
homepage: https://github.com/scikit-build/SIMPLE-Py
license: BSD-3-Clause
license_file: LICENSE
summary: Single-line summary of the package.
description: |
One or two paragraphs with more information about the package.
repository: https://github.com/scikit-build/SIMPLE-Py
documentation: https://github.com/scikit-build/SIMPLE-Py

extra:
recipe-maintainers:
# GitHub username
- henryiii
- matthewfeickert