pisi modüllerini bir package haline getirdik...
This commit is contained in:
+8
-8
@@ -4,22 +4,22 @@
|
|||||||
# python standard library
|
# python standard library
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
|
|
||||||
import pisiconfig
|
import pisi.config
|
||||||
import util
|
import pisi.util
|
||||||
from pisibuild import PisiBuild, PisiBuildError
|
from pisi.build import PisiBuild, PisiBuildError
|
||||||
|
|
||||||
|
|
||||||
def doProgress(filename, percent, rate, symbol):
|
def doProgress(filename, percent, rate, symbol):
|
||||||
out = '\r%-30.30s %3d%% %12.2f %s' % \
|
out = '\r%-30.30s %3d%% %12.2f %s' % \
|
||||||
(pd['filename'], pd['percent'], pd['rate'], pd['symbol'])
|
(pd['filename'], pd['percent'], pd['rate'], pd['symbol'])
|
||||||
util.information(out)
|
pisi.util.information(out)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import sys
|
import sys
|
||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
# wrapper for usage(progname) function
|
# wrapper for usage(progname) function
|
||||||
help = lambda: util.usage(sys.argv[0])
|
help = lambda: pisi.util.usage(sys.argv[0])
|
||||||
|
|
||||||
# getopt magic
|
# getopt magic
|
||||||
try:
|
try:
|
||||||
@@ -47,11 +47,11 @@ def main():
|
|||||||
|
|
||||||
# doing the real job.
|
# doing the real job.
|
||||||
pb = PisiBuild(pspec)
|
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)
|
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.unpackArchive()
|
||||||
# pb.applyPatches()
|
# pb.applyPatches()
|
||||||
# pb.buildSource()
|
# pb.buildSource()
|
||||||
|
|||||||
+5
-5
@@ -1,15 +1,15 @@
|
|||||||
#! /usr/bin/python
|
#! /usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import install
|
import pisi.install
|
||||||
import util
|
import pisi.util
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import sys
|
import sys
|
||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
# wrapper for usage(progname) function
|
# wrapper for usage(progname) function
|
||||||
help = lambda: util.usage(sys.argv[0])
|
help = lambda: pisi.util.usage(sys.argv[0])
|
||||||
|
|
||||||
# getopt magic
|
# getopt magic
|
||||||
try:
|
try:
|
||||||
@@ -31,11 +31,11 @@ def main():
|
|||||||
# sequentially.
|
# sequentially.
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
help()
|
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:
|
else:
|
||||||
package_fn = args[0]
|
package_fn = args[0]
|
||||||
|
|
||||||
install.install_package_file(package_fn)
|
pisi.install.install_package_file(package_fn)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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
|
# from archive import Archive
|
||||||
# import pisipackage
|
# import pisipackage
|
||||||
import util
|
import util
|
||||||
import pisiconfig
|
import config
|
||||||
|
|
||||||
|
|
||||||
class PisiBuildError(Exception):
|
class PisiBuildError(Exception):
|
||||||
@@ -28,7 +28,7 @@ class PisiBuild:
|
|||||||
self.spec = spec
|
self.spec = spec
|
||||||
|
|
||||||
def fetchArchive(self, percentHook=None):
|
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"""
|
using fether.Fetcher"""
|
||||||
fetch = Fetcher(self.spec.archiveUri)
|
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
|
from sys import stderr
|
||||||
|
|
||||||
# pisi modules
|
# pisi modules
|
||||||
import pisiconfig
|
import config
|
||||||
import util
|
import util
|
||||||
|
|
||||||
class FetchError (Exception):
|
class FetchError (Exception):
|
||||||
@@ -20,7 +20,7 @@ class Fetcher:
|
|||||||
"""Yet another Pisi tool for fetching files from various sources.."""
|
"""Yet another Pisi tool for fetching files from various sources.."""
|
||||||
def __init__(self, uri):
|
def __init__(self, uri):
|
||||||
self.uri = uri
|
self.uri = uri
|
||||||
self.filedest = pisiconfig.archives_dir
|
self.filedest = config.archives_dir
|
||||||
util.check_dir(self.filedest)
|
util.check_dir(self.filedest)
|
||||||
self.scheme = "file"
|
self.scheme = "file"
|
||||||
self.netloc = ""
|
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