在需求文本文件中排序python依赖项的简单脚本。
sort-requirements的Python项目详细描述
在需求文本文件中排序python依赖项的简单脚本。
啊![pypi](https://img.shields.io/pypi/v/sort-requirements.svg) 啊![pypi-python版本](https://img.shields.io/pypi/pyversions/sort-requirements.svg)
####安装
使用[pip](https://github.com/pypa/pip)可以轻松地安装此工具。 假设安装了pip,只需从命令行运行以下命令:
` $ pip install sort_requirements `
此命令将从 [python包索引](https://pypi.org/project/sort-requirements/) 把它安装到你的系统上。关于pip和pypi的更多信息可以是 在此处找到:
或者,您可以使用setup.py从发行版安装 脚本:
` $ python setup.py install `
您还可以安装 [开发版本](https://github.com/rehandalal/sort-requirements/tarball/master#egg=sort-requirements-dev) 运行以下命令:
` $ pip install therapist==dev `
或从 [Git回购](https://github.com/rehandalal/therapist/):
` $ git clone https://github.com/rehandalal/sort-requirements.git $ mkvirtualenv sort-requirements $ pip install --editable . `
####用法
要使用此工具,只需从命令行运行以下命令:
` $ sort-requirementsmy-requirements-file.txt `
请确保将my requirements file.txt替换为 需求文件。
如果你只想得到一个需要排序的文件列表 如果要对文件进行任何更改,请使用–check标志:
` $ sort-requirements--checkmy-requirements-file.txtanother-file.txt `
要获得更多选项,请使用–help标志:
` $ sort-requirements--help `