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/maintainer/adding_pkgs.md
+33-39Lines changed: 33 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -41,33 +41,29 @@ The staging process i.e adding a package's recipe has three steps:
41
41
42
42
### Generating the recipe
43
43
44
-
There are, currently, three ways to generate a recipe:
45
-
46
-
1. If it is an R package from [CRAN](https://cran.r-project.org/), kindly
47
-
start by using the [conda-forge helper script for R recipes](https://github.com/bgruening/conda_r_skeleton_helper) instead.
44
+
1. If it is an R package from [CRAN](https://cran.r-project.org/), a Python package from [PyPI](https://pypi.org),
45
+
a Perl package from [CPAN](https://www.cpan.org), or a Lua package from [Luarocks](https://luarocks.org),
46
+
generate a recipe with `rattler-build generate-recipe`.
48
47
Then if necessary, you can make manual edits to the recipe.
49
-
2. If it is a python package, you can generate the recipe as a starting point with `grayskull`.
50
48
51
49
:::note
52
50
53
-
[Grayskull](https://github.com/conda-incubator/grayskull) is an automatic conda recipe generator. The goal of this project is to generate concise recipes
54
-
for conda-forge and eventually replace conda skeleton. Presently, Grayskull can generate recipes for Python packages available on PyPI and also those not published on PyPI and only available as GitHub repositories.
Replace `INDEX_NAME` with the name of the index (e.g. `cran`) and `PACKAGE_NAME` with the name of the package.
62
56
63
57
:::
64
58
65
-
You do _not_ necessarily have to use `grayskull`, and the recipes produced by `grayskull` might need to be reviewed and edited.
66
-
Read more about `grayskull` and how to use it [here](https://github.com/conda-incubator/grayskull#introduction).
59
+
You do _not_ have to use `rattler-build`, and the recipes produced by `rattler-build` might need to be
60
+
reviewed and edited.
61
+
Read more in the [rattler-build recipe generation documentation](https://rattler.build/latest/recipe_generation/).
67
62
68
-
3. If it's none of the above, generate a recipe with the help of [the example recipe](https://github.com/conda-forge/staged-recipes/tree/master/recipes/example) in the [staged-recipes repository](https://github.com/conda-forge/staged-recipes) and modify it as necessary.
63
+
2. If it's none of the above, generate a recipe with the help of [the example recipe](https://github.com/conda-forge/staged-recipes/tree/main/recipes/example-v1/recipe.yaml) in the [staged-recipes repository](https://github.com/conda-forge/staged-recipes), and [the rattler-build documentation](https://rattler.build/latest/),
64
+
including [the full recipe specification](https://rattler.build/latest/reference/recipe_file/).
69
65
70
-
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.
66
+
Your final recipe should have no comments (unless they're actually relevant to the recipe, not just generic instruction comments), and follow the order in the example.
71
67
72
68
:::note
73
69
@@ -90,20 +86,19 @@ In case you are building your first recipe using conda-forge, a step-by-step ins
90
86
2. Fork and clone the [staged-recipes](https://github.com/conda-forge/staged-recipes)
91
87
repository from GitHub.
92
88
3. Checkout a new branch from the staged-recipes `main` branch.
93
-
4. Through CLI, cd inside the ‘staged-recipes/recipes' directory.
89
+
4. Through CLI, `cd` inside the `staged-recipes/recipes` directory.
94
90
5. Within your forked copy, create a new folder in the recipes folder for your package (i.e, `...staged-recipes/recipes/<name-of-package>`)
95
-
6. Copy [meta.yaml](https://github.com/conda-forge/staged-recipes/blob/master/recipes/example/meta.yaml) from the example directory.
96
-
All the changes in the following steps will happen in the COPIED meta.yaml (i.e., `...staged-recipes/recipes/<name-of-package>/meta.yaml`).
91
+
6. Copy [`recipe.yaml`](https://github.com/conda-forge/staged-recipes/blob/main/recipes/example-v1/recipe.yaml) from the example directory.
92
+
All the changes in the following steps will happen in the COPIED recipe.yaml (i.e., `...staged-recipes/recipes/<name-of-package>/recipe.yaml`).
97
93
Please leave the example directory unchanged!
98
-
7. Modify the copied recipe (meta.yml) as needed. To see how to modify meta.yaml, take a look at
99
-
[The recipe meta.yaml](#id4).
94
+
7. Modify the copied recipe (`recipe.yml`) as needed. To see how to modify `recipe.yaml`, take a look at
8. Generate the SHA256 key for your source code archive, as described in the
101
-
example recipe using the `openssl` tool. As an alternative, you can also
102
-
go to the package description on [PyPi](https://pypi.org) from which you
103
-
can directly copy the SHA256.
97
+
example recipe using the `openssl` tool. Alternatively, for packages from [PyPI](https://pypi.org),
98
+
you can also go to the package description on PyPI, from which you can directly copy the SHA256.
104
99
9. Be sure to fill in the `test` section. The simplest test will simply
105
100
test that the module can be imported, as described in the example.
106
-
10. Remove all irrelevant comments in the `meta.yaml` file.
101
+
10. Remove all irrelevant comments in the `recipe.yaml` file.
107
102
108
103
:::tip
109
104
@@ -120,10 +115,10 @@ curl -sL https://github.com/username/reponame/archive/vX.X.X.tar.gz | openssl sh
120
115
#### Checklist
121
116
122
117
- Ensure that the license and license family descriptors (optional) have the right case and that the license is correct. Note that case sensitive inputs are required (e.g. Apache-2.0 rather than APACHE 2.0). Using SPDX identifiers for license field is recommended. (see [SPDX Identifiers and Expressions](#spdx))
123
-
- Ensure that you have included a license file if your license requires one – most do. (see [here](https://github.com/conda-forge/staged-recipes/blob/a504af81c05491bf7b0b018b2fa1efe64767985c/recipes/example/meta.yaml#L52-L55))
118
+
- Ensure that you have included a license file if your license requires one – most do. (see [this section of the example recipe](https://github.com/conda-forge/staged-recipes/blob/3b151310e299162760033b9a165349fc255d28b7/recipes/example-v1/recipe.yaml#L88-L92))
124
119
- In case your project has tests included, you need to decide if these tests should be executed while building the conda-forge feedstock.
125
120
- Make sure that all tests pass successfully at least on your development machine.
126
-
- Recommended: run the test locally on your source code to ensure the recipe works locally (see [Running tests locally for staged recipes](#staging-test-locally)).
121
+
- Recommended: run the tests locally on your source code to ensure the recipe works locally (see [Running tests locally for staged recipes](#staging-test-locally)).
127
122
- Make sure that your changes do not interfere with other recipes that are in the `recipes` folder (e.g. the `example` recipe).
128
123
129
124
<aid="feedback-and-revision"></a>
@@ -150,7 +145,7 @@ If you have questions or have not heard back for a while, you can notify us by i
150
145
151
146
- After the PR is merged, our [CI](../glossary.md#ci) services will create a new git repo automatically. For example, the recipe for a package named `pydstool` will be moved to a new repository [https://github.com/conda-forge/pydstool-feedstock](https://github.com/conda-forge/pydstool-feedstock). This process is automated through a CI job on the `conda-forge/staged-recipes` repo. It sometimes fails due to API rate limits and will automatically retry itself. If your feedstock has not been created after a day or so, please get in touch with the `conda-forge/core` team for help.
152
147
- CI services will be enabled automatically and a build will be triggered automatically which will build the conda package and upload to [https://anaconda.org/conda-forge](https://anaconda.org/conda-forge)
153
-
- If this is your first contribution, you will be added to the conda-forge [team](https://github.com/orgs/conda-forge/people) and given access to the CI services so that you can stop and restart builds. You will also be given commit rights to the new git repository.
148
+
- If this is your first contribution, you will be added to the conda-forge [team](https://github.com/orgs/conda-forge/people) and be given access to the CI services so that you can stop and restart builds. You will also be given commit rights to the new git repository.
154
149
- If you want to make a change to the recipe, send a [PR](../glossary.md#pr) to the git repository from a fork. Branches of the main repository are used for maintaining different versions only.
155
150
156
151
<aid="feedstock-repository-structure"></a>
@@ -168,13 +163,13 @@ Each feedstock contains various files that are generated automatically using our
168
163
169
164
#### recipe
170
165
171
-
This folder contains the `meta.yaml` file and any other files/scripts needed to build the package.
166
+
This folder contains the `recipe.yaml` file and any other files/scripts needed to build the package.
172
167
173
168
<aid="license-txt"></a>
174
169
175
170
#### LICENSE.txt
176
171
177
-
This file is the license for the recipe itself. This license is different from the package license, which you define while submitting the package recipe using `license_file` in the `meta.yaml` file.
172
+
This file is the license for the recipe itself. This license is different from the package license, which you define while submitting the package recipe using `license_file` in the `recipe.yaml` file.
178
173
179
174
<aid="ci-files"></a>
180
175
@@ -207,7 +202,7 @@ The maintainer's job is to:
207
202
208
203
### Adding multiple packages at once
209
204
210
-
If you would like to add more than one related packages, they can be added to
205
+
If you would like to add multiple related packages, they can be added to
211
206
staged-recipes in a single pull request (in separate directories). If the
212
207
packages are interdependent (i.e. one package being added lists one or more of
213
208
the other packages being added as a requirement), the build script will be able to
@@ -263,18 +258,17 @@ Once these steps are complete, you can continue with the steps in [Step-by-step
263
258
264
259
<aid="id4"></a>
265
260
266
-
<aid="the-recipe-meta-yaml"></a>
261
+
<aid="the-recipe-yaml"></a>
267
262
268
-
## The recipe meta.yaml
263
+
## The `recipe.yaml`
269
264
270
-
The `meta.yaml` file in the recipe directory is at the heart of every conda package.
265
+
The `recipe.yaml` file in the recipe directory is at the heart of every conda package.
271
266
It defines everything that is required to build and use the package.
272
267
273
-
`meta.yaml` is in [yaml](https://en.wikipedia.org/wiki/YAML) format, augmented with [Jinja](http://jinja.pocoo.org/) templating.
274
-
275
-
A full reference of the structure and fields of `meta.yaml` file can be found in the [Defining metadata (meta.yaml)](https://conda.io/projects/conda-build/en/stable/resources/define-metadata.html) section in the conda-build documentation.
268
+
A full reference of the structure and fields of `recipe.yaml` file can be found in the
Copy file name to clipboardExpand all lines: docs/maintainer/updating_pkgs.md
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,6 @@ For these reasons, maintainers are asked to fork the feedstock to their personal
52
52
When a new version of a package is released on PyPI/CRAN/.., we have a bot that automatically creates version updates for the feedstock. In most cases you can simply merge this PR and it should include all changes. When certain things have changed upstream, e.g. the dependencies, you will still have to do changes to the created PR. As feedstock maintainer, you don't have to create a new PR for that but can simply push to the branch the bot created. There are two alternatives to push to the branch of the bot:
53
53
54
54
1. Manually setting up git remotes:
55
-
56
55
- Clone the conda-forge feedstock repository
57
56
- Add the remote of the bot: `git remote add regro-cf-autotick-bot [email protected]:regro-cf-autotick-bot/<package>-feedstock.git`
58
57
:::warning[Important]
@@ -98,15 +97,13 @@ Here we assume that you would like to update the feedstock `<feedstock>`. Feedst
98
97
1. Forking the feedstock
99
98
100
99
Before you can submit your first PR, you have to fork conda-forge's feedstock.
101
-
102
100
- Navigate to [https://github.com/conda-forge](https://github.com/conda-forge)/<feedstock> in your favorite web browser and click the `fork` button.
103
101
- You now have a clone of the feedstock in `https://github.com/<your-github-id>/<feedstock>` under your control.
104
102
- Connect to the feedstock from your computer by using `git clone https://github.com/<your-github-id>/<feedstock>`.
105
103
106
104
2. Syncing your fork with conda-forge's feedstock
107
105
108
106
This step is only required if you have forked some time ago and your fork is missing commits from the feedstock at conda-forge.
109
-
110
107
- Make sure you are on the main branch: `git checkout main`
111
108
- Register conda-forge's feedstock with `git remote add upstream https://github.com/conda-forge/<feedstock>`
112
109
- Fetch the latest updates with `git fetch upstream`
@@ -115,7 +112,6 @@ Here we assume that you would like to update the feedstock `<feedstock>`. Feedst
115
112
3. Creating your changes in a new branch
116
113
117
114
Now you are ready to update the recipe
118
-
119
115
- Create and switch to a new branch: `git checkout -b <branch-name>`. `<branch-name>` can be e.g. `update_1_0_1`.
120
116
- Make your changes locally
121
117
- Review your changes then use `git add <changed-files>`. Where `<changed-files>` are a whitespace separated list of filenames you changed.
0 commit comments