summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2011-06-08 18:10:23 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2011-06-08 18:10:23 +0200
commit586760f37fb9784327d8447182d49810662f4427 (patch)
treef2ff1a48f008248c15da4f05423be4e9aae9ff48
parentc04c2543225e7089d17b4b11f5460643965ac653 (diff)
downloadportage-586760f37fb9784327d8447182d49810662f4427.tar.gz
portage-586760f37fb9784327d8447182d49810662f4427.tar.bz2
portage-586760f37fb9784327d8447182d49810662f4427.zip
Add initial support for EAPI="4-python".
-rw-r--r--pym/portage/__init__.py2
-rw-r--r--pym/portage/dep/__init__.py22
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):
"""