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
271
273
will use `runtest <https://pypi.org/project/runtest/>`__. `runtest
272
274
<https://github.com/bast/runtest>`__ is a numerically tolerant end-to-end test
273
275
library for research software.
274
276
275
-
1. Create pypi skeleton::
277
+
1. Generate the *recipe* by executing (``grayskull`` or ``conda grayskull``)::
276
278
277
-
$ conda skeleton pypi runtest
279
+
$ conda grayskull pypi runtest
278
280
279
-
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.
280
283
281
-
2. Edit `meta.yaml` and update requirements:
284
+
2. View the contents of `meta.yaml` and ensure requirements:
282
285
283
286
.. code-block:: yaml
284
287
285
288
requirements:
286
289
host:
287
-
- pip
288
290
- python
289
-
- flit
291
+
- flit-core >=2,<4
292
+
- pip
290
293
run:
291
294
- python
292
-
- flit
293
295
294
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.
295
297
@@ -303,7 +305,7 @@ library for research software.
303
305
304
306
Your package is now ready to be build with conda::
305
307
306
-
$ conda-build runtest
308
+
$ condabuild runtest
307
309
308
310
309
311
.. callout:: Conda package location
@@ -312,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.
318
322
319
-
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
@@ -341,7 +347,10 @@ library for research software.
341
347
342
348
.. callout:: Building a conda package from scratch
343
349
344
-
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).
347
356
@@ -350,15 +359,13 @@ To be able to share and install your local conda package anywhere (on other plat
350
359
Publishing a python package
351
360
***************************
352
361
353
-
- Upload your package to *Anaconda.org*: see instructions `here
0 commit comments