Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fix extraction of conda version #1428

Merged
merged 5 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions asv/plugins/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import contextlib
from pathlib import Path

from packaging.version import Version

from .. import environment, util
from ..console import log

Expand Down Expand Up @@ -147,10 +149,13 @@ def _setup(self):
try:
env_file_name = self._conda_environment_file or env_file.name

conda_version = self._run_conda(['--version'], env=env)
conda_version = re.search(
r'\d+(\.\d+)+',
self._run_conda(['--version'], env=env)
)[0]
log.info(f"conda version: {conda_version}")
# https://conda.io/projects/conda/en/latest/release-notes.html#id8
if conda_version >= "24.3.0":
if Version(conda_version) >= Version("24.3.0"):
self._run_conda(['env', 'create', '-f', env_file_name,
'-p', self._path, "--yes"],
env=env)
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ plugs = [
[build-system]
requires = [
"wheel",
"setuptools>=64",
# pin setuptools:
# https://github.com/airspeed-velocity/asv/pull/1426#issuecomment-2290658198
"setuptools>=64,<72.2.0",
"setuptools_scm>=6",
]
build-backend = "setuptools.build_meta"
Expand Down
Loading