Can venv (be upgraded to) by default install the wheel package into a newly created venv? This would elegantly resolve an issue with installing an sdist into a venv on machines disconnected from internet (from PyPI).
The problem(s): I distribute a Python installer (e.g. miniconda .sh file) and my authored package as sdist to end-users who must install onto a disconnected machine (i.e. sneakernet and DVD). Upon installing sdist (
/venv_path/python3 -m pip install --no-dependencies my_sdist.tar.gz), I get error: false
requirements already satisfied. This is due to pip recently insisting upon building/installing a wheel from the sdist, and the wheel package is absent from the venv.
A workaround: First do:
/venv_path/python3 -m pip install --upgrade wheel --no-index --find-links local_path_to/wheel-0.36.2.tar.gz, i.e. I provide the wheel package locally (with my distribution to end-user). The
--find-links are necessary since , since pip otherwise attempts reaching out over internet to PyPI for the wheel package.
Is this the most elegant workaround short of my suggested venv upgrade?
Just how did pip solve the chicken/egg problem with installing the wheel package into the venv, since it evidently first wants to build a wheel from the wheel package sdist??? My logfile says:
Using legacy 'setup.py install' for wheel, since package 'wheel' is not installed.Why doesn’t it behave this way for my end-user sdist install???