diff options
-rw-r--r-- | pym/portage/__init__.py | 2 | ||||
-rw-r--r-- | pym/portage/dep/__init__.py | 22 |
2 files changed, 11 insertions, 13 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 515a9a7a2..bc2eedb18 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -421,7 +421,7 @@ def abssymlink(symlink): _doebuild_manifest_exempt_depend = 0 -_testing_eapis = frozenset([]) +_testing_eapis = frozenset(["4-python"]) _deprecated_eapis = frozenset(["4_pre1", "3_pre2", "3_pre1"]) def _eapi_is_deprecated(eapi): diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 5911c8cd0..9dfb12538 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -633,7 +633,7 @@ def flatten(mylist): _usedep_re = { "0": re.compile("^(?P<prefix>[!-]?)(?P<flag>[A-Za-z0-9][A-Za-z0-9+_@-]*)(?P<default>(\(\+\)|\(\-\))?)(?P<suffix>[?=]?)$"), -# "5": re.compile("^(?P<prefix>[!-]?)(?P<flag>[A-Za-z0-9][A-Za-z0-9+_@.-]*)(?P<default>(\(\+\)|\(\-\))?)(?P<suffix>[?=]?)$"), + "4-python": re.compile("^(?P<prefix>[!-]?)(?P<flag>[A-Za-z0-9][A-Za-z0-9+_@.-]*)(?P<default>(\(\+\)|\(\-\))?)(?P<suffix>[?=]?)$"), } def _get_usedep_re(eapi): @@ -644,11 +644,10 @@ def _get_usedep_re(eapi): @return: A regular expression object that matches valid USE flags for the given eapi. If eapi is None then the latest supported EAPI is assumed. """ - return _usedep_re["0"] -# if eapi in ("0", "1", "2", "3_pre1", "3_pre2", "3", "4_pre1", "4"): -# return _usedep_re["0"] -# else: -# return _usedep_re["5"] + if eapi in ("4-python",): + return _usedep_re["4-python"] + else: + return _usedep_re["0"] class _use_dep(object): @@ -1615,15 +1614,14 @@ _atom_wildcard_re = re.compile('(?P<simple>(' + _extended_cat + ')/(' + _extende _useflag_re = { "0": re.compile(r'^[A-Za-z0-9][A-Za-z0-9+_@-]*$'), -# "5": re.compile(r'^[A-Za-z0-9][A-Za-z0-9+_@.-]*$'), + "4-python": re.compile(r'^[A-Za-z0-9][A-Za-z0-9+_@.-]*$'), } def _get_useflag_re(eapi): - return _useflag_re["0"] -# if eapi in ("0", "1", "2", "3_pre1", "3_pre2", "3", "4_pre1", "4"): -# return _useflag_re["0"] -# else: -# return _useflag_re["5"] + if eapi in ("4-python",): + return _useflag_re["4-python"] + else: + return _useflag_re["0"] def isvalidatom(atom, allow_blockers=False, allow_wildcard=False, allow_repo=False): """ |