Skip to content

Commit 8255afd

Browse files
fix: Do not emit cython_needs_compiler if compiler("cxx") is set (#927)
The current lint is only happy with `compiler("c")`, but `compiler("cxx")` works just as well if the project is a C++ project. I noticed this in <bioconda/bioconda-recipes#43724>. --------- Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
1 parent a75a55b commit 8255afd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

bioconda_utils/lint/check_build_help.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class cython_needs_compiler(LintCheck):
134134
"""
135135
severity = WARNING
136136
def check_deps(self, deps):
137-
if 'cython' in deps and 'compiler_c' not in deps:
137+
if 'cython' in deps and 'compiler_c' not in deps and 'compiler_cxx' not in deps:
138138
self.message()
139139

140140

test/lint_cases.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ tests:
403403
add:
404404
requirements: { host: [cython], build: ['{{compiler("c")}}'] }
405405
build: { noarch: False }
406+
- name: cython_cxx_compiler_ok
407+
add:
408+
requirements: { host: [cython], build: ['{{compiler("cxx")}}'] }
409+
build: { noarch: False }
406410
- name: missing_run_exports
407411
remove: build/run_exports
408412
expect: missing_run_exports

0 commit comments

Comments
 (0)