Çekirdeğe attığım e-posta ile ilgili önerim bu. Recursive problem yaşamamak için fonksiyon isimlerinin başına src_* prefix'ini bu amaçla eklemiştim. src_* mantıklı bir önek. Sonuçta actions.py içinde yaptığımız şey src ile uğraşmak. Şahsi tercihim isimlendirmeye takılmamak ve böyle bırakmak. Aksi görüşünüz varsa, üzerinde konuşmak isterim.
This commit is contained in:
+3
-3
@@ -39,9 +39,9 @@ class Constants:
|
|||||||
self.c.files_dir = "files"
|
self.c.files_dir = "files"
|
||||||
|
|
||||||
# functions in actions_file
|
# functions in actions_file
|
||||||
self.c.setup_func = "setup"
|
self.c.setup_func = "src_setup"
|
||||||
self.c.build_func = "build"
|
self.c.build_func = "src_build"
|
||||||
self.c.install_func = "install"
|
self.c.install_func = "src_install"
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return getattr(self.c, attr)
|
return getattr(self.c, attr)
|
||||||
|
|||||||
+13
-10
@@ -1,17 +1,20 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import pisi.actionsapi.gnuconfig as gnuconfig
|
#import pisi.actionsapi.gnuconfig as gnuconfig
|
||||||
import pisi.actionsapi.libtoolize as libtoolize
|
#import pisi.actionsapi.libtoolize as libtoolize
|
||||||
import pisi.actionsapi.autotools as autotools
|
#import pisi.actionsapi.autotools as autotools
|
||||||
|
|
||||||
def setup():
|
from pisi.actionsapi.gnuconfig import *
|
||||||
gnuconfig.gnuconfig_update()
|
from pisi.actionsapi.autotools import *
|
||||||
|
|
||||||
|
def src_setup():
|
||||||
|
gnuconfig_update()
|
||||||
# libtoolize.libtoolize()
|
# libtoolize.libtoolize()
|
||||||
autotools.configure( '--with-nls' )
|
configure( '--with-nls' )
|
||||||
|
|
||||||
def build():
|
def src_build():
|
||||||
autotools.make()
|
make()
|
||||||
|
|
||||||
def install():
|
def src_install():
|
||||||
autotools.install()
|
install()
|
||||||
|
|||||||
Reference in New Issue
Block a user