Skip to content

Commit

Permalink
FIX: conda_interface should be able to handle alpha, beta, rc versi…
Browse files Browse the repository at this point in the history
…ons (#496)

Co-authored-by: jezdez <[email protected]>
  • Loading branch information
jaimergp and jezdez authored Mar 11, 2022
1 parent c5065ec commit 2b66657
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion constructor/conda_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import json
from os.path import join
from itertools import chain
import sys

NAV_APPS = ['glueviz', 'jupyterlab', 'notebook',
Expand All @@ -16,7 +17,12 @@
"with sys.prefix: %s" % sys.prefix)

if conda_interface_type == 'conda':
CONDA_MAJOR_MINOR = tuple(int(x) for x in CONDA_INTERFACE_VERSION.split('.')[:2])
# This import path has been stable since 2016
from conda.models.version import VersionOrder

_conda_version = VersionOrder(CONDA_INTERFACE_VERSION).version
# Flatten VersionOrder.version, skip epoch, and keep only major and minor
CONDA_MAJOR_MINOR = tuple(chain.from_iterable(_conda_version))[1:3]

from conda._vendor.toolz.itertoolz import (
concatv as _concatv, get as _get, groupby as _groupby,
Expand Down

0 comments on commit 2b66657

Please sign in to comment.