Skip to content

Commit 017e54d

Browse files
authored
fix: allow tilde in conda version constraints (#1033)
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.
1 parent fcaf291 commit 017e54d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bioconda_utils/lint/check_syntax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def check_recipe(self, recipe):
2323
for section in ('build', 'run', 'host'):
2424
check_paths.append(f'requirements/{section}')
2525

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

40-
constraints = re.compile("(.*?)([!<=>].*)")
40+
constraints = re.compile("(.*?)([!~<=>].*)")
4141
for path in check_paths:
4242
for spec in self.recipe.get(path, []):
4343
has_constraints = constraints.search(spec)

0 commit comments

Comments
 (0)