Skip to content
Open
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 docs/maintainer/adding_pkgs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ There are, currently, three ways to generate a recipe:
You do _not_ necessarily have to use `grayskull`, and the recipes produced by `grayskull` might need to be reviewed and edited.
Read more about `grayskull` and how to use it [here](https://github.com/conda-incubator/grayskull#introduction).

3. If it's none of the above, generate a recipe with the help of [the example v1 recipe](https://github.com/conda-forge/staged-recipes/tree/main/recipes/example-v1) (or [the example v0 recipe](https://github.com/conda-forge/staged-recipes/tree/main/recipes/example-v0-deprecated), if you wish to use the v0 format) in the [staged-recipes repository](https://github.com/conda-forge/staged-recipes) and modify it as necessary.
3. If it's none of the above, generate a recipe with the help of [the example v1 recipe](https://github.com/conda-forge/staged-recipes/tree/main/recipes/example-v1) in the [staged-recipes repository](https://github.com/conda-forge/staged-recipes) and modify it as necessary.

Your final recipe should have no comments (unless they're actually relevant to the recipe, and not generic instruction comments), and follow the order in the example.

Expand Down
11 changes: 7 additions & 4 deletions docs/maintainer/example_recipes/pure-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ source:
build:
noarch: python
number: 0
script: ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
script: ${{ PYTHON }} -m pip install . -vv

requirements:
host:
Expand Down Expand Up @@ -109,16 +109,19 @@ source:
build:
noarch: python
number: 0
script: ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
script: ${{ PYTHON }} -m pip install . -vv
```

- `noarch: python`: Indicates that this is a pure-Python package and can be installed on any architecture.
- `number`: The build number, starting at 0. Increment this when rebuilding the same version with recipe changes.
- `script`: The build script uses pip to install the package:
- `${{ PYTHON }} -m pip install`: Ensures the correct Python interpreter is used.
- `-vv`: Verbose output for debugging build issues.
- `--no-deps`: Prevents pip from installing dependencies itself, as these are specified in the `requirements.run` section.
- `--no-build-isolation`: Ensures that the `host` environment is used to build the package (instead of creating a new virtualenv).

Note that the `pip` flags `--no-deps` and `--no-build-isolation` are automatically applied by `rattler-build`.

- `--no-deps`: Prevents pip from installing dependencies itself, as these are specified in the `requirements.run` section.
- `--no-build-isolation`: Ensures that the `host` environment is used to build the package (instead of creating a new virtualenv).

#### Entry points

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/adding-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ The build number can be found in the `build:` section:
build:
number: 0
noarch: python
script: ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
script: ${{ PYTHON }} -m pip install . -vv
```

Increase it by one, making it:
Expand All @@ -179,7 +179,7 @@ Increase it by one, making it:
build:
number: 1
noarch: python
script: ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
script: ${{ PYTHON }} -m pip install . -vv
```

Note that in some recipes, the build number will be referenced via a variable rather than directly.
Expand Down
5 changes: 3 additions & 2 deletions docs/tutorials/first-recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ you change the version, you won't have to update both the package version and th
build:
number: 0
noarch: python
script: ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
script: ${{ PYTHON }} -m pip install . -vv
```

Here, three important bits of information are specified:
Expand All @@ -133,7 +133,8 @@ Here, three important bits of information are specified:
2. The `noarch` key that indicates that we're building a pure Python package, and so we do not need
to build separate packages for different conda-forge platforms and Python versions.
3. The actual build command invocation. We're using the Python package manager `pip` to build
and install our package into the workspace. We are passing `--no-deps` to stop `pip` from trying
and install our package into the workspace.
Note that `rattler-build` is automatically passing `--no-deps` to stop `pip` from trying
to automatically install its dependencies (they are already preinstalled in the environment), and
`--no-build-isolation` to make the build use our build environment rather than creating a new
one.
Expand Down
Loading