def RCSFactory(env=env): """ """ import SCons.Warnings as W W.warn(W.DeprecatedSourceCodeWarning, """The RCS() factory is deprecated and there is no replacement.""") act = SCons.Action.Action("$RCS_COCOM", "$RCS_COCOMSTR") return SCons.Builder.Builder(action=act, env=env)
def RCSFactory(env=env): """ """ import SCons.Warnings as W W.warn( W.DeprecatedSourceCodeWarning, """The RCS() factory is deprecated and there is no replacement.""") act = SCons.Action.Action('$RCS_COCOM', '$RCS_COCOMSTR') return SCons.Builder.Builder(action=act, env=env)
def PerforceFactory(env=env): """ """ import SCons.Warnings as W W.warn( W.DeprecatedSourceCodeWarning, """The Perforce() factory is deprecated and there is no replacement.""" ) return SCons.Builder.Builder(action=PerforceAction, env=env)
def BitKeeperFactory(env=env): """ """ import SCons.Warnings as W W.warn( W.DeprecatedSourceCodeWarning, """The BitKeeper() factory is deprecated and there is no replacement.""" ) act = SCons.Action.Action("$BITKEEPERCOM", "$BITKEEPERCOMSTR") return SCons.Builder.Builder(action=act, env=env)
def SubversionFactory(repos, module="", env=env): """ """ # fail if repos is not an absolute path name? import SCons.Warnings as W W.warn(W.DeprecatedSourceCodeWarning, """The Subversion() factory is deprecated and there is no replacement.""") if module != "": module = os.path.join(module, "") act = SCons.Action.Action("$SVNCOM", "$SVNCOMSTR") return SCons.Builder.Builder(action=act, env=env, SVNREPOSITORY=repos, SVNMODULE=module)
def SubversionFactory(repos, module='', env=env): """ """ # fail if repos is not an absolute path name? import SCons.Warnings as W W.warn(W.DeprecatedSourceCodeWarning, """The Subversion() factory is deprecated and there is no replacement.""") if module != '': module = os.path.join(module, '') act = SCons.Action.Action('$SVNCOM', '$SVNCOMSTR') return SCons.Builder.Builder(action = act, env = env, SVNREPOSITORY = repos, SVNMODULE = module)
def CVSFactory(repos, module="", env=env): """ """ import SCons.Warnings as W W.warn(W.DeprecatedSourceCodeWarning, """The CVS() factory is deprecated and there is no replacement.""") # fail if repos is not an absolute path name? if module != "": # Don't use os.path.join() because the name we fetch might # be across a network and must use POSIX slashes as separators. module = module + "/" env["CVSCOM"] = "$CVS $CVSFLAGS co $CVSCOFLAGS -d ${TARGET.dir} $CVSMODULE${TARGET.posix}" act = SCons.Action.Action("$CVSCOM", "$CVSCOMSTR") return SCons.Builder.Builder(action=act, env=env, CVSREPOSITORY=repos, CVSMODULE=module)
def download(url, filename): if os.path.exists(filename): C.progress_display('Package already downloaded') return True try: urllib.urlretrieve(url, filename) return True except IOError as e: # In Python 2.x, 'urlretrieve' raises IOError upon HTTP errors, # except for some errors such as 404. Oh well. W.warn(AltaDependencyWarning, "{0}: download failed: {1}".format(url, e.strerror)) return False
def CVSFactory(repos, module='', env=env): """ """ import SCons.Warnings as W W.warn(W.DeprecatedSourceCodeWarning, """The CVS() factory is deprecated and there is no replacement.""") # fail if repos is not an absolute path name? if module != '': # Don't use os.path.join() because the name we fetch might # be across a network and must use POSIX slashes as separators. module = module + '/' env['CVSCOM'] = '$CVS $CVSFLAGS co $CVSCOFLAGS -d ${TARGET.dir} $CVSMODULE${TARGET.posix}' act = SCons.Action.Action('$CVSCOM', '$CVSCOMSTR') return SCons.Builder.Builder(action = act, env = env, CVSREPOSITORY = repos, CVSMODULE = module)
def cmake_build(rep, options = ''): os.chdir(rep) # Construct the CMake command build_dir = os.pardir + os.sep + 'build' + os.sep cmake_cmd = ['cmake', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_INSTALL_PREFIX=' + build_dir, '-DCMAKE_BUILD_TYPE=Release'] if os.name == 'nt' : cmake_cmd = cmake_cmd + ['-G', 'NMake Makefiles'] try: ret = Popen(cmake_cmd + options.split() + ['.']).wait() if ret != 0: C.progress_display('Warning: unable to configure package' + rep) os.chdir(os.pardir) return False except OSError as e: W.warn(AltaDependencyWarning, "execution of '{0}' failed: {1}".format(cmake_cmd, e.strerror)) os.chdir(os.pardir) return False # Construct the build command and run it build_cmd = [] if os.name == 'nt': build_cmd = build_cmd + ['nmake'] else: build_cmd = build_cmd + ['make'] ret = Popen(build_cmd + ['install']).wait() if ret != 0: C.progress_display('Warning: unable to build & install package ' + rep) os.chdir(os.pardir) return False os.chdir(os.pardir) return True
def PerforceFactory(env=env): """ """ import SCons.Warnings as W W.warn(W.DeprecatedSourceCodeWarning, """The Perforce() factory is deprecated and there is no replacement.""") return SCons.Builder.Builder(action = PerforceAction, env = env)
def SCCSFactory(env=env): """ """ import SCons.Warnings as W W.warn(W.DeprecatedSourceCodeWarning, """The SCCS() factory is deprecated and there is no replacement.""") act = SCons.Action.Action('$SCCSCOM', '$SCCSCOMSTR') return SCons.Builder.Builder(action = act, env = env)