跳转到主要内容

一个简单的脚本,用于对Python依赖项进行排序的文本文件。

项目描述

一个简单的脚本,用于对Python依赖项进行排序的文本文件。

![PyPI](https://img.shields.io/pypi/v/sort-requirements.svg) ![PyPI - Python 版本](https://img.shields.io/pypi/pyversions/sort-requirements.svg)

[![CircleCI](https://img.shields.io/circleci/project/github/rehandalal/sort-requirements.svg)](https://circleci.com/gh/rehandalal/sort-requirements)

#### 安装

使用[pip](https://github.com/pypa/pip)安装此工具非常简单。假设已安装pip,只需在命令行运行以下命令即可

` $ pip install sort_requirements `

此命令将从[Python包索引](https://pypi.ac.cn/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-requirements my-requirements-file.txt `

请确保将 my-requirements-file.txt 替换为您的需求文件(s)的路径。

如果您只想获取需要排序的文件列表,而实际上不修改这些文件,请使用 –check 标志

` $ sort-requirements --check my-requirements-file.txt another-file.txt `

要查看更多选项,请使用 –help 标志

` $ sort-requirements --help `

项目详情


下载文件

下载适合您平台文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源代码分发

sort_requirements-1.3.0.tar.gz (3.6 kB 查看哈希值)

上传时间 源代码

构建分发

sort_requirements-1.3.0-py3-none-any.whl (9.5 kB 查看哈希值)

上传时间 Python 3

由以下支持