-
-
Notifications
You must be signed in to change notification settings - Fork 292
Add instructions about splitting header and runtime + run_export> packages #2257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hmaarrfk
wants to merge
7
commits into
conda-forge:main
Choose a base branch
from
hmaarrfk:split_header_runtime
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a81a315
Add instructions about splitting header and runtime + run_export
hmaarrfk a0a280a
Update docs/maintainer/knowledge_base.md
hmaarrfk b0e2bbb
Update docs/maintainer/knowledge_base.md
hmaarrfk cc3048b
Update docs/maintainer/knowledge_base.md
hmaarrfk 67bd9f7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 35fe8cf
Update docs/maintainer/knowledge_base.md
hmaarrfk c1eac53
Update docs/maintainer/knowledge_base.md
hmaarrfk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1695,6 +1695,8 @@ add some information on r packages which make heavy use of `noarch: generic` | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- [importlib_metadata and importlib-metadata](https://github.com/conda-forge/importlib_metadata-feedstock/blob/main/recipe/meta.yaml) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- [typing_extensions and typing-extensions](https://github.com/conda-forge/typing_extensions-feedstock/blob/main/recipe/meta.yaml) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
### Common pitfalls with `outputs` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is a non-exhaustive list of common pitfalls when using `outputs`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -1704,6 +1706,41 @@ This is a non-exhaustive list of common pitfalls when using `outputs`. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- The `outputs[].script` field can only be set to a script name. If you prefer passing shell commands, you have to use `outputs[].build.script`. Compare [geopandas-feedstock](https://github.com/conda-forge/geopandas-feedstock/blob/8b985635a8538af1ee213900bd563085e3cdbd92/recipe/meta.yaml#L17) to [gym-feedstock](https://github.com/conda-forge/gym-feedstock/blob/2b47e0479923b7d49a39e9860ba30a28e263480b/recipe/meta.yaml#L31), respectively. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Some `PIP_*` environment variables that are usually set for the top-level scripts are not automatically set for the outputs. If you are invoking `pip` in an output, you may need to pass additional flags. See [napari-feedstock](https://github.com/conda-forge/napari-feedstock/blob/32a4eb04ca7b6ccd2c4e146bde204f1dd5425a17/recipe/meta.yaml#L26). This issue is tracked in [conda/conda-build#3993](https://github.com/conda/conda-build/issues/3993). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Pin as much as possible each output to the exact version of the subpackages. Pinning to the same minor version is often not enough since it may allow for different build numbers of packages built from the same recipe to be co-installed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
```yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
requirements: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- {{ pin_subpackage('subpackage_name', exact=True) }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Often multi-output recipes are used when maintainers wish to split the runtime files from the build time files. The runtime package will often include shared library files and any runtime configuration files, while the development package will include compilation time headers, and other compilation files. The intention is to make it necessary to have both the development and runtime package installed at compilation time, but at runtime, only the runtime package would be installed. We wish that maintainers of downstream packages depend on the "developement" package at build time in the host section. Thus the development package should have a run_export on the runtime package. This is done by adding the following to the development package's meta.yaml: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
```yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: runtime_package_name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# no run_export should be added here. This package is missing the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# development headers and other compilation files. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Typically this package is suffixed with `-devel` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: development_package_name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hmaarrfk marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
build: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
run_exports: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# the max_pin should be adjusted | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- {{ pin_subpackage('runtime_package_name', max_pin='x.x') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
requirements: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Add the runtime package as a host dependency to ensure that files are deduplicated between the packages. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
host: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- {{ pin_subpackage('runtime_package_name', exact=True) }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- {{ pin_subpackage('runtime_package_name', exact=True) }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- other | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- required | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- compilation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+1718
to
+1737
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Once the package is created, it the development package should be added to the list of global pinnings for conda forge in the [`conda_build_config.yaml`](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml) file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hmaarrfk marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<a id="build-matrices"></a> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Build matrices | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.