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
Once build, the conda package can be installed locally. For this example, we
216
273
will use `runtest <https://pypi.org/project/runtest/>`__. `runtest
217
274
<https://github.com/bast/runtest>`__ is a numerically tolerant end-to-end test
218
275
library for research software.
219
276
220
-
1. Create pypi skeleton::
277
+
1. Generate the *recipe* by executing (``grayskull`` or ``conda grayskull``)::
221
278
222
-
$ conda skeleton pypi runtest
279
+
$ conda grayskull pypi runtest
223
280
224
-
The command above will create a new folder called `runtest` containing a file `meta.yaml`, the conda recipe for `runtest`.
281
+
The command above will create a new folder called `runtest` containing a file `meta.yaml`,
282
+
the conda recipe for building the `runtest` package.
225
283
226
-
2. Edit `meta.yaml` and update requirements:
284
+
2. View the contents of `meta.yaml` and ensure requirements:
227
285
228
286
.. code-block:: yaml
229
287
230
288
requirements:
231
289
host:
232
-
- pip
233
290
- python
234
-
- flit
291
+
- flit-core >=2,<4
292
+
- pip
235
293
run:
236
294
- python
237
-
- flit
238
295
239
296
In the requirements above, we specified what is required for the `host <https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#host>`__ and for `running <https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#run>`__ the package.
240
297
@@ -248,7 +305,7 @@ library for research software.
248
305
249
306
Your package is now ready to be build with conda::
250
307
251
-
$ conda-build runtest
308
+
$ condabuild runtest
252
309
253
310
254
311
.. callout:: Conda package location
@@ -257,11 +314,15 @@ library for research software.
The prefix `~/anaconda3/` may be different on your machine and depending on your operating system (Linux, Mac-OSX or Windows) the sub-folder `win-64` differs too (for instance `linux-64` on Linux machines).
319
+
The prefix ``/home/username/miniforge3/`` may be different on your machine.
320
+
depending on your operating system (Linux, Mac-OSX or Windows). The sub-folder is named ``noarch`` since
321
+
it is a pure-python package and the recipe indicates the same.
263
322
264
-
The conda package we have created is specific to your platform (here `win-64`). It can be converted to other platforms using `conda convert <https://docs.conda.io/projects/conda-build/en/latest/user-guide/tutorials/build-pkgs.html#converting-a-package-for-use-on-all-platforms>`__.
323
+
If package contained compiled code then the sub-folder would have been named ``win-64`` or ``linux-64``.
324
+
It could then be converted to other platforms using
@@ -286,7 +347,10 @@ library for research software.
286
347
287
348
.. callout:: Building a conda package from scratch
288
349
289
-
It is possible to build a conda package from scratch without using conda skeleton. We recommend you to check the `conda-build documentation <https://docs.conda.io/projects/conda-build/en/latest/user-guide/tutorials/build-pkgs.html>`__ for more information.
350
+
It is possible to build a conda package from scratch without using conda grayskull.
To be able to share and install your local conda package anywhere (on other platforms), you would need to upload it to a `conda channel <https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html>`__ (see below).
292
356
@@ -295,15 +359,13 @@ To be able to share and install your local conda package anywhere (on other plat
295
359
Publishing a python package
296
360
***************************
297
361
298
-
- Upload your package to *Anaconda.org*: see instructions `here
0 commit comments