Implement get.ARCH()
* pisi/actionsapi/get.py: Add ARCH() for getting host architecture. Thanks to 64-bit team for pointing out this requirement.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2010-01-12 Ozan Çağlayan <ozan@pardus.org.tr>
|
||||
* pisi/actionsapi/get.py: Add ARCH() for getting host architecture.
|
||||
Thanks to 64-bit team for pointing out this requirement.
|
||||
|
||||
2010-01-04 Ozan Çağlayan <ozan@pardus.org.tr>
|
||||
* pisi/actionsapi/shelltools.py (unlink): Support glob patterns in
|
||||
unlink().
|
||||
|
||||
@@ -33,6 +33,7 @@ class BinutilsError(pisi.actionsapi.Error):
|
||||
# Globals
|
||||
env = pisi.actionsapi.variables.glb.env
|
||||
dirs = pisi.actionsapi.variables.glb.dirs
|
||||
generals = pisi.actionsapi.variables.glb.generals
|
||||
|
||||
def curDIR():
|
||||
'''returns current work directory's path'''
|
||||
@@ -91,6 +92,9 @@ def srcDIR():
|
||||
|
||||
# Build Related Functions
|
||||
|
||||
def ARCH():
|
||||
return generals.architecture
|
||||
|
||||
def HOST():
|
||||
return env.host
|
||||
|
||||
|
||||
@@ -89,6 +89,13 @@ class Dirs:
|
||||
self.kde = self.values.dirs.kde_dir
|
||||
self.qt = self.values.dirs.qt_dir
|
||||
|
||||
class Generals:
|
||||
'''General informations from /etc/pisi/pisi.conf'''
|
||||
|
||||
def __init__(self):
|
||||
self.values = ctx.config.values
|
||||
self.architecture = self.values.general.architecture
|
||||
|
||||
|
||||
# As we import this module from build.py, we can't init glb as a
|
||||
# singleton here. Or else Python will bug us with NoneType errors
|
||||
@@ -103,4 +110,5 @@ def initVariables():
|
||||
global glb
|
||||
ctx.env = Env()
|
||||
ctx.dirs = Dirs()
|
||||
ctx.generals = Generals()
|
||||
glb = ctx
|
||||
|
||||
Reference in New Issue
Block a user