actions API'a text değişken göndermek için en makul yol ENVIRONMENT tanımlamak.

This commit is contained in:
Barış Metin
2005-06-24 13:11:41 +00:00
parent ad1622df52
commit 9eccf1b2c2
+10 -1
View File
@@ -56,7 +56,16 @@ class PisiBuild:
curDir = os.getcwd()
locals = globals = {}
# put the evironment variables for actions API to use.
evn = {
"PKG_DIR": self.ctx.pkg_dir(),
"WORK_DIR": self.ctx.pkg_work_dir(),
"INSTALL_DIR": self.ctx.pkg_install_dir(),
"SRC_NAME": self.spec.source.name,
"SRC_VERSION": self.spec.source.version
}
os.environ.update(evn)
try:
exec compile(self.actionScript , "error", "exec") in locals,globals
except SyntaxError, e: