通过电流的PIP版本8的兼容性垫片。
pip-shims的Python项目详细描述
警告
警告
pip的作者不允许使用此包。依靠皮普 对于您的软件来说,内部构件是一个危险的概念,因为它们是故意破坏的 定期的。这个包可能并不总是完全更新pypi,所以依赖 可能会破坏你的密码!用户小心!
安装
从PyPI:安装
$ pipenv install --pre pip-shims
从Github:
安装$ pipenv install -e git+https://github.com/sarugaku/pip-shims.git#egg=pip-shims
摘要
pip垫片是一组对pip内部api的兼容访问垫片。pip垫片 在当前版本(18.x)中提供与PIP8.0的兼容性。垫片 通过重载类实例的getattr方法来攻击模块,使用延迟导入策略提供。 由于我不断地编写同一组导入垫片,因此存在此库。 许多不同的库,包括pipenv、pip-tools、requirementslib,和 passa。
用法
导入垫片
您可以使用pip垫片通过导入它们来公开pip的内部api的元素:
from pip_shims import Wheel
mywheel = Wheel('/path/to/my/wheel.whl')
from pip_shims import Wheel mywheel = Wheel('/path/to/my/wheel.whl')
可用垫片
pip垫片提供以下兼容性垫片:
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 |
commands.freeze | DEV_PKGS | |
exceptions | DistributionNotFound | |
utils.hashes | FAVORITE_HASH | |
models | FormatControl | index |
utils.misc | get_installed_distributions | utils |
utils.compat | stdlib_pkgs | compat |
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 | |
distributions | make_distribution_for_install_requirement | operations.prepare.make_abstract_dist |
distributions.base | AbstractDistribution | |
distributions.source | SourceDistribution | |
distributions.installed | InstalledDistribution | |
distributions.wheel | WheelDistribution | |
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 | CandidateEvaluator | |
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.versioncontrol | VcsSupport | vcs.VcsSupport |
wheel | Wheel | |
wheel | WheelBuilder | |
cache | WheelCache | wheel |