* actions -> actions.py

* kod içerisinde sihirli sabitler kullanmak yerine context.Constants'ı güncelemek
gerekir.
* bir takım indent hatası giderildi
This commit is contained in:
Barış Metin
2005-06-16 18:11:12 +00:00
parent 0ee4b856dd
commit 0ca62028af
3 changed files with 17 additions and 12 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ class PisiBuild:
self.applyPatches() self.applyPatches()
try: try:
self.actionScript = open(os.path.dirname(self.ctx.pspecfile ) + '/' + 'actions').read() specdir = os.path.dirname(self.ctx.pspecfile)
self.actionScript = open("/".join([specdir,self.ctx.const.actions_file])).read()
except IOError, e: except IOError, e:
ui.error ("Action Script: %s\n" % e) ui.error ("Action Script: %s\n" % e)
return return
+4
View File
@@ -34,6 +34,10 @@ class Constants:
self.c.build_work_dir_suffix = "/work" self.c.build_work_dir_suffix = "/work"
self.c.build_install_dir_suffix = "/install" self.c.build_install_dir_suffix = "/install"
# file/directory names
self.c.actions_file = "actions.py"
self.c.files_dir = "files"
def __getattr__(self, attr): def __getattr__(self, attr):
return getattr(self.c, attr) return getattr(self.c, attr)