Skip to content

Commit

Permalink
fix: Do not emit cython_needs_compiler if compiler("cxx") is set (#927)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
marcelm and johanneskoester authored Dec 20, 2023
1 parent a75a55b commit 8255afd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bioconda_utils/lint/check_build_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class cython_needs_compiler(LintCheck):
"""
severity = WARNING
def check_deps(self, deps):
if 'cython' in deps and 'compiler_c' not in deps:
if 'cython' in deps and 'compiler_c' not in deps and 'compiler_cxx' not in deps:
self.message()


Expand Down
4 changes: 4 additions & 0 deletions test/lint_cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ tests:
add:
requirements: { host: [cython], build: ['{{compiler("c")}}'] }
build: { noarch: False }
- name: cython_cxx_compiler_ok
add:
requirements: { host: [cython], build: ['{{compiler("cxx")}}'] }
build: { noarch: False }
- name: missing_run_exports
remove: build/run_exports
expect: missing_run_exports

0 comments on commit 8255afd

Please sign in to comment.