Compatibility shims for pip versions 8 thru current.
Project description
Warning
Installation
Install from PyPI:
$ pipenv install --pre pip-shims
Install from Github:
$ pipenv install -e git+https://github.com/sarugaku/pip-shims.git#egg=pip-shims
Summary
pip-shims is a set of compatibilty access shims to the pip internal API. pip-shims provides compatibility with pip versions 8.0 through the current release (18.x). The shims are provided using a lazy import strategy (powered by modutil where possible, falling back to importlib from the standard library with a lazy import strategy otherwise). This library exists due to my constant writing of the same set of import shims across many different libraries, including pipenv, pip-tools, requirementslib, and passa.
Usage
Importing a shim
You can use pip-shims to expose elements of pip’s internal API by importing them:
from pip_shims import Wheel mywheel = Wheel('/path/to/my/wheel.whl')
Available Shims
pip-shims provides the following compatibility shims:
Import Path |
Import Name |
Former Path |
---|---|---|
req.req_install |
_strip_extras |
|
cli |
cmdoptions |
cmdoptions |
cli.base_command |
Command |
basecommand |
cli.parser |
ConfigOptionParser |
baseparser |
exceptions |
DistributionNotFound |
|
utils.hashes |
FAVORITE_HASH |
|
index |
FormatControl |
|
utils.misc |
get_installed_distributions |
utils |
cli.cmdoptions |
index_group |
cmdoptions |
req.req_install |
InstallRequirement |
|
req.req_uninstall |
UninstallPathSet |
|
download |
is_archive_file |
|
download |
is_file_url |
|
utils.misc |
is_installable_dir |
utils |
index |
Link |
|
operations.prepare |
make_abstract_dist |
req.req_set |
cli.cmdoptions |
make_option_group |
cmdoptions |
index |
PackageFinder |
|
req.req_file |
parse_requirements |
|
index |
parse_version |
|
download |
path_to_url |
|
__version__ |
pip_version |
|
exceptions |
PipError |
|
operations.prepare |
RequirementPreparer |
|
req.req_set |
RequirementSet |
|
req.req_tracker |
RequirementTracker |
|
resolve |
Resolver |
|
download |
SafeFileCache |
|
download |
url_to_path |
|
download |
unpack_url |
|
locations |
USER_CACHE_DIR |
|
vcs |
VcsSupport |
|
wheel |
Wheel |
|
wheel |
WheelBuilder |
|
cache |
WheelCache |
wheel |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pip_shims-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90daeaf5f9300821ef32abfd821ebb29870ec06df89fc3fb7d0033b6e7c3377b |
|
MD5 | 5229f62333d30d64696dcbe01c34670c |
|
BLAKE2b-256 | a6a6efaf45e2299965a5a12f742ef0f2b057d0fc2f1cf4c77e87c1095ec85487 |