From dfe6c1208a100e0699a9ccff6262009675559635 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 8 Oct 2009 23:13:10 -0600 Subject: [PATCH] IGN:... --- setup/build_environment.py | 9 ++++++--- setup/installer/__init__.py | 13 ++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/setup/build_environment.py b/setup/build_environment.py index a2ad7b6c31..052bbf05ac 100644 --- a/setup/build_environment.py +++ b/setup/build_environment.py @@ -11,7 +11,7 @@ from distutils.spawn import find_executable from PyQt4 import pyqtconfig -from setup import isosx, iswindows +from setup import isosx, iswindows, islinux OSX_SDK = '/Developer/SDKs/MacOSX10.5.sdk' if not os.path.exists(OSX_SDK): @@ -213,12 +213,15 @@ def get_ip_address(ifname): )[20:24]) try: - HOST=get_ip_address('eth0') + if islinux: + HOST=get_ip_address('eth0') + else: + HOST='192.168.1.2' except: try: HOST=get_ip_address('wlan0') except: - HOST='unknown' + HOST='192.168.1.2' PROJECT=os.path.basename(os.path.abspath('.')) diff --git a/setup/installer/__init__.py b/setup/installer/__init__.py index a406dbc005..99e7586aa3 100644 --- a/setup/installer/__init__.py +++ b/setup/installer/__init__.py @@ -19,12 +19,12 @@ class Rsync(Command): '--exclude src/calibre/manual --exclude src/calibre/trac ' '--exclude .bzr --exclude .build --exclude .svn --exclude build --exclude dist ' '--exclude "*.pyc" --exclude "*.pyo" --exclude "*.swp" --exclude "*.swo" ' - 'rsync://{host}/work/{project} . ') + 'rsync://{host}/work/{project} ..') def run(self, opts): cmd = self.SYNC_CMD.format(host=HOST, project=PROJECT) - self.info(self.SYNC_CMD) - subprocess.check_call(self.SYNC_CMD, shell=True) + self.info(cmd) + subprocess.check_call(cmd, shell=True) class VMInstaller(Command): @@ -41,10 +41,9 @@ class VMInstaller(Command): BUILD_CMD = 'ssh -t %s bash build-calibre' BUILD_PREFIX = ['#!/bin/bash', 'export CALIBRE_BUILDBOT=1'] - BUILD_RSYNC = [r'cd ~/build', Rsync.SYNC_CMD] - BUILD_CLEAN = ['cd ~/build/{project} ', - 'rm -rf dist/* build/* src/calibre/plugins/*'] - BUILD_BUILD = ['python setup.py build',] + BUILD_RSYNC = [r'cd ~/build/{project}', Rsync.SYNC_CMD] + BUILD_CLEAN = ['rm -rf dist/* build/* src/calibre/plugins/*'] + BUILD_BUILD = ['python setup.py build',] def add_options(self, parser): if not parser.has_option('--dont-shutdown'):