Skip to content

Commit

Permalink
update doc for local builds of conda-forge recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
alchem0x2A committed Dec 2, 2024
1 parent 0731ca6 commit f7f258b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
14 changes: 13 additions & 1 deletion doc/maintainers/sparc-c-c++.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ create the PR yourself). After confirming that all the checks have
passed, you can merge the pull request to include the compiled
binaries in the conda-forge channel.

### Debug the recipe using local build

Building the recipe locally is identical to the steps for [`sparc-x-api-feedstock`](#conda-forge-build-locally-api).
You need
both the [docker engine](https://docs.docker.com/engine/) and a [conda distribution](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) installed on your local
machine, and run the following command at the root of the local clone of `sparc-x-feedstock`:
```{code} bash
python build-locally.py
```

### Revised builds

If by any chance you find the newly released SPARC binaries in
Expand All @@ -140,7 +150,9 @@ build:
number: 1
```

This allows conda-forge to distinguish two builds without affecting the version number, as the actual package is named like `<os>-<arch>/sparc-x-2.0.0-<hash>_<build>.conda`.
This allows conda-forge to distinguish two builds without affecting
the version number, as the actual package is named like
`<os>-<arch>/sparc-x-2.0.0-<hash>_<build>.conda`.

```{note}
If the error stems from the C/C++ itself, you should update the release in the SPARC github repo instead.
Expand Down
12 changes: 12 additions & 0 deletions doc/maintainers/sparc-x-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ for the maintainers to modify and merge. Please also ensure:
- Do not directly use the [`.conda/meta.yaml`](https://github.com/SPARC-X/SPARC-X-API/blob/master/.conda/meta.yaml) for conda-forge (it is designed for local packaging test)
- Bump the `build.number` if you need to change the recipe YAML on the same SPARC-X-API release.

(conda-forge-build-locally-api)=
### Debug the recipe using local build

The build toolchain in conda-forge is slightly different from the
standard `conda-build` command. If the build workflow fails after
submitting the PR, you may run the recipe locally to debug. You need
both the [docker engine](https://docs.docker.com/engine/) and a [conda distribution](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) on your local
machine. Run the following command at the root of the local clone of `sparc-x-api-feedstock`:
```{code} bash
python build-locally.py
```

## Deploy on PyPI

SPARC-X-API is deployed on PyPI under the name
Expand Down

0 comments on commit f7f258b

Please sign in to comment.