import optparse
import os
-# for an explanation on this logic, see pym/_emerge/__init__.py
-from os import environ as ose
-from os import path as osp
-if ose.__contains__("PORTAGE_PYTHONPATH"):
- sys.path.insert(0, ose["PORTAGE_PYTHONPATH"])
-else:
- sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp. realpath(__file__))), "pym"))
-
description = "See the ebuild(1) man page for more info"
usage = "Usage: ebuild <ebuild file> <command> [command] ..."
parser = optparse.OptionParser(description=description, usage=usage)
os.environ["FEATURES"] = os.environ.get("FEATURES", "") + " -noauto"
os.environ["PORTAGE_CALLER"]="ebuild"
+# for an explanation on this logic, see pym/_emerge/__init__.py
+from os import environ as ose
+from os import path as osp
+if ose.__contains__("PORTAGE_PYTHONPATH"):
+ sys.path.insert(0, ose["PORTAGE_PYTHONPATH"])
+else:
+ sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp. realpath(__file__))), "pym"))
+import portage
from portage import os