@@ -1257,3 +1257,112 @@ The steps involved are, roughly:
1257
1257
migration must be added. Rerender.
1258
1258
6. When everything else has been merged and testing has taken place,
1259
1259
consider merging the PR opened at step 2 now so it can apply to all the downstream feedstocks.
1260
+
1261
+
1262
+ Pre-release builds
1263
+ ==================
1264
+
1265
+ Recipe maintainers can make pre-release builds available on
1266
+ conda-forge by adding them to the ``dev `` or ``rc `` label.
1267
+
1268
+ The semantics of these labels should generally follow the
1269
+ `guidelines <https://docs.python.org/devguide/devcycle.html#stages >`_ that Python
1270
+ itself follows.
1271
+
1272
+ - ``rc ``: `Beta <https://docs.python.org/devguide/devcycle.html#beta >`_ and `Release
1273
+ Candidate <https://docs.python.org/devguide/devcycle.html#release-candidate-rc> `_
1274
+ (RC). No new features. Bugfix only.
1275
+
1276
+ - ``dev ``: `Pre-Alpha <https://docs.python.org/devguide/devcycle.html#pre-alpha >`_
1277
+ and `Alpha <https://docs.python.org/devguide/devcycle.html#alpha >`_. These are
1278
+ still packages that could see substantial changes
1279
+ between the dev version and the final release.
1280
+
1281
+
1282
+ .. note ::
1283
+
1284
+ ``alpha `` and ``beta `` labels aren't used. Given the light usage of labels on the conda-forge
1285
+ channel thus far, it seems rather unnecessary to introduce many labels.
1286
+ ``dev `` and ``rc `` seem like a nice compromise.
1287
+
1288
+ .. note ::
1289
+
1290
+ Certain packages (for example `black <https://pypi.org/project/black/#history >`_) follow
1291
+ a release cycle in which they have never had a non-beta/alpha release. In these cases
1292
+ the conda packages for those do *not * need to be published to a prerelease label.
1293
+
1294
+ Creating a pre-release build
1295
+ ----------------------------
1296
+
1297
+ To create a ``dev `` or ``rc `` package, a PR can be issued into the ``dev `` or ``rc `` branch of the
1298
+ feedstock.
1299
+ This branch must change the ``recipe/conda_build_config.yaml `` file to point to the ``<package_name>_dev `` or ``<package_name>_rc `` label.
1300
+
1301
+ For example, matplotlib rc releases would include:
1302
+
1303
+ .. code-block :: yaml
1304
+
1305
+ channel_targets :
1306
+ - conda-forge matplotlib_rc
1307
+
1308
+ If a pre-release build of B depends on a pre-release build of A, then A should have,
1309
+
1310
+ .. code-block :: yaml
1311
+
1312
+ channel_targets :
1313
+ - conda-forge A_rc
1314
+
1315
+ while B should have,
1316
+
1317
+ .. code-block :: yaml
1318
+
1319
+ channel_sources :
1320
+ - conda-forge/label/A_rc,conda-forge,defaults
1321
+ channel_targets :
1322
+ - conda-forge B_rc
1323
+
1324
+ in ``recipe/conda_build_config.yaml `` in their respective feedstocks.
1325
+
1326
+ .. note ::
1327
+
1328
+ A rerender needs to happen for these changes to reflect in CI files.
1329
+
1330
+ Installing a pre-release build
1331
+ ------------------------------
1332
+
1333
+ Use the following command, but replace ``PACKAGE_NAME `` with the package you want
1334
+ to install and replace ``LABEL `` with ``rc `` or ``dev ``:
1335
+
1336
+ .. code-block :: yaml
1337
+
1338
+ conda install -c conda-forge/label/PACKAGE_NAME_LABEL -c conda-forge PACKAGE_NAME
1339
+
1340
+ For example, let's install matplotlib from the ``rc `` label:
1341
+
1342
+ .. code-block :: yaml
1343
+
1344
+ conda install -c conda-forge/label/matplotlib_rc -c conda-forge matplotlib
1345
+
1346
+ Pre-release version sorting
1347
+ ---------------------------
1348
+
1349
+ If you wish to add numbers to your ``dev `` or ``rc `` build, you should follow the
1350
+ `guidelines <http://conda.pydata.org/docs/spec.html#build-version-spec >`_ put
1351
+ forth by Continuum regarding version sorting in ``conda ``. Also see the `source
1352
+ code for conda
1353
+ 4.2.13 <https://github.com/conda/conda/blob/4.2.13/conda/version.py#L93-L119> `_.
1354
+ The tl;dr here is that conda sorts as follows:
1355
+
1356
+ .. code-block ::
1357
+
1358
+ < 1.0
1359
+ < 1.1dev1 # special case 'dev'
1360
+ < 1.1.0dev1 # special case 'dev'
1361
+ == 1.1.dev1 # 0 is inserted before string
1362
+ < 1.1.0rc1
1363
+ < 1.1.0
1364
+
1365
+
1366
+ So make sure that you **tag ** your package in such a way that the package name
1367
+ that conda-build spits out will sort the package uploaded with an ``rc `` label
1368
+ higher than the package uploaded with the ``dev `` label.
0 commit comments