I'd like to distribute multiple versions of a package through conda. Specifically, I'd like to do something like this:
...
package-v1.2-dev
package-v1.2
package-v1.1-dev
package-v1.1
package-v1.0
The trick is that I'd like to have the "latest" or default package be the release versions that do not have -dev
. As I understand it, conda install <package>
without a version number will install the newest build. In my case, that will always be -dev
. Is it possible to make the default a specific version number?
You can achieve this by specifying a custom "label" for your
dev
packages. Keep using the defaultmain
label for your release packages, but use a non-main label (e.g.dev
) for the other packages.First, a quick note about version numbers: conda package versions must not contain the
-
character, sov1.2-dev
is not a valid version. For the following examples, I'll usev1.2.dev
.Here's how to upload your packages:
(You can also manipulate the labels for existing packages via your account on the http://anaconda.org website.)
By default, your users will only download your main packages. Users who want the
dev
packages will have two choices:They can specify the
dev
label on the command-line:OR
They can add your
dev
label to their.condarc
configAnd then there's no need to specify the channel on the command-line:
PS -- Here's a side note about something you wrote above:
Just to clarify, it doesn't install the "newest" in chronological sense, but rather the highest compatible version according to conda's
VersionOrder
logic. That logic is designed to be largely compatible with relevant Python conventions (e.g. PEP440 and others), but with some affordances for compatibility with other languages' conventions, too.Please note: As far as conda (and PEP440) is concerned,
1.2.dev
comes BEFORE1.2
. (Maybe you already knew that, but I don't consider it obvious.)