This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients alexjc, dstufft, gilgamezh, gracinet, jgosmann, mathieui, mehaase, thomas.nyberg, vinay.sajip, vstinner
Date 2017-01-12.20:36:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484253412.85.0.83434365588.issue24875@psf.upfronthosting.co.za>
In-reply-to
Content
It seems simpler to do it all in EnvBuilder.create:

    def create(self, env_dir):
        """
        Create a virtual environment in a directory.

        :param env_dir: The target directory to create an environment in.

        """
        env_dir = os.path.abspath(env_dir)
        context = self.ensure_directories(env_dir)
        # See issue 24875. We need system_site_packages to be False
        # until after pip is installed.
        true_system_site_packages = self.system_site_packages
        self.system_site_packages = False
        self.create_configuration(context)
        self.setup_python(context)
        if self.with_pip:
            self._setup_pip(context)
        if not self.upgrade:
            self.setup_scripts(context)
            self.post_setup(context)
        if true_system_site_packages:
            # We had set it to False before, now
            # restore it and rewrite the configuration
            self.system_site_packages = True
            self.create_configuration(context)

Can you patch that in and see if it works for you?
History
Date User Action Args
2017-01-12 20:36:52vinay.sajipsetrecipients: + vinay.sajip, vstinner, mathieui, dstufft, jgosmann, gilgamezh, gracinet, alexjc, thomas.nyberg, mehaase
2017-01-12 20:36:52vinay.sajipsetmessageid: <1484253412.85.0.83434365588.issue24875@psf.upfronthosting.co.za>
2017-01-12 20:36:52vinay.sajiplinkissue24875 messages
2017-01-12 20:36:52vinay.sajipcreate