def __enter__(self):
        if self.patch is None:
            created_links = self.created_links
            original_method = InstallRequirement.run_egg_info
            shared_directory = self.config.eggs_cache

            def run_egg_info_wrapper(self, *args, **kw):
                # Heads up: self is an `InstallRequirement' object here!
                link_name = os.path.join(self.source_dir, '.eggs')
                try:
                    logger.debug("Creating symbolic link: %s -> %s", link_name, shared_directory)
                    os.symlink(shared_directory, link_name)
                    if created_links is not None:
                        created_links.append(link_name)
                except Exception as e:
                    # Always log the failure, but only include a traceback if
                    # it looks like symbolic links should be supported on the
                    # current platform (os.symlink() is available).
                    logger.debug("Failed to create symbolic link! (continuing without)",
                                 exc_info=not isinstance(e, AttributeError))
                # Execute the real run_egg_info() method.
                return original_method(self, *args, **kw)

            # Install the wrapper method for the duration of the context manager.
            self.patch = PatchedAttribute(InstallRequirement, 'run_egg_info', run_egg_info_wrapper)
            self.patch.__enter__()
Returns command of process.
dataset/ETHPy150Open paylogic/pip-accel/pip_accel/__init__.py/SetupRequiresPatch.__enter__--crossover with--dataset/ETHPy150Open spotify/luigi/luigi/lock.py/getpcmd