Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

install dependencies for couchbase server 2.0

dependnecies.json file now support mac osx 10.7
  • Loading branch information...
commit 905a0536f5bbf3cc944e64ccefa1b275650b0331 0 parents
Farshid Ghods authored
17 README.md
@@ -0,0 +1,17 @@
+couchbase-build-dependencies
+
+usage :
+
+python ./install-deps.py -i /opt/couchbase -t /tmp/
+
+this tool detects which operating system the user runs this tool on and finds the best
+match based on the projects listed in the dependencies.json file
+
+by default this tool downloads the dependencies from web location but if you
+want to override the web location with local directory you can use -d option
+
+all the dependencies are built with /opt/couchbase as prefix
+
+for each dependencies you will also find a build-* file which describes the steps that
+the build engineer or developers need to follow in order to generate those binaries from
+the source code.
41 build-curl.txt
@@ -0,0 +1,41 @@
+* mac 64-bit 10.7
+curl -O http://curl.haxx.se/download/curl-7.21.4.tar.gz
+tar -xvf curl-7.21.4.tar.gz
+cd curl-7.21.4
+./configure --prefix=/opt/couchbase --without-ssl --disable-shared --disable-ldap --disable-ldaps --without-libidn
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+
+* centos 64-bit 5
+wget http://curl.haxx.se/download/curl-7.21.4.tar.gz
+tar -xvf curl-7.21.4.tar.gz
+cd curl-7.21.4
+wget https://github.com/downloads/libevent/libevent/libevent-2.0.11-stable.tar.gz
+./configure --prefix=/opt/couchbase --disable-openssl
+disable-ldaps --without-libidn
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+tar -zcvf centos-5-x86-64-curl-7.21.4.tar.gz /opt/couchbase/
+* centos 32-bit 5
+disable-ldaps --without-libidn
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+tar -zcvf centos-5-x86-curl-7.21.4.tar.gz /opt/couchbase/
+* ubuntu 64-bit 10.04
+disable-ldaps --without-libidn
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+tar -zcvf ubuntu-10-04-x86-64-curl-7.21.4.tar.gz /opt/couchbase/
+* ubuntu 32-bit 10.04
+disable-ldaps --without-libidn
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+tar -zcvf ubuntu-10-04-x86-curl-7.21.4.tar.gz /opt/couchbase/
+* windows 64-bit
+curl -O http://curl.haxx.se/download/curl-7.21.4.tar.gz
+tar -xvf curl-7.21.4.tar.gz
+cd curl-7.21.4
+./configure --prefix=/opt/couchbase --without-ssl --disable-shared --disable-ldap --disable-ldaps --without-libidn
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+tar -zcvf win-2k8-x86-64-curl-7.21.4.tar.gz /opt/couchbase/
50 build-gperftools.txt
@@ -0,0 +1,50 @@
+* mac 64-bit 10.7
+wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
+tar -xvf gperftools-2.0.tar.gz
+cd gperftools-2.0
+./configure --prefix=/opt/couchbase --disable-static --enable-minimal CXXFLAGS=-DTCMALLOC_SMALL_BUT_SLOW
+make libtcmalloc_minimal.la
+make install-exec-am install-data-am
+tar -zcvf mac-10-07-x86-64-gperftools-2.0.tar.gz /opt/couchbase/
+* centos 64-bit 5
+wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
+tar -xvf gperftools-2.0.tar.gz
+cd gperftools-2.0
+./configure --prefix=/opt/couchbase --disable-static --enable-minimal CXXFLAGS=-DTCMALLOC_SMALL_BUT_SLOW
+make libtcmalloc_minimal.la
+make install-exec-am install-data-am
+tar -zcvf centos-5-x86-64-gperftools-2.0.tar.gz /opt/couchbase/
+* centos 32-bit 5
+wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
+tar -xvf gperftools-2.0.tar.gz
+cd gperftools-2.0
+./configure --prefix=/opt/couchbase --disable-static --enable-minimal CXXFLAGS=-DTCMALLOC_SMALL_BUT_SLOW
+make libtcmalloc_minimal.la
+make install-exec-am install-data-am
+tar -zcvf centos-5-x86-64-gperftools-2.0.tar.gz /opt/couchbase/
+* ubuntu 64-bit 10.04
+wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
+tar -xvf gperftools-2.0.tar.gz
+cd gperftools-2.0
+./configure --prefix=/opt/couchbase --disable-static --enable-minimal CXXFLAGS=-DTCMALLOC_SMALL_BUT_SLOW
+make libtcmalloc_minimal.la
+make install-exec-am install-data-am
+tar -zcvf ubuntu-10-04-x86-64-gperftools-2.0.tar.gz /opt/couchbase/
+* ubuntu 32-bit 10.04
+wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
+tar -xvf gperftools-2.0.tar.gz
+cd gperftools-2.0
+./configure --prefix=/opt/couchbase --disable-static --enable-minimal CXXFLAGS=-DTCMALLOC_SMALL_BUT_SLOW
+make libtcmalloc_minimal.la
+make install-exec-am install-data-am
+tar -zcvf ubuntu-10-04-x86-gperftools-2.0.tar.gz /opt/couchbase/
+* windows 64-bit 2008
+curl -O http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
+tar -xvf gperftools-2.0.tar.gz
+cd gperftools-2.0
+./configure --prefix=/opt/couchbase --disable-static --enable-minimal CXXFLAGS=-DTCMALLOC_SMALL_BUT_SLOW
+make libtcmalloc_minimal.la
+make install-exec-am install-data-am
+tar -zcvf ubuntu-10-04-x86-gperftools-2.0.tar.gz /opt/couchbase/
+
+
7 build-icu4c.txt
@@ -0,0 +1,7 @@
+* mac 64-bit
+git clone git://github.com/couchbase/icu4c
+cd icu4c
+cd source && ./configure "--prefix=/opt/couchbase
+cd ..
+make -C source install
+tar -zcvf centos-10-7-x86-64-icu4c-894be7.tar.gz /opt/couchbase/
44 build-libevent.txt
@@ -0,0 +1,44 @@
+* mac 64-bit 10.7
+./configure --prefix=/opt/couchbase --disable-openssl
+make
+make install
+* centos 64-bit 5
+wget https://github.com/downloads/libevent/libevent/libevent-2.0.11-stable.tar.gz
+tar -xvf libevent-2.0.11-stable.tar.gz
+cd libevent-2.0.11-stable
+./configure --prefix=/opt/couchbase --disable-openssl
+make
+make install
+tar -zcvf centos-5-x86-64-libevent-2.0.11-stable.tar.gz /opt/couchbase/
+* centos 32-bit 5
+wget https://github.com/downloads/libevent/libevent/libevent-2.0.11-stable.tar.gz
+tar -xvf libevent-2.0.11-stable.tar.gz
+cd libevent-2.0.11-stable
+./configure --prefix=/opt/couchbase --disable-openssl
+make
+make install
+tar -zcvf centos-5-x86-libevent-2.0.11-stable.tar.gz /opt/couchbase/
+* ubuntu 64-bit 10.04
+wget https://github.com/downloads/libevent/libevent/libevent-2.0.11-stable.tar.gz
+tar -xvf libevent-2.0.11-stable.tar.gz
+cd libevent-2.0.11-stable
+./configure --prefix=/opt/couchbase --disable-openssl
+make
+make install
+tar -zcvf ubuntu-10-04-x86-64-libevent-2.0.11-stable.tar.gz /opt/couchbase/
+* ubuntu 32-bit 10.04
+wget https://github.com/downloads/libevent/libevent/libevent-2.0.11-stable.tar.gz
+tar -xvf libevent-2.0.11-stable.tar.gz
+cd libevent-2.0.11-stable
+./configure --prefix=/opt/couchbase --disable-openssl
+make
+make install
+tar -zcvf ubuntu-10-04-x86-libevent-2.0.11-stable.tar.gz /opt/couchbase/
+* windows 64-bit 2k8
+wget https://github.com/downloads/libevent/libevent/libevent-2.0.11-stable.tar.gz
+tar -xvf libevent-2.0.11-stable.tar.gz
+cd libevent-2.0.11-stable
+./configure --prefix=/opt/couchbase --disable-openssl
+make
+make install
+tar -zcvf win-sk8-x86-64-libevent-2.0.11-stable.tar.gz /opt/couchbase/
50 build-otp.txt
@@ -0,0 +1,50 @@
+* mac 64-bit 10.7
+
+git apply 0001-disable-usage-of-futex-syscall.patch
+git apply otp_R14B02-ssl-server.patch
+LD_RUN_PATH=/opt/couchbase/lib ./otp_build autoconf
+touch lib/wx/SKIP lib/megaco/SKIP
+LD_RUN_PATH=/opt/couchbase/lib ./configure --prefix=/opt/couchbase --enable-smp-support \
+ --disable-hipe --disable-fp-exceptions --enable-darwin-64bit CFLAGS="-O2 -g -DNO_JUMP_TABLE"
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+* centos 64-bit 5
+git apply otp_R14B02-64bit.patch || true
+git apply 0001-disable-usage-of-futex-syscall.patch
+git apply otp_R14B02-ssl-server.patch
+LD_RUN_PATH=/opt/couchbase/lib ./otp_build autoconf \
+touch lib/wx/SKIP lib/megaco/SKIP
+LD_RUN_PATH=/opt/couchbase/lib ./configure --prefix=/opt/couchbase --enable-smp-support \
+ --disable-hipe --disable-fp-exceptions --enable-darwin-64bit CFLAGS="-O2 -g -DNO_JUMP_TABLE"
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+* centos 32-bit 5
+git apply otp_R14B02-64bit.patch || true
+git apply 0001-disable-usage-of-futex-syscall.patch
+git apply otp_R14B02-ssl-server.patch
+LD_RUN_PATH=/opt/couchbase/lib ./otp_build autoconf \
+touch lib/wx/SKIP lib/megaco/SKIP
+LD_RUN_PATH=/opt/couchbase/lib ./configure --prefix=/opt/couchbase --enable-smp-support \
+ --disable-hipe --disable-fp-exceptions --enable-darwin-64bit CFLAGS="-O2 -g -DNO_JUMP_TABLE"
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+* ubuntu 64-bit 10.04
+git apply otp_R14B02-64bit.patch || true
+git apply 0001-disable-usage-of-futex-syscall.patch
+git apply otp_R14B02-ssl-server.patch
+LD_RUN_PATH=/opt/couchbase/lib ./otp_build autoconf \
+touch lib/wx/SKIP lib/megaco/SKIP
+LD_RUN_PATH=/opt/couchbase/lib ./configure --prefix=/opt/couchbase --enable-smp-support \
+ --disable-hipe --disable-fp-exceptions --enable-darwin-64bit CFLAGS="-O2 -g -DNO_JUMP_TABLE"
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
+* ubuntu 32-bit 10.04
+git apply otp_R14B02-64bit.patch || true
+git apply 0001-disable-usage-of-futex-syscall.patch
+git apply otp_R14B02-ssl-server.patch
+LD_RUN_PATH=/opt/couchbase/lib ./otp_build autoconf \
+touch lib/wx/SKIP lib/megaco/SKIP
+LD_RUN_PATH=/opt/couchbase/lib ./configure --prefix=/opt/couchbase --enable-smp-support \
+ --disable-hipe --disable-fp-exceptions --enable-darwin-64bit CFLAGS="-O2 -g -DNO_JUMP_TABLE"
+LD_RUN_PATH=/opt/couchbase/lib make
+LD_RUN_PATH=/opt/couchbase/lib make install
5 build-pysqlite.txt
@@ -0,0 +1,5 @@
+* centos 64-bit
+mkdir -p /opt/couchbase/lib/python
+python2.6 setup.py config -I /opt/couchbase/include -L /opt/couchbase/lib build
+cd build/lib* && tar czf pysqlite2.tar pysqlite2
+mv pysqlite2.tar /opt/couchbase/lib/python
29 build-snappy.txt
@@ -0,0 +1,29 @@
+* mac 64-bit 10.7
+git clone git://github.com/couchbase/snappy
+cd snappy
+git reset --hard 5681dde156e9d07adbeeab79666c9a9d7a10ec95
+./configure --prefix=/opt/couchbase
+make LDFLAGS=" -no-undefined"
+make install
+tar -zcvf tar -zcvf centos-5-x86-64-snappy-894be7.tar.gz /opt/couchbase/
+* centos 64-bit 5
+git clone git://github.com/couchbase/snappy
+cd snappy
+git reset --hard 5681dde156e9d07adbeeab79666c9a9d7a10ec95
+./configure --prefix=/opt/couchbase
+make LDFLAGS=" -no-undefined"
+make install
+tar -zcvf tar -zcvf centos-5-x86-64-snappy-894be7.tar.gz /opt/couchbase/
+* centos 32-bit 5
+./configure --prefix=/opt/couchbase
+make LDFLAGS=" -no-undefined"
+make install
+* ubuntu 64-bit 10.04
+./configure --prefix=/opt/couchbase
+make LDFLAGS=" -no-undefined"
+make install
+* ubuntu 32-bit 10.04
+./configure --prefix=/opt/couchbase
+make LDFLAGS=" -no-undefined"
+make install
+
7 build-v8.txt
@@ -0,0 +1,7 @@
+git clone git://github.com/couchbase/v8
+git checkout 3.9.7
+scons -j 8 arch=x86_64 mode=release snapshot=on library=shared visibility=default
+cp libv8.* /opt/couchbase/lib
+cp include/* /opt/couchbase/include
+echo "447decb75060a106131ab4de934bcc374648e7f2" > /opt/couchbase/lib/libv8.ver
+tar -zcvf centos-5-x86-64-curl-7.21.4.tar.gz /opt/couchbase/
0  build.otp.txt
No changes.
176 dependencyutil.py
@@ -0,0 +1,176 @@
+import platform
+import json
+import shutil
+import urllib
+import tarfile
+import os
+
+class FileUtil(object):
+
+ @staticmethod
+ def does_it_exist(path):
+ try:
+ open(path)
+ return True
+ except IOError as e:
+ return False
+
+class ConsoleLogger(object):
+ @staticmethod
+ def info(sth):
+ print('info - %s' % (sth))
+
+ @staticmethod
+ def error(sth):
+ print('error - %s' % (sth))
+
+ @staticmethod
+ def give_up():
+ exit()
+
+
+class DependenyResolver(object):
+ __dependencies = None
+ __depot_type = None
+ __depot_location = None
+ __dependency_iterator = None
+ __manifest = None
+
+ def __init__(self, manifest, depot_base):
+ # parse the manifest file , then populate
+ # the file names based on the target operating system
+ # then return an iterator which can be invoked by the
+ # caller to download each dependency and extract them
+ # parse the manifest file
+ # get the operating system information
+ self.__manifest = manifest
+ self.__depot_location = depot_base
+ if self.__depot_location :
+ if self.__depot_location.startswith('http'):
+ self.__depot_type = 'http'
+ else:
+ self.__depot_type = 'file'
+
+
+ # create a string ${name}-${tag}-${os}.tar.gz
+ # then create a iterable list and add these dependencies there
+
+
+
+ # parse the manifest file and return list of dependencies
+
+ def resolve(self):
+ self.__dependencies = self._parse_dependencies(open(self.__manifest).read())
+ dependencies = []
+ projects = self.__dependencies['projects']
+ for name in projects:
+ dependencies.append({'name':name,
+ 'binary':projects[name]['binary']})
+ ConsoleLogger.info(dependencies)
+ return dependencies
+
+
+ def _get_os_info(self):
+ # info has 'arch', 'os', 'distribution' and 'version'
+ info = {}
+ info['arch'] = platform.machine()
+ os_string = platform.platform().lower()
+ if os_string.startswith('darwin') and os_string.find('x86_64') >= 0:
+ info['os'] = 'mac'
+ info['arch'] = 'x86_64'
+ elif os_string.startswith('linux'):
+ info['os'] = 'linux'
+ if os_string.find('i686') >= 0:
+ info['arch'] = 'x86'
+ elif os_string.find('x86_64') >= 0:
+ info['arch'] = 'x86_64'
+ if os_string.find('ubuntu') >= 0:
+ info['distribution'] = 'ubuntu'
+ elif os_string.find('redhat') >= 0:
+ info['distribution'] = 'redhat'
+ elif os_string.startswith('cygwin'):
+ info['os'] = 'windows'
+ if os_string.find('32-bit') >= 0:
+ info['arch'] = 'x86'
+ elif os_string.find('WOW64') >= 0:
+ info['arch'] = 'x86_64'
+ return info
+
+
+ def download(self, dependency, destination):
+ ConsoleLogger.info('downloading from %s' % (self.__depot_location))
+ ConsoleLogger.info('downloading %s to %s' % (dependency['binary'],
+ destination))
+ if self.__depot_type == 'http':
+ return self._download_web(dependency, destination)
+ elif self.__depot_type == 'file':
+ return self._download_local(dependency, destination)
+ else:
+ return None
+
+ def _download_web(self, dependency, destination):
+ url = '%s/%s' % (self.__depot_location, dependency['binary'])
+ web = urllib.urlopen(url)
+ target = '%s/%s' % (destination, dependency['binary'])
+ local = open(target, 'w')
+ ConsoleLogger.info('downloading %s' % (url))
+ local.write(web.read())
+ web.close()
+ local.close()
+ return target
+
+ def _download_local(self, dependency, destination):
+ #copy the file from dependency['path'] to destination
+ # check if the file exists
+ source = '%s/%s' % (self.__depot_location, dependency['binary'])
+ target = '%s/%s' % (destination, dependency['binary'])
+ shutil.copyfile(source, target)
+ return target
+
+
+ def _extract_mac(self, file, destination):
+ ConsoleLogger.info('extracting %s to %s' % (file, destination))
+ os.chdir(destination)
+ tar = tarfile.open(file)
+ tar.extractall()
+ tar.close()
+
+ def _extract_windows(self, file, destination):
+ # use zip command
+ pass
+
+ def _extract_linux(self, file, destination):
+ # use zip command
+ pass
+
+ def extract(self, dependency, destination):
+ machine = self._get_os_info()
+ if machine['os'] == 'mac':
+ self._extract_mac(dependency, destination)
+ elif machine['os'] == 'windows':
+ self._extract_windows(dependency, destination)
+ elif machine['os'] == 'linux':
+ self._extract_linux(dependency, destination)
+ #extract the dependency to the target location
+ else:
+ #raise NotSupportedPlatformException()
+ return None
+
+ def _parse_dependencies(self, dependencies):
+ os_info = self._get_os_info()
+ dj = json.loads(dependencies)
+ #if os and arch match and we can't find a version
+ #match let's use that
+ best_match = None
+ for d in dj:
+ os_match = d['os'] == os_info['os']
+ version_match = 'version' in os_info and (d['version'] == os_info['version'])
+ arch_match = d['arch'] == os_info['arch']
+ if os_match and arch_match:
+ best_match = d
+ if version_match:
+ return d
+ return best_match
+
+
+
52 install-deps.py
@@ -0,0 +1,52 @@
+# usage install-dependencies.py --manifest=abc.xml --depot-location=.... --target=... --install=...
+
+import sys
+from optparse import OptionParser
+from dependencyutil import DependenyResolver, FileUtil, ConsoleLogger
+
+def give_up():
+ sys.exit()
+
+
+parser = OptionParser()
+
+parser.add_option('-m', '--manifest', dest='manifest',
+ default='dependencies.json',
+ help='manifest file for all dependencies')
+
+parser.add_option('-d', '--depot', dest='depot',
+ default='http://builds.hq.northscale.net/dependencies/couchbase-server-2.0/',
+ help='depot location')
+parser.add_option('-t', '--target', dest='target',
+ help='download depenencies to this location')
+parser.add_option('-i', '--install', dest='install',
+ default='/opt/couchbase',
+ help='extract the dependencies into this folder ( default = /opt/couchbase')
+
+options, args = parser.parse_args()
+
+if not options.manifest:
+ ConsoleLogger.error('you need to specify the manifest file via -m option , e.g -m dependencies.xml')
+ parser.print_help()
+ give_up()
+
+if not FileUtil.does_it_exist(options.manifest):
+ ConsoleLogger.error('specified manifest : %s does not exist' % (options.manifest))
+ give_up()
+
+if not options.depot:
+ ConsoleLogger.info('depot location (-d) is not specified , choosing the default')
+ options.depot = 'http://...'
+ give_up()
+
+if not options.target:
+ default_target = '' # working directory/dependencies
+ ConsoleLogger.info('target location is not specified , choosing the default to %s' %
+ ( default_target))
+ options.target = default_target
+
+resolver = DependenyResolver(options.manifest, options.depot)
+dependencyIter = resolver.resolve()
+for dependency in dependencyIter:
+ downloaded = resolver.download(dependency, options.target)
+ resolver.extract(downloaded, options.install)
1  tests/__init__.py
@@ -0,0 +1 @@
+__author__ = 'farshid'
101 tests/test-dependencies.json
@@ -0,0 +1,101 @@
+[
+ {
+ "os":"mac",
+ "arch":"x86_64",
+ "versions":["10.7"],
+ "projects":{
+ "otp":{
+ "source":"git://github.com/erlang/otp",
+ "revision":"OTP_R14B04",
+ "url":"https://github.com/erlang/otp/archive/OTP_R14B04.tar.gz",
+ "binary":"mac-10-7-x86-64-otp-OTP_R14B04.tar.gz"
+ },
+ "icu4c":{
+ "source":"git://github.com/couchbase/",
+ "revision":"26359393672c378f41f2103a8699c4357c894be7",
+ "binary":"mac-10-7-x86-64-icu4c-894be7.tar.gz"
+ },
+ "snappy":{
+ "source":"git://github.com/couchbase/",
+ "revision":"5681dde156e9d07adbeeab79666c9a9d7a10ec95",
+ "binary":"mac-10-7-x86-64-snappy-894be7.tar.gz"
+ },
+ "v8":{
+ "source":"git://github.com/couchbase/v8",
+ "revision":"3.9.7",
+ "url":"https://github.com/couchbase/v8/archive/3.9.7.tar.gz",
+ "binary":"mac-10-7-x86-64-v8-3.9.7.tar.gz"
+ },
+ "gperftools":{
+ "source":"http://gperftools.googlecode.com/files/",
+ "url":"http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz",
+ "revision":"2.0",
+ "binary":"mac-10-7-x86-64-gperftools-2.0.tar.gz"
+ },
+ "curl":{
+ "source":"http://curl.haxx.se/download/",
+ "url":"http://curl.haxx.se/download/curl-7.21.4.tar.gz",
+ "revision":"7.21.4",
+ "binary":"mac-10-7-x86-64-curl-7.28.1.tar.gz"
+ },
+ "libevent":{
+ "source":"https://github.com/downloads/libevent/libevent/",
+ "url":"https://github.com/downloads/libevent/libevent/libevent-2.0.11-stable.tar.gz",
+ "revision":"2.0.11-stable",
+ "binary":"mac-10-7-x86-64-libevent-2.0.11-stable.tar.gz"
+ }
+ }
+ },
+ {
+ "os":"centos",
+ "arch":"x86_64",
+ "versions":["5"],
+ "projects":{
+ "otp":{
+ "source":"git://github.com/erlang/otp",
+ "revision":"OTP_R14B04",
+ "url":"https://github.com/erlang/otp/archive/OTP_R14B04.tar.gz",
+ "binary":"centos-7-x86-64-otp-OTP_R14B04.tar.gz"
+ },
+ "icu4c":{
+ "source":"git://github.com/couchbase/",
+ "revision":"26359393672c378f41f2103a8699c4357c894be7",
+ "binary":"centos-7-x86-64-icu4c-894be7.tar.gz"
+ },
+ "snappy":{
+ "source":"git://github.com/couchbase/",
+ "revision":"5681dde156e9d07adbeeab79666c9a9d7a10ec95",
+ "binary":"centos-7-x86-64-snappy-894be7.tar.gz"
+ },
+ "v8":{
+ "source":"git://github.com/couchbase/v8",
+ "revision":"3.9.7",
+ "url":"https://github.com/couchbase/v8/archive/3.9.7.tar.gz",
+ "binary":"centos-7-x86-64-v8-3.9.7.tar.gz"
+ },
+ "pysqlite":{
+ "source":"git://github.com/couchbase/",
+ "revision":"0ff6e32ea05037fddef1eb41a648f2a2141009ea",
+ "binary":"centos-7-x86-64-pysqlite-009ea.tar.gz"
+ },
+ "gperftools":{
+ "source":"http://gperftools.googlecode.com/files/",
+ "url":"http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz",
+ "revision":"2.0",
+ "binary":"centos-7-x86-64-gperftools-2.0.tar.gz"
+ },
+ "curl":{
+ "source":"http://curl.haxx.se/download/",
+ "url":"http://curl.haxx.se/download/curl-7.21.4.tar.gz",
+ "revision":"7.21.4",
+ "binary":"centos-7-x86-64-curl-7.28.1.tar.gz"
+ },
+ "libevent":{
+ "source":"https://github.com/downloads/libevent/libevent/",
+ "url":"https://github.com/downloads/libevent/libevent/libevent-2.0.11-stable.tar.gz",
+ "revision":"2.0.11-stable",
+ "binary":"centos-7-x86-64-libevent-2.0.11-stable.tar.gz"
+ }
+ }
+ }
+]
26 tests/tests.py
@@ -0,0 +1,26 @@
+import sys
+import unittest
+import tempfile
+
+sys.path.append("../")
+import os
+from dependencyutil import DependenyResolver, ConsoleLogger
+
+
+class DependencyResolverTest(unittest.TestCase):
+
+ def test_basic(self):
+ manifest = 'test-dependencies.json'
+ depot_location = '/space/2013'
+ temp_location1 = tempfile.mkdtemp()
+ temp_location2 = tempfile.mkdtemp()
+ dr = DependenyResolver(manifest, depot_location)
+ ds = dr.resolve()
+ #create a temp folder
+ os.tmpfile()
+ for d in ds:
+ downloaded = dr.download(d,temp_location1)
+ extracted = dr.extract(downloaded,temp_location2)
+ ConsoleLogger.info(downloaded)
+ ConsoleLogger.info(extracted)
+
Please sign in to comment.
Something went wrong with that request. Please try again.