Exemplo n.º 1
0
    def install(self, install_dependencies):
        distribution = Release(name=self.name, version=self.version)
        distribution.extras = self.extras.copy()

        # Create a fake egg-info to make setuptools entry points works
        # if the package is a dependency.
        install_path = self.context.get_install_path(distribution)
        if not os.path.isdir(install_path):
            os.makedirs(install_path)
        write_egg_info(distribution, package_path=install_path)

        # Package path is now the installed path
        distribution.path = install_path
        distribution.package_path = install_path
        return distribution, self
Exemplo n.º 2
0
    def install(self, path):
        egg_info = self.configuration['egginfo']
        manifest_url = egg_info['manifest'].as_file()
        files = Paths(verify=False)
        files.listdir(self.distribution.package_path)
        prefixes = []
        if 'source' in egg_info:
            prefixes = [egg_info['source'].as_text()]
        for filename, info in files.as_manifest(*parse_manifest(manifest_url),
                                                 prefixes=prefixes):
            install_file(info['full'], os.path.join(path, filename))

        # XXX This needs review
        # if self.distribution.extensions:
        #     builder.install(
        #         self.distribution, install_path, self.interpretor)

        write_egg_info(self.distribution, package_path=path)
Exemplo n.º 3
0
 def run(self):
     # This line load the package to return it (and write its EGG-INFO).
     write_egg_info(self.session.configuration.utilities.package)
     self.session.need_reconfigure()
     return False