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

should_be_noarch_generic(_linter)

The recipe should be build as noarch

should_be_noarch_python(_linter)

The recipe should be build as noarch

should_not_be_noarch_compiler(_linter)

The recipe uses a compiler but is marked noarch

should_not_be_noarch_skip(_linter)

The recipe uses skip: True but is marked noarch

should_not_be_noarch_source(_linter)

The recipe uses per platform sources and cannot be noarch

should_not_use_skip_python(_linter)

The recipe should be noarch and not use python based skipping

Documentation

class bioconda_utils.lint.check_noarch.should_be_noarch_generic(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

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.

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 to self.message().

Parameters

deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.

fix(_message, _data)[source]

Attempt to fix the problem

class bioconda_utils.lint.check_noarch.should_be_noarch_python(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

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 to self.message().

Parameters

deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.

fix(_message, _data)[source]

Attempt to fix the problem

class bioconda_utils.lint.check_noarch.should_not_be_noarch_compiler(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

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 to self.message().

Parameters

deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.

class bioconda_utils.lint.check_noarch.should_not_be_noarch_skip(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

The recipe uses skip: True but is marked noarch

Recipes marked as noarch cannot use skip.

check_recipe(recipe)[source]

Execute check on recipe

Override this method in subclasses, using self.message() to issue LintMessage as failures are encountered.

Parameters

recipe – The recipe under test.

class bioconda_utils.lint.check_noarch.should_not_be_noarch_source(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

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 or source/0 (1,2,3…).

class bioconda_utils.lint.check_noarch.should_not_use_skip_python(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

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 be noarch 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 to self.message().

Parameters

deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.