tests dizinine ihtiyaç yok.
Birazdan unittest lerimiz gelecek...
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
|
|
||||||
import sys
|
|
||||||
sys.path.append("..")
|
|
||||||
sys.path.append(".")
|
|
||||||
|
|
||||||
from pisi import archive
|
|
||||||
from pisi import specfile
|
|
||||||
|
|
||||||
spec = specfile.SpecFile()
|
|
||||||
spec.read(sys.argv[1])
|
|
||||||
|
|
||||||
print "unpacking file: %s" % spec.archiveName
|
|
||||||
|
|
||||||
a = archive.Archive(spec.archiveType, spec.archiveName)
|
|
||||||
a.unpack()
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# mkdir /var/tmp/pisi/cache
|
|
||||||
# ./fetch_file file:///etc/passwd
|
|
||||||
# ./fetch http://cekirdek.uludag.org.tr/~meren/Imagi.mp3
|
|
||||||
# ./fetch_file ftp://ftp.uludag.org.tr/pub/md5summer.exe
|
|
||||||
# ls /var/tmp/pisi/cache
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from sys import stderr
|
|
||||||
sys.path.append("..")
|
|
||||||
from pisi import fetcher
|
|
||||||
import pisi.config
|
|
||||||
|
|
||||||
def doProgress(pd):
|
|
||||||
out = '\r%-30.30s %3d%% %12.2f %s' % \
|
|
||||||
(pd['filename'], pd['percent'], pd['rate'], pd['symbol'])
|
|
||||||
stderr.write(out)
|
|
||||||
stderr.flush()
|
|
||||||
|
|
||||||
if len(sys.argv) == 2:
|
|
||||||
obj = fetcher.Fetcher(sys.argv[1])
|
|
||||||
obj.percentHook = doProgress
|
|
||||||
saved_file = obj.fetch()
|
|
||||||
if saved_file:
|
|
||||||
print "File saved: %s" % (saved_file)
|
|
||||||
else:
|
|
||||||
print """
|
|
||||||
fetcher.py için test uygulaması.. Parametre olarak verilen URI'deki dosyayı '%s' hedefine kaydeder..
|
|
||||||
|
|
||||||
Örnek:
|
|
||||||
|
|
||||||
./fetch_file file:///etc/passwd
|
|
||||||
./fetch_file http://cekirdek.uludag.org.tr/~meren/Imagi.mp3
|
|
||||||
./fetch_file ftp://ftp.uludag.org.tr/pub/md5summer.exe
|
|
||||||
|
|
||||||
""" % (pisi.config.archives_dir)
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# ./getTextForNode ../../popt/popt.pspec PSPEC/Source/Name
|
|
||||||
|
|
||||||
import sys
|
|
||||||
sys.path.append("..")
|
|
||||||
from pisi import specfile
|
|
||||||
|
|
||||||
s = specfile.SpecFile()
|
|
||||||
s.read(sys.argv[1])
|
|
||||||
|
|
||||||
print "PSPEC/Source/Name", s.sourceName
|
|
||||||
|
|
||||||
print "* patches"
|
|
||||||
for patch in s.patches:
|
|
||||||
print "\tpatch fn:", patch.filename
|
|
||||||
print "\tpatch ct:", patch.compressionType
|
|
||||||
|
|
||||||
print "* buildDeps"
|
|
||||||
for dep in s.buildDeps:
|
|
||||||
print "\tdep nm:", dep.package
|
|
||||||
print "\tdep vf:", dep.versionFrom
|
|
||||||
|
|
||||||
print "* packages"
|
|
||||||
for package in s.packages:
|
|
||||||
print "\tPackage", package.name
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user