config öldü, yaşasın Context
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@
|
|||||||
# python standard library
|
# python standard library
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
|
|
||||||
import pisi.config
|
import pisi.context
|
||||||
import pisi.util
|
import pisi.util
|
||||||
import pisi.ui
|
import pisi.ui
|
||||||
from pisi.build import PisiBuild, PisiBuildError
|
from pisi.build import PisiBuild, PisiBuildError
|
||||||
@@ -47,7 +47,7 @@ def main():
|
|||||||
pspec = args[0]
|
pspec = args[0]
|
||||||
|
|
||||||
# What we need to do first is create a context with our specfile
|
# What we need to do first is create a context with our specfile
|
||||||
ctx = pisi.config.Context(pspec)
|
ctx = pisi.context.Context(pspec)
|
||||||
|
|
||||||
# don't do the real job here. this is just a CLI!
|
# don't do the real job here. this is just a CLI!
|
||||||
pb = PisiBuild(ctx)
|
pb = PisiBuild(ctx)
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
import os,sys
|
import os,sys
|
||||||
|
|
||||||
#sys.path.append('..')
|
#sys.path.append('..')
|
||||||
import pisi.config
|
from pisi.context import Context
|
||||||
|
|
||||||
def libtoolize():
|
def libtoolize():
|
||||||
''' FIXME: Düzgün hale getirilecek '''
|
''' FIXME: Düzgün hale getirilecek '''
|
||||||
''' patch source with ltmain patches '''
|
''' patch source with ltmain patches '''
|
||||||
|
|
||||||
os.system( 'patch -sN < ' + pisi.config.lib_dir() + '/portage-1.4.1.patch' )
|
# no need to create a context for calling static functions
|
||||||
os.system( 'patch -sN < ' + pisi.config.lib_dir() + '/sed-1.4.0.patch' )
|
# currently staticmethods doesn't work in Contex but this function isn't used to ;)
|
||||||
|
os.system( 'patch -sN < ' + Context.lib_dir() + '/portage-1.4.1.patch' )
|
||||||
|
os.system( 'patch -sN < ' + Context.lib_dir() + '/sed-1.4.0.patch' )
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ from os.path import basename, islink
|
|||||||
from pisi import archive
|
from pisi import archive
|
||||||
from pisi import fetcher
|
from pisi import fetcher
|
||||||
from pisi import util
|
from pisi import util
|
||||||
from pisi import config
|
from pisi import context
|
||||||
|
|
||||||
class ArchiveFileTestCase(unittest.TestCase):
|
class ArchiveFileTestCase(unittest.TestCase):
|
||||||
# def setUp(self):
|
# def setUp(self):
|
||||||
# pass
|
# pass
|
||||||
|
|
||||||
def testUnpackTar(self):
|
def testUnpackTar(self):
|
||||||
ctx = config.Context("samples/popt.pspec")
|
ctx = context.Context("samples/popt.pspec")
|
||||||
|
|
||||||
targetDir = ctx.build_work_dir()
|
targetDir = ctx.build_work_dir()
|
||||||
achv = archive.Archive(ctx)
|
achv = archive.Archive(ctx)
|
||||||
@@ -35,7 +35,7 @@ class ArchiveFileTestCase(unittest.TestCase):
|
|||||||
"171545adab7b51ebf6ec5575d3000a95")
|
"171545adab7b51ebf6ec5575d3000a95")
|
||||||
|
|
||||||
def testUnpackZip(self):
|
def testUnpackZip(self):
|
||||||
ctx = config.Context("samples/sandbox.pspec")
|
ctx = context.Context("samples/sandbox.pspec")
|
||||||
fetch = fetcher.Fetcher(ctx)
|
fetch = fetcher.Fetcher(ctx)
|
||||||
fetch.fetch()
|
fetch.fetch()
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import os
|
|||||||
|
|
||||||
from pisi import fetcher
|
from pisi import fetcher
|
||||||
from pisi import util
|
from pisi import util
|
||||||
from pisi import config
|
from pisi import context
|
||||||
|
|
||||||
class FetcherTestCase(unittest.TestCase):
|
class FetcherTestCase(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ctx = config.Context("samples/popt.pspec")
|
self.ctx = context.Context("samples/popt.pspec")
|
||||||
|
|
||||||
self.fetch = fetcher.Fetcher(self.ctx)
|
self.fetch = fetcher.Fetcher(self.ctx)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user