Versifier: A lyrical tool to transform Python requirements into Poetry configurations, effortlessly and elegantly.
Project description
versifier
Overview
这个项目提供了一套命令行工具集,主要用于处理 Python 项目的依赖管理。主要功能包括:
- 将 requirements.txt 转化为 Poetry 的 pyproject.toml
- 将 Poetry 的 pyproject.toml 导出为 requirements.txt
- 将私有包提取到指定目录
Installation
使用 pip 来安装这个项目:
pip install versifier
Commands
requirements_to_poetry
此命令将requirements.txt文件转换为Poetry格式。
versifier requirements_to_poetry --poetry-path <path_to_poetry> -r <requirements_files> -d <dev_requirements_files> -e <exclude_packages>
--poetry-path
: 指明Poetry的路径。默认为 "poetry"。-r, --requirements
: 一个或多个requirements文件。-d, --dev-requirements
: 一个或多个开发需求文件。-e, --exclude
: 需要排除的包。
poetry_to_requirements
此命令将Poetry依赖项导出到requirements.txt格式。
versifier poetry_to_requirements -o <output_file> --poetry-path <path_to_poetry> --exclude-specifiers --include-comments -d -E <extra_requirements> -m <markers>
-o, --output
: 指明输出文件。如果未提供,则输出打印到控制台。--poetry-path
: 指明Poetry的路径。默认为 "poetry"。--exclude-specifiers
: 排除说明符。--include-comments
: 包括评论。-d, --include-dev-requirements
: 包括开发需求。-E, --extra-requirements
: 额外的需求。-m, --markers
: 过滤标记。-P, --private-packages
:私有包列表。
extract_private_packages
此命令提取私有包。
versifier extract_private_packages --output <output_dir> --poetry-path <path_to_poetry> -E <extra_requirements> --exclude-file-patterns <exclude_files>
--output
: 指明输出目录。默认为当前目录。--poetry-path
: 指明Poetry的路径。默认为 "poetry"。-E, --extra-requirements
: 额外的需求。--exclude-file-patterns
: 需要排除的文件。-P, --private-packages
:私有包列表。
compile_private_packages
此命令编译私有包。
versifier compile_private_packages --output <output_dir> --poetry-path <path_to_poetry> --nuitka-path <path_to_nuitka3> -E <extra_requirements>
--output
: 指明输出目录。默认为当前目录。--poetry-path
: 指明Poetry的路径。默认为 "poetry"。--nuitka-path
: 指明nuitka3的路径。默认为 "nuitka3"。-E, --extra-requirements
: 额外的需求。-P, --private-packages
:私有包列表。
License
此项目使用 MIT 许可证。有关详细信息,请参阅 LICENSE 文件。
Contributing
我们欢迎各种形式的贡献,包括报告问题、提出新功能、改进文档或提交代码更改。如果你想要贡献,请查看 CONTRIBUTING.md 获取更多信息。
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
versifier-0.0.5.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for versifier-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34b963251c0f1d283f5b720f7f59a2a0d2d43b04804f8cb471364f0e5efac037 |
|
MD5 | 1bdec44c93ff9627c877a55519316878 |
|
BLAKE2b-256 | 8a3b3157b692c84716ee8a2f785063b2b114cc8173396de6f37140714a56ccfc |