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.constructors |
_strip_extras |
req.req_install |
cli |
cmdoptions |
cmdoptions |
cli.base_command |
Command |
basecommand |
cli.parser |
ConfigOptionParser |
baseparser |
exceptions |
DistributionNotFound |
|
utils.hashes |
FAVORITE_HASH |
|
models |
FormatControl |
index |
utils.misc |
get_installed_distributions |
utils |
cli.cmdoptions |
index_group |
cmdoptions |
req.req_install |
InstallRequirement |
|
req.constructors |
install_req_from_line |
req.req_install.InstallRequirement |
req.constructors |
install_req_from_editable |
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 |
|
exceptions |
InstallationError |
|
exceptions |
UninstallationError |
|
exceptions |
DistributionNotFound |
|
exceptions |
RequirementsFileParseError |
|
exceptions |
BestVersionAlreadyInstalled |
|
exceptions |
BadCommand |
|
exceptions |
CommandError |
|
exceptions |
PreviousBuildDirError |
|
operations.prepare |
RequirementPreparer |
|
operations.freeze |
FrozenRequirement |
<__init__> |
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
File details
Details for the file pip_shims-0.3.1.tar.gz
.
File metadata
- Download URL: pip_shims-0.3.1.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 928a37fbf7350744acd6884cf9ae448e9a679d71557ffd07452e845265ae1591 |
|
MD5 | f0c1defcf95b10a4b55e28ce552df288 |
|
BLAKE2b-256 | 5748991098ab8db6661dde64594e3a01d53111cf469a791e1b6d4032940d5654 |
Provenance
File details
Details for the file pip_shims-0.3.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pip_shims-0.3.1-py2.py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48db3585b522ceafbaff78b8cb0439c22ff4507518e78c7fa78a1808a2118f5f |
|
MD5 | 8cd171ad4d03d261684ad4d22e174291 |
|
BLAKE2b-256 | 1d77dd36586dd189f3b26afa0b496a3df74ef60c78ea36a2259f2d65c114caae |