Skip to content

Commit

Permalink
fix: allow tilde in conda version constraints (#1033)
Browse files Browse the repository at this point in the history
See conda package match specifications:


https://docs.conda.io/projects/conda-build/en/25.1.x/resources/package-spec.html#package-match-specifications

This syntax has also been around for a bit, I can already see it in the
`24.1.x` docs.
  • Loading branch information
dlaehnemann authored Jan 28, 2025
1 parent fcaf291 commit 017e54d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bioconda_utils/lint/check_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def check_recipe(self, recipe):
for section in ('build', 'run', 'host'):
check_paths.append(f'requirements/{section}')

constraints = re.compile("(.*?)([!<=>].*)")
constraints = re.compile("(.*?)([!~<=>].*)")
for path in check_paths:
for n, spec in enumerate(recipe.get(path, [])):
has_constraints = constraints.search(spec)
Expand All @@ -37,7 +37,7 @@ def fix(self, _message, _data):
for section in ('build', 'run', 'host'):
check_paths.append(f'requirements/{section}')

constraints = re.compile("(.*?)([!<=>].*)")
constraints = re.compile("(.*?)([!~<=>].*)")
for path in check_paths:
for spec in self.recipe.get(path, []):
has_constraints = constraints.search(spec)
Expand Down

0 comments on commit 017e54d

Please sign in to comment.