check_build_help¶
Build tool usage
These checks catch errors relating to the use of -
{{compiler('xx')}}
and setuptools
.
Classes
|
The recipe requests a compiler in a section other than build |
|
Cython should be in the host section |
|
Cython generates C code, which will need to be compiled |
|
The recipe uses setuptools without required arguments |
|
The recipe requires a compiler directly |
|
The recipe uses setuptools in run depends |
Documentation
- class bioconda_utils.lint.check_build_help.should_use_compilers(_linter)[source]¶
The recipe requires a compiler directly
Since version 3,
conda-build
uses a special syntax to require compilers for a given language matching the architecture for which a package is being build. Please use:requirements: build: - {{ compiler('language') }}
Where language is one of
c
,cxx
,fortran
,go
orcgo
. You can specify multiple compilers if needed.There is no need to add
libgfortran
,libgcc
, ortoolchain
to the dependencies as this will be handled by conda-build itself.- check_deps(deps)[source]¶
Execute check on recipe dependencies
Example format for deps:
{ 'setuptools': ['requirements/run', 'outputs/0/requirements/run/1'], 'compiler_cxx': ['requirements/build/0'] }
You can use the values in the list directly as
section
parameter toself.message()
.- Parameters:
deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_build_help.compilers_must_be_in_build(_linter)[source]¶
The recipe requests a compiler in a section other than build
Please move the
{{ compiler('language') }}
line into therequirements: build:
section.- check_deps(deps)[source]¶
Execute check on recipe dependencies
Example format for deps:
{ 'setuptools': ['requirements/run', 'outputs/0/requirements/run/1'], 'compiler_cxx': ['requirements/build/0'] }
You can use the values in the list directly as
section
parameter toself.message()
.- Parameters:
deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_build_help.uses_setuptools(_linter)[source]¶
The recipe uses setuptools in run depends
Most Python packages only need setuptools during installation. Check if the package really needs setuptools (e.g. because it uses pkg_resources or setuptools console scripts).
- check_recipe(recipe)[source]¶
Execute check on recipe
Override this method in subclasses, using
self.message()
to issueLintMessage
as failures are encountered.- Parameters:
recipe – The recipe under test.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_build_help.setup_py_install_args(_linter)[source]¶
The recipe uses setuptools without required arguments
Please use:
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
The parameters are required to avoid
setuptools
trying (and failing) to installcertifi
when a package this recipe requires defines entrypoints in itssetup.py
.- check_deps(deps)[source]¶
Execute check on recipe dependencies
Example format for deps:
{ 'setuptools': ['requirements/run', 'outputs/0/requirements/run/1'], 'compiler_cxx': ['requirements/build/0'] }
You can use the values in the list directly as
section
parameter toself.message()
.- Parameters:
deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_build_help.cython_must_be_in_host(_linter)[source]¶
Cython should be in the host section
Move cython to
host
:requirements: host: - cython
- check_deps(deps)[source]¶
Execute check on recipe dependencies
Example format for deps:
{ 'setuptools': ['requirements/run', 'outputs/0/requirements/run/1'], 'compiler_cxx': ['requirements/build/0'] }
You can use the values in the list directly as
section
parameter toself.message()
.- Parameters:
deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_build_help.cython_needs_compiler(_linter)[source]¶
Cython generates C code, which will need to be compiled
Add the compiler to the recipe:
requirements: build: - {{ compiler('c') }}
- check_deps(deps)[source]¶
Execute check on recipe dependencies
Example format for deps:
{ 'setuptools': ['requirements/run', 'outputs/0/requirements/run/1'], 'compiler_cxx': ['requirements/build/0'] }
You can use the values in the list directly as
section
parameter toself.message()
.- Parameters:
deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked