portage.eapi module

portage.eapi._decorate_eapi_funcs()

Decorate eapi_* functions so that they use _get_eapi_attrs(eapi) to cache results.

class portage.eapi._eapi_attrs(allows_package_provided, bdepend, broot, dots_in_PN, dots_in_use_flags, exports_AA, exports_EBUILD_PHASE_FUNC, exports_ECLASSDIR, exports_KV, exports_merge_type, exports_PORTDIR, exports_replace_vars, feature_flag_test, idepend, iuse_defaults, iuse_effective, posixish_locale, path_variables_end_with_trailing_slash, prefix, repo_deps, required_use, required_use_at_most_one_of, selective_src_uri_restriction, slot_operator, slot_deps, src_uri_arrows, strong_blocks, use_deps, use_dep_defaults, empty_groups_always_true, sysroot)

Bases: tuple

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('allows_package_provided', 'bdepend', 'broot', 'dots_in_PN', 'dots_in_use_flags', 'exports_AA', 'exports_EBUILD_PHASE_FUNC', 'exports_ECLASSDIR', 'exports_KV', 'exports_merge_type', 'exports_PORTDIR', 'exports_replace_vars', 'feature_flag_test', 'idepend', 'iuse_defaults', 'iuse_effective', 'posixish_locale', 'path_variables_end_with_trailing_slash', 'prefix', 'repo_deps', 'required_use', 'required_use_at_most_one_of', 'selective_src_uri_restriction', 'slot_operator', 'slot_deps', 'src_uri_arrows', 'strong_blocks', 'use_deps', 'use_dep_defaults', 'empty_groups_always_true', 'sysroot')
classmethod _make(iterable)

Make a new _eapi_attrs object from a sequence or iterable

_replace(**kwds)

Return a new _eapi_attrs object replacing specified fields with new values

allows_package_provided

Alias for field number 0

bdepend

Alias for field number 1

broot

Alias for field number 2

count(value, /)

Return number of occurrences of value.

dots_in_PN

Alias for field number 3

dots_in_use_flags

Alias for field number 4

empty_groups_always_true

Alias for field number 29

exports_AA

Alias for field number 5

exports_EBUILD_PHASE_FUNC

Alias for field number 6

exports_ECLASSDIR

Alias for field number 7

exports_KV

Alias for field number 8

exports_PORTDIR

Alias for field number 10

exports_merge_type

Alias for field number 9

exports_replace_vars

Alias for field number 11

feature_flag_test

Alias for field number 12

idepend

Alias for field number 13

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

iuse_defaults

Alias for field number 14

iuse_effective

Alias for field number 15

path_variables_end_with_trailing_slash

Alias for field number 17

posixish_locale

Alias for field number 16

prefix

Alias for field number 18

repo_deps

Alias for field number 19

required_use

Alias for field number 20

required_use_at_most_one_of

Alias for field number 21

selective_src_uri_restriction

Alias for field number 22

slot_deps

Alias for field number 24

slot_operator

Alias for field number 23

src_uri_arrows

Alias for field number 25

strong_blocks

Alias for field number 26

sysroot

Alias for field number 30

use_dep_defaults

Alias for field number 28

use_deps

Alias for field number 27

portage.eapi._eapi_func_decorator(func, attr_getter)
portage.eapi._get_eapi_attrs(eapi)

When eapi is None then validation is not as strict, since we want the same to work for multiple EAPIs that may have slightly different rules. An unsupported eapi is handled the same as when eapi is None, which may be helpful for handling of corrupt EAPI metadata in essential functions such as pkgsplit.

portage.eapi.eapi_allows_directories_on_profile_level_and_repository_level(eapi)
portage.eapi.eapi_allows_dots_in_PN(eapi)
portage.eapi.eapi_allows_dots_in_use_flags(eapi)
portage.eapi.eapi_allows_package_provided(eapi)
portage.eapi.eapi_empty_groups_always_true(eapi)
portage.eapi.eapi_exports_AA(eapi)
portage.eapi.eapi_exports_EBUILD_PHASE_FUNC(eapi)
portage.eapi.eapi_exports_ECLASSDIR(eapi)
portage.eapi.eapi_exports_KV(eapi)
portage.eapi.eapi_exports_PORTDIR(eapi)
portage.eapi.eapi_exports_REPOSITORY(eapi)
portage.eapi.eapi_exports_merge_type(eapi)
portage.eapi.eapi_exports_replace_vars(eapi)
portage.eapi.eapi_has_automatic_unpack_dependencies(eapi)
portage.eapi.eapi_has_bdepend(eapi)
portage.eapi.eapi_has_broot(eapi)
portage.eapi.eapi_has_dosed_dohard(eapi)
portage.eapi.eapi_has_idepend(eapi)
portage.eapi.eapi_has_implicit_rdepend(eapi)
portage.eapi.eapi_has_iuse_defaults(eapi)
portage.eapi.eapi_has_iuse_effective(eapi)
portage.eapi.eapi_has_pkg_pretend(eapi)
portage.eapi.eapi_has_repo_deps(eapi)
portage.eapi.eapi_has_required_use(eapi)
portage.eapi.eapi_has_required_use_at_most_one_of(eapi)
portage.eapi.eapi_has_selective_src_uri_restriction(eapi)
portage.eapi.eapi_has_slot_deps(eapi)
portage.eapi.eapi_has_slot_operator(eapi)
portage.eapi.eapi_has_src_prepare_and_src_configure(eapi)
portage.eapi.eapi_has_src_uri_arrows(eapi)
portage.eapi.eapi_has_strong_blocks(eapi)
portage.eapi.eapi_has_sysroot(eapi)
portage.eapi.eapi_has_use_aliases(eapi)
portage.eapi.eapi_has_use_dep_defaults(eapi)
portage.eapi.eapi_has_use_deps(eapi)
portage.eapi.eapi_path_variables_end_with_trailing_slash(eapi)
portage.eapi.eapi_requires_posixish_locale(eapi)
portage.eapi.eapi_supports_prefix(eapi)
portage.eapi.eapi_supports_stable_use_forcing_and_masking(eapi)