aboutsummaryrefslogtreecommitdiff
path: root/lib/jsoncpp/scons-tools/targz.py
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2011-06-03 16:25:07 +0200
committermontellese <montellese@xbmc.org>2011-06-03 16:25:07 +0200
commit3565ad579e9b80f4be57db901d3fe44d9bfac87d (patch)
tree23b7218b1aacdbd6e3299a614ce8073ae93cc86f /lib/jsoncpp/scons-tools/targz.py
parent648af1e56953eb1c9aeeebfc5826c6a828d4ebbb (diff)
parentfee62a4d040f6eb3e44e703f2f80846a6aaa57ea (diff)
replace jsoncpp with yajl (thanks topfs2)
* topfs2/remove_jsoncpp: (21 commits) Fix. Added explicit typecast to platform int to quench warnings for variant use in jsonrpc [win32] replace jsoncpp with yajl Removed jsoncpp Added pragma and license to IClient.h Removed the dependency of jsoncpp in CVariant Switched to use CVariant instead of jsoncpp values in JSON-RPC Added yajl writer for Variant Added yajl parser for Variant Added c_str and have size of variant work with strings Added check for libyajl to configure Added CVariant::type which returns the type of the current variant (easier than multiple isFoo queries) Switched Variant to use double internally, still accepts floats Added swap method to CVariant Moved to use explicit type in CVariant instead of isFoo Added operator== to CVariant Added array and map iterators to CVariant Added CVariant constructor which takes a string pointer and length Added append to CVariant Added isMember to CVariant Removed debug in CVariant ... Conflicts: Makefile.in configure.in project/VS2010Express/XBMC.vcxproj xbmc/interfaces/json-rpc/AudioLibrary.cpp xbmc/interfaces/json-rpc/FileItemHandler.cpp xbmc/interfaces/json-rpc/FileItemHandler.h xbmc/interfaces/json-rpc/VideoLibrary.cpp
Diffstat (limited to 'lib/jsoncpp/scons-tools/targz.py')
-rw-r--r--lib/jsoncpp/scons-tools/targz.py82
1 files changed, 0 insertions, 82 deletions
diff --git a/lib/jsoncpp/scons-tools/targz.py b/lib/jsoncpp/scons-tools/targz.py
deleted file mode 100644
index f5432003df..0000000000
--- a/lib/jsoncpp/scons-tools/targz.py
+++ /dev/null
@@ -1,82 +0,0 @@
-"""tarball
-
-Tool-specific initialization for tarball.
-
-"""
-
-## Commands to tackle a command based implementation:
-##to unpack on the fly...
-##gunzip < FILE.tar.gz | tar xvf -
-##to pack on the fly...
-##tar cvf - FILE-LIST | gzip -c > FILE.tar.gz
-
-import os.path
-
-import SCons.Builder
-import SCons.Node.FS
-import SCons.Util
-
-try:
- import gzip
- import tarfile
- internal_targz = 1
-except ImportError:
- internal_targz = 0
-
-TARGZ_DEFAULT_COMPRESSION_LEVEL = 9
-
-if internal_targz:
- def targz(target, source, env):
- def archive_name( path ):
- path = os.path.normpath( os.path.abspath( path ) )
- common_path = os.path.commonprefix( (base_dir, path) )
- archive_name = path[len(common_path):]
- return archive_name
-
- def visit(tar, dirname, names):
- for name in names:
- path = os.path.join(dirname, name)
- if os.path.isfile(path):
- tar.add(path, archive_name(path) )
- compression = env.get('TARGZ_COMPRESSION_LEVEL',TARGZ_DEFAULT_COMPRESSION_LEVEL)
- base_dir = os.path.normpath( env.get('TARGZ_BASEDIR', env.Dir('.')).abspath )
- target_path = str(target[0])
- fileobj = gzip.GzipFile( target_path, 'wb', compression )
- tar = tarfile.TarFile(os.path.splitext(target_path)[0], 'w', fileobj)
- for source in source:
- source_path = str(source)
- if source.isdir():
- os.path.walk(source_path, visit, tar)
- else:
- tar.add(source_path, archive_name(source_path) ) # filename, arcname
- tar.close()
-
- targzAction = SCons.Action.Action(targz, varlist=['TARGZ_COMPRESSION_LEVEL','TARGZ_BASEDIR'])
-
- def makeBuilder( emitter = None ):
- return SCons.Builder.Builder(action = SCons.Action.Action('$TARGZ_COM', '$TARGZ_COMSTR'),
- source_factory = SCons.Node.FS.Entry,
- source_scanner = SCons.Defaults.DirScanner,
- suffix = '$TARGZ_SUFFIX',
- multi = 1)
- TarGzBuilder = makeBuilder()
-
- def generate(env):
- """Add Builders and construction variables for zip to an Environment.
- The following environnement variables may be set:
- TARGZ_COMPRESSION_LEVEL: integer, [0-9]. 0: no compression, 9: best compression (same as gzip compression level).
- TARGZ_BASEDIR: base-directory used to determine archive name (this allow archive name to be relative
- to something other than top-dir).
- """
- env['BUILDERS']['TarGz'] = TarGzBuilder
- env['TARGZ_COM'] = targzAction
- env['TARGZ_COMPRESSION_LEVEL'] = TARGZ_DEFAULT_COMPRESSION_LEVEL # range 0-9
- env['TARGZ_SUFFIX'] = '.tar.gz'
- env['TARGZ_BASEDIR'] = env.Dir('.') # Sources archive name are made relative to that directory.
-else:
- def generate(env):
- pass
-
-
-def exists(env):
- return internal_targz