Exemplo n.º 1
0
    def run(self):
        if HAS_SETUPTOOLS:
            # PLUGINS is added by egg_info
            return _install_egg_info.run(self)
        # creating the egg.info file
        target = self.target
        if os.path.isdir(self.target) and not os.path.islink(self.target):
            dir_util.remove_tree(self.target, dry_run=self.dry_run)
        elif os.path.exists(self.target):
            self.execute(os.unlink, (self.target, ), "Removing " + self.target)
        if not self.dry_run:
            self._ensure_directory(self.target)

        # creating the target directory
        os.mkdir(self.target)

        # creating the PKG-INFO file
        pkg_info = os.path.join(self.target, 'PKG-INFO')
        f = open(pkg_info, 'w')
        try:
            self.distribution.metadata.write_pkg_file(f)
        finally:
            f.close()

        self._add_plugins()
Exemplo n.º 2
0
    def run(self):
        install_egg_info.run(self)

        for f in CMakeInstallEggInfo.files:
            print('Adding "{}"...'.format(f))
            self.outputs.append(f)

        # read the install manifest from CMake
        for tmpdir, libdir in CMakeInstallEggInfo.dirs.items():
            for manifest in [
                    'install_manifest.txt', 'install_manifest_development.txt',
                    'install_manifest_python.txt'
            ]:
                fname = os.path.join(tmpdir, manifest)
                if not os.path.exists(fname):
                    continue
                f = open(fname, 'r')
                if libdir[len(libdir) - 1] != '/':
                    libdir += '/'
                for l in f.read().splitlines():
                    b = l.replace(libdir, '')
                    f = os.path.join(self.install_dir, b)
                    #print ('Adding "{}"...'.format(f))
                    self.outputs.append(f)
Exemplo n.º 3
0
 def run(self):
     if not dry_run:
         _install_egg_info.run(self)
     else:
         print("skipping regular install_egg_info")
Exemplo n.º 4
0
    def run(self):
        install_egg_info.run(self)

        filepath = '%s/installed-files.txt' % self.target
        with open(filepath, "w") as f:
            f.write("../%s\n" % pth_file)
Exemplo n.º 5
0
 def run(self):
     if "build" in self.distribution.command_obj:
         build_command = self.distribution.command_obj["build"]
         self.source = os.path.join(build_command.build_base,
                                    os.path.basename(self.source))
     install_egg_info.run(self)
Exemplo n.º 6
0
    def run(self):
        install_egg_info.run(self)

        filepath = '%s/installed-files.txt' % self.target
        with open(filepath, "w") as f:
            f.write("../%s\n" % pth_file)
Exemplo n.º 7
0
 def run(self):
     install_egg_info.run(self)
     setup_pil_stub('install_egg_info')