管理开发和生产依赖性的简单方法。
dependencymanager的Python项目详细描述
依赖关系管理器
:心眼:First full released version终于来了!:心眼:
Dependency Manager解决了python pip日常使用中缺少good development/production Dependency management。在
有了这个工具,你就可以将开发和生产依赖关系添加到分离的项目中。一旦包可以将所有需求导出到一个文件中,特别是,而不会与只使用pip的人失去任何兼容性。它还将项目直接依赖的包与依赖树区分开来。在
入门
# you can install it globaly sudo pip install dependencymanager ## this way you're gonna have dependencymanager globaly to use in all your projects# or# localy, but remembet to add it as development dependency ;) pip install virtualenv virtualenv --python=python3 .virenv source .virenv/bin/activate pip install dependencymanager python -m dependecymanager init python -m dependecymanager move --name=dependencymanager python -m dependecymanager export## this way dependency manager will be contained in a specify project,## and will be installed only in development environment.## if you want it not to stay in production, just do execute the 'move' command.
指挥官:
列表
Command | Description |
---|---|
init | create DM environment tree from existente installed |
i - install | Install the project or an specific dependecy |
u - uninstall | Uninstall required package and its dependency. Maintaining possible cross dependencies with other packages, moving them if necessary, and updating the tree. |
f - info | Get info about the requested pack. |
m - move | Move package between environments, production for developer and vice versa. |
mh - makehead | Make the given package head. That is, the project is now directly dependent on this package. |
ex - export | Export requirements files. |
标志
^{tb2}$警告:
由于软件包尚未完全发布,您可能需要考虑两件事:
- 依赖关系管理器仍然不支持本地安装的包。这是一个罕见的情况,但可能使用pip。因此,如果您出于任何原因需要在项目中处理这种方法,依赖关系管理器仍然不是您的工具。尽管从我们现在的角度来看,添加这样的支持相当容易,而且这将在未来的完整版本中提供。在
- 包craetes 3个文件在当前目录中:dmtree.json文件, 要求.txt还有德夫_要求.txt。仍然不知道如何自定义这些名称,尽管添加这样的功能也相当简单,将在未来的完整版本中提供。在
请参阅此处的release note。
另见
- Varenv项目:在开发过程中模拟环境变量的一种简单方法。在
- SimplestRPC项目:python-study project的简单RPC。在
- 项目
标签: