保留您控制的仓库中的固定pip需求。
项目描述
pip-preserve-requirements
保留您控制的仓库中的固定pip需求。
它确保pip需求文件中的固定git引用被推送到您控制的仓库,并与提交关联一个标签,从而防止它们被垃圾收集。
目录
安装
pipx install pip-preserve-requirements
用法
Usage: pip-preserve-requirements [OPTIONS] REQUIREMENTS_FILE...
Ensure pinned VCS references in pip requirements files have a git tag.
Arguments:
REQUIREMENTS_FILE... The requirements files to look for requirements tag.
[required]
Options:
--tag-prefix TEXT The prefix to use when creating git tag
names. [default: ppr-]
--match-any-tag Whether to consider that any tag on the
commit is sufficient. If not, ensure commits
are tagged with the requested prefix.
-r, --project-root DIRECTORY The project root directory. Default options
and arguments are read from pyproject.toml
in this directory. [default: .]
--install-completion [bash|zsh|fish|powershell|pwsh]
Install completion for the specified shell.
--show-completion [bash|zsh|fish|powershell|pwsh]
Show completion for the specified shell, to
copy it or customize the installation.
--help Show this message and exit.
配置
pip-preserve-requirements
配置在pyproject.toml
的专用部分。
示例
[tool.pip-preserve-requirements]
tag_prefix = "ppr-"
# ensure a tag with the above prefix is present, if true, consider any tag is valid
match_any_tag = false
[[tool.pip-preserve-requirements.vcs_vaults]]
# any git provider which accepts URLs of the form https://host/owner/repo
# or ssh://git@host/owner/repo
provider = "github.com"
owner = "acme"
# set to true for private repos
ssh_only = false
# the vault where to push VCS reference
default = true
限制
目前,仅支持git+https
和git+ssh
URL。
以下改进将在范围内考虑,尽管目前没有计划进行这些改进
- 支持其他VCS(如
hg
); - 通过将它们推送到用户控制的服务器来支持非VCS URL;
- 通过将它们推送到用户控制的索引来支持常规需求。
许可证
pip-preserve-requirements
在MIT许可证的条款下分发。
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。
源代码分发
pip_preserve_requirements-0.3.0.tar.gz (12.9 kB 查看哈希值)
构建分发
关闭
哈希值 for pip_preserve_requirements-0.3.0-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | fb75c1e831b6c69d2b46de458a50334f877569d6c4ed1029909e798619cfbcff |
|
MD5 | c1d24ba58d73b5bf9caf0480920c4744 |
|
BLAKE2b-256 | 71a5fbb43dfea3e5e4f5b94c6d70ebd563528de2e841c723f831de99236ad325 |