Ejemplo n.º 1
0
    def install_scons(self):
        os.chdir(eiffel_loop_home_dir)
        if not environ.command_exists(["scons", "-v"], shell=True):
            scons_package = ZIP_SOFTWARE_PACKAGE(
                "http://freefr.dl.sourceforge.net/project/scons/scons/2.2.0/scons-2.2.0.zip"
            )
            scons_package.extract_all(package.download_dir)

            scons_name = path.basename(scons_package.url)

            os.chdir(path.splitext(scons_name)[0])
            install_scons_cmd = ["python", "setup.py", "install", "--standard-lib"]
            print install_scons_cmd
            if subprocess.call(install_scons_cmd) == 0:
                file_util.copy_file(path.join(python_home_dir, r"Scripts\scons.py"), python_home_dir)
                dir_util.remove_tree(scons_name[0])
            else:
                print "ERROR: scons installation failed"
Ejemplo n.º 2
0
	def install_scons (self):
		if not environ.command_exists (['scons', '-v'], shell = True):
			scons_package = ZIP_SOFTWARE_PACKAGE ('http://www.eiffel-loop.com/download/scons-2.2.0.zip')
			scons_package.extract_all (package.download_dir)

			scons_name = path.basename (scons_package.url)
			package_dir = path.join (package.download_dir, path.splitext (scons_name)[0])

			os.chdir (package_dir)

			install_scons_cmd = ['python', 'setup.py', 'install', '--standard-lib']
			print install_scons_cmd
			if subprocess.call (install_scons_cmd) == 0:
				file_util.copy_file (path.join (python_home_dir, r'Scripts\scons.py'), python_home_dir)
				os.chdir (package.download_dir) # change to parent to prevent a permission problem when removing
				dir_util.remove_tree (package_dir)
			else:
				print 'ERROR: scons installation failed'
Ejemplo n.º 3
0
    def install_scons(self):
        os.chdir(eiffel_loop_home_dir)
        if not environ.command_exists(['scons', '-v'], shell=True):
            scons_package = ZIP_SOFTWARE_PACKAGE(
                'http://freefr.dl.sourceforge.net/project/scons/scons/2.2.0/scons-2.2.0.zip'
            )
            scons_package.extract_all(package.download_dir)

            scons_name = path.basename(scons_package.url)

            os.chdir(path.splitext(scons_name)[0])
            install_scons_cmd = [
                'python', 'setup.py', 'install', '--standard-lib'
            ]
            print install_scons_cmd
            if subprocess.call(install_scons_cmd) == 0:
                file_util.copy_file(
                    path.join(python_home_dir, r'Scripts\scons.py'),
                    python_home_dir)
                dir_util.remove_tree(scons_name[0])
            else:
                print 'ERROR: scons installation failed'
Ejemplo n.º 4
0
def get (target, source, env):
	subst_variables = platform_variables ()
	
	# Scons builder action to extract targets from sources
	packages = {}
	for i in range (0, len (source)):
		print 'source [%s]' % i, source [i]
		url, member_name = source_url_and_member_name (str (source [i]), subst_variables)
		if url in packages:
			package = packages [url]
		else:
			extension = path.splitext (url)[1]
			if extension == ".zip":
				package = ZIP_SOFTWARE_PACKAGE (url)
			elif extension == ".deb":
				package = DEBIAN_SOFTWARE_PACKAGE (url)
			else:
				print 'ERROR invalid extension "%s"' % extension
			packages [url] = package
		
		package.append (str (target [i]), member_name)

	for package in packages.values():
		package.extract ()