check_noarch¶
Use of noarch
and skip
When to use noarch
and when to use skip
or pin the interpreter
is non-intuitive and idiosynractic due to conda
legacy
behavior. These checks aim at getting the right settings.
Classes
|
The recipe should be build as |
|
The recipe should be build as |
|
The recipe uses a compiler but is marked noarch |
|
The recipe uses |
|
The recipe uses per platform sources and cannot be noarch |
|
The recipe should be noarch and not use python based skipping |
Documentation
- class bioconda_utils.lint.check_noarch.should_be_noarch_python(_linter)[source]¶
The recipe should be build as
noarch
Please add:
build: noarch: python
Python packages that don’t require a compiler to build are normally architecture independent and go into the
noarch
subset of packages.- 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_noarch.should_be_noarch_generic(_linter)[source]¶
The recipe should be build as
noarch
Please add:
build: noarch: generic
Packages that don’t require a compiler to build are normally architecture independent and go into the
noarch
subset of packages.- requires: List[LintCheck] = ['should_be_noarch_python']¶
Checks that must have passed for this check to be executed.
- 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_noarch.should_not_be_noarch_compiler(_linter)[source]¶
The recipe uses a compiler but is marked noarch
Recipes using a compiler should not be marked noarch.
Please remove the
build: noarch:
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_noarch.should_not_be_noarch_skip(_linter)[source]¶
The recipe uses
skip: True
but is marked noarchRecipes marked as
noarch
cannot use skip.- 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_noarch.should_not_use_skip_python(_linter)[source]¶
The recipe should be noarch and not use python based skipping
Please use:
requirements: build: - python >3 # or <3 run: - python >3 # or <3
The
build: skip: True
feature only works as expected for packages built specifically for each “platform” (i.e. Python version and OS). This package should benoarch
and not use skips.- 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_noarch.should_not_be_noarch_source(_linter)[source]¶
The recipe uses per platform sources and cannot be noarch
You are downloading different upstream sources for each platform. Remove the noarch section or use just one source for all platforms.
- check_source(source, section)[source]¶
Execute check on each source
- Parameters:
source – Dictionary containing the source section
section – Path to the section. Can be
source
orsource/0
(1,2,3…).
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked