* get pisi to run except an ImportError: no module named actionsapi. How to fix that?
This commit is contained in:
@@ -9,6 +9,7 @@ from optparse import OptionParser
|
|||||||
sys.path.append("./lib")
|
sys.path.append("./lib")
|
||||||
import pisi.install
|
import pisi.install
|
||||||
import pisi.util
|
import pisi.util
|
||||||
|
from pisi.build import PisiBuild, PisiBuildError
|
||||||
|
|
||||||
class ArgError(Exception):
|
class ArgError(Exception):
|
||||||
pass
|
pass
|
||||||
@@ -40,6 +41,35 @@ def main():
|
|||||||
|
|
||||||
cmd = args.pop(0)
|
cmd = args.pop(0)
|
||||||
|
|
||||||
|
if cmd=="build":
|
||||||
|
|
||||||
|
usage = "usage: %prog build <pspecfile>"
|
||||||
|
cparser = OptionParser(usage=usage,version="%prog " + pisi.__version__)
|
||||||
|
(coptions, cargs) = parser.parse_args(args)
|
||||||
|
|
||||||
|
print '*', cargs
|
||||||
|
|
||||||
|
# pspec(PISI Spec) to be used for package
|
||||||
|
pspec = ""
|
||||||
|
|
||||||
|
# TODO: We accept only one pspec file (at a time) currently,
|
||||||
|
# but pisi-build may build many packages (pspecs given in order)
|
||||||
|
# sequentially.
|
||||||
|
if len(cargs) != 1:
|
||||||
|
print "build expects one (and only one) pspec file currently"
|
||||||
|
print usage
|
||||||
|
sys.exit(2)
|
||||||
|
else:
|
||||||
|
pspec = cargs[0]
|
||||||
|
|
||||||
|
# What we need to do first is create a context with our specfile
|
||||||
|
ctx = pisi.context.Context(pspec)
|
||||||
|
|
||||||
|
# don't do the real job here. this is just a CLI!
|
||||||
|
pb = PisiBuild(ctx)
|
||||||
|
pb.build()
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
if cmd=="install":
|
if cmd=="install":
|
||||||
|
|
||||||
usage = "usage: %prog install <package>"
|
usage = "usage: %prog install <package>"
|
||||||
@@ -58,6 +88,11 @@ def main():
|
|||||||
package_fn = args[0]
|
package_fn = args[0]
|
||||||
|
|
||||||
pisi.install.install_package_file(package_fn)
|
pisi.install.install_package_file(package_fn)
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
print "command expected"
|
||||||
|
print usage
|
||||||
|
sys.exit(2)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
+2
-1
@@ -3,10 +3,11 @@
|
|||||||
|
|
||||||
# python standard library
|
# python standard library
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.append("./lib")
|
||||||
import pisi.context
|
import pisi.context
|
||||||
import pisi.util
|
import pisi.util
|
||||||
import pisi.ui
|
|
||||||
from pisi.build import PisiBuild, PisiBuildError
|
from pisi.build import PisiBuild, PisiBuildError
|
||||||
|
|
||||||
def usage(progname = "pisi-build"):
|
def usage(progname = "pisi-build"):
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
|
sys.path.append("./lib")
|
||||||
import pisi.install
|
import pisi.install
|
||||||
import pisi.util
|
import pisi.util
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
# python standard library
|
# python standard library
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from fetcher import Fetcher
|
from fetcher import Fetcher
|
||||||
from archive import Archive
|
from archive import Archive
|
||||||
|
|||||||
Reference in New Issue
Block a user