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>
-o, --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>
-o, --output
: 指明输出目录。默认为当前目录。--poetry-path
: 指明Poetry的路径。默认为 "poetry"。--nuitka-path
: 指明nuitka3的路径。默认为 "nuitka3"。-E, --extra-requirements
: 额外的需求。-P, --private-packages
:私有包列表。
obfuscate-packages
此命令将指定包进行混淆,支持原地替换。
versifier obfuscate-packages --nuitka-path <path_to_nuitka3> --root-dir <root_dir> --output-dir <output_dir> -P <private_packages>
--nuitka-path
: 指明nuitka3的路径。默认为 "nuitka3"。-r, --root
: 指明根目录。默认为当前目录。-o, --output
: 指明输出目录。默认为当前目录。-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.1.1.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for versifier-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a0d67b5affbffeef13096cb6523fea48ac68762ae2d4967af9b5a7b2f18170d |
|
MD5 | cd7888c2f30173e73c51b0c8f560a342 |
|
BLAKE2b-256 | c09d19e671a5de9dd101d1728110af7e87eba11b877d817a1c526f9b6e9e10de |