pisi modüllerini bir package haline getirdik...
This commit is contained in:
+8
-8
@@ -4,22 +4,22 @@
|
||||
# python standard library
|
||||
from os.path import basename
|
||||
|
||||
import pisiconfig
|
||||
import util
|
||||
from pisibuild import PisiBuild, PisiBuildError
|
||||
import pisi.config
|
||||
import pisi.util
|
||||
from pisi.build import PisiBuild, PisiBuildError
|
||||
|
||||
|
||||
def doProgress(filename, percent, rate, symbol):
|
||||
out = '\r%-30.30s %3d%% %12.2f %s' % \
|
||||
(pd['filename'], pd['percent'], pd['rate'], pd['symbol'])
|
||||
util.information(out)
|
||||
pisi.util.information(out)
|
||||
|
||||
def main():
|
||||
import sys
|
||||
import getopt
|
||||
|
||||
# wrapper for usage(progname) function
|
||||
help = lambda: util.usage(sys.argv[0])
|
||||
help = lambda: pisi.util.usage(sys.argv[0])
|
||||
|
||||
# getopt magic
|
||||
try:
|
||||
@@ -47,11 +47,11 @@ def main():
|
||||
|
||||
# doing the real job.
|
||||
pb = PisiBuild(pspec)
|
||||
util.information("Building PISI source package: %s\n" % pb.spec.sourceName)
|
||||
pisi.util.information("Building PISI source package: %s\n" % pb.spec.sourceName)
|
||||
|
||||
util.information("Fetching source from: %s (be patient)\n" % pb.spec.archiveUri)
|
||||
pisi.util.information("Fetching source from: %s (be patient)\n" % pb.spec.archiveUri)
|
||||
pb.fetchArchive(doProgress)
|
||||
util.information("Source archive is stored: %s/%s\n" %(pisiconfig.archives_dir, pb.archiveName))
|
||||
pisi.util.information("Source archive is stored: %s/%s\n" %(pisi.config.archives_dir, pb.archiveName))
|
||||
# pb.unpackArchive()
|
||||
# pb.applyPatches()
|
||||
# pb.buildSource()
|
||||
|
||||
+5
-5
@@ -1,15 +1,15 @@
|
||||
#! /usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import install
|
||||
import util
|
||||
import pisi.install
|
||||
import pisi.util
|
||||
|
||||
def main():
|
||||
import sys
|
||||
import getopt
|
||||
|
||||
# wrapper for usage(progname) function
|
||||
help = lambda: util.usage(sys.argv[0])
|
||||
help = lambda: pisi.util.usage(sys.argv[0])
|
||||
|
||||
# getopt magic
|
||||
try:
|
||||
@@ -31,11 +31,11 @@ def main():
|
||||
# sequentially.
|
||||
if len(args) != 1:
|
||||
help()
|
||||
raise util.ArgError, "pisi-install expects one (and only one) package file currently"
|
||||
raise pisi.util.ArgError, "pisi-install expects one (and only one) package file currently"
|
||||
else:
|
||||
package_fn = args[0]
|
||||
|
||||
install.install_package_file(package_fn)
|
||||
pisi.install.install_package_file(package_fn)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
# PISI package version
|
||||
__version__ = "0.1"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ from fetcher import Fetcher
|
||||
# from archive import Archive
|
||||
# import pisipackage
|
||||
import util
|
||||
import pisiconfig
|
||||
import config
|
||||
|
||||
|
||||
class PisiBuildError(Exception):
|
||||
@@ -28,7 +28,7 @@ class PisiBuild:
|
||||
self.spec = spec
|
||||
|
||||
def fetchArchive(self, percentHook=None):
|
||||
"""fetch an archive and store to pisiconfig.archives_dir
|
||||
"""fetch an archive and store to pisi.config.archives_dir
|
||||
using fether.Fetcher"""
|
||||
fetch = Fetcher(self.spec.archiveUri)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Executable → Regular
+2
-2
@@ -10,7 +10,7 @@ from sys import exit
|
||||
from sys import stderr
|
||||
|
||||
# pisi modules
|
||||
import pisiconfig
|
||||
import config
|
||||
import util
|
||||
|
||||
class FetchError (Exception):
|
||||
@@ -20,7 +20,7 @@ class Fetcher:
|
||||
"""Yet another Pisi tool for fetching files from various sources.."""
|
||||
def __init__(self, uri):
|
||||
self.uri = uri
|
||||
self.filedest = pisiconfig.archives_dir
|
||||
self.filedest = config.archives_dir
|
||||
util.check_dir(self.filedest)
|
||||
self.scheme = "file"
|
||||
self.netloc = ""
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user