Skip to content

Allow to use non-bundled versions of other projects #580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Arfrever opened this issue Mar 16, 2014 · 5 comments
Closed

Allow to use non-bundled versions of other projects #580

Arfrever opened this issue Mar 16, 2014 · 5 comments

Comments

@Arfrever
Copy link

It would be nice if virtualenv could use non-bundled versions of other projects (i.e. PIP and Setuptools) and, when they are not found, fall back to wheels in virtualenv_support directory.

Some tests of another project use virtualenv, and fail in some configuration without a custom fix in urllib3, which is bundled by requests, which is bundled by PIP, which is bundled by virtualenv :( .

@Ivoz
Copy link

Ivoz commented Mar 17, 2014

i.e downloading setuptools and pip by default? I disagree with this, as that would make setting up virtualenvs take way too long. I myself often make temporary ones to test things and having it download 3mb of packages by default every time would be insufferable to me.

Some tests of another project use virtualenv, and fail in some configuration without a custom fix in urllib3, which is bundled by requests, which is bundled by PIP, which is bundled by virtualenv :( .

Those packages (requests, urllib3) are not in the system path, though. They are vendored by pip / requests. If there's a problem, it would probably be most direct to raise an issue for those projects respectively.

@Arfrever
Copy link
Author

I meant something like:

try:
    import pip
except ImportError:
    use virtualenv_support/pip-*.whl

(I filed pypa/pip#1651 for PIP.)

@Ivoz
Copy link

Ivoz commented Mar 17, 2014

and fail in some configuration without a custom fix in urllib3,

What is this custom fix?

Also note you can replace the pip virtualenv uses by using --extra-search-dir pointing to a folder with a custom pip wheel, so this is already possible.

@Arfrever
Copy link
Author

I currently have:

/usr/lib64/pythonX.Y/site-packages/pkg_resources.py
/usr/lib64/pythonX.Y/site-packages/setuptools
/usr/lib64/pythonX.Y/site-packages/urllib3         # modified
/usr/lib64/pythonX.Y/site-packages/requests        # modified to use above urllib3
/usr/lib64/pythonX.Y/site-packages/pip             # scheduled for being modified to use above requests
/usr/lib64/pythonX.Y/site-packages/virtualenv.py
/usr/lib64/pythonX.Y/site-packages/virtualenv_support
/usr/lib64/pythonX.Y/site-packages/virtualenv_support/__init__.py
/usr/lib64/pythonX.Y/site-packages/virtualenv_support/pip-*.whl
/usr/lib64/pythonX.Y/site-packages/virtualenv_support/setuptools-*.whl

I would like that setup.py of virtualenv support an environmental variable, which, when set, would make installed version of virtualenv use previously installed versions of pip and setuptools (which are in normal directories, not wheels) (and disable installation of then unused /usr/lib64/pythonX.Y/site-packages/virtualenv_support/*.whl).

@stale
Copy link

stale bot commented Jan 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 15, 2019
@stale stale bot closed this as completed Jan 22, 2019
@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants