def next_pip_wheel(for_py_version): wheel = get_embed_wheel("pip", for_py_version) new_version = list(wheel.version_tuple) new_version[-1] += 1 new_name = wheel.name.replace(wheel.version, ".".join(str(i) for i in new_version)) return Wheel.from_path(Path(new_name))
def get_embed_wheel(distribution, for_py_version): path = BUNDLE_FOLDER / (BUNDLE_SUPPORT.get(for_py_version, {}) or BUNDLE_SUPPORT[MAX]).get(distribution) return Wheel.from_path(path)
def downloaded_wheel(mocker): wheel = Wheel.from_path(Path("setuptools-0.0.0-py2.py3-none-any.whl")) yield wheel, mocker.patch("virtualenv.seed.wheels.acquire.download_wheel", return_value=wheel)