是否可以在 pipfile 中设置自定义部分?
默认情况下,我只看到 [packages]
和 [dev-packages]
,但我对某些环境有额外的依赖。所以我想安装packages
例如 [tests]
但不是 [dev-packages]
.
例如。:
pipenv install --tests
# or
pipenv install --my-custom-section
之前我用过
requirements.txt
, requirements-dev.txt
, requirements-integration.txt
.有什么好的方法可以用 pipenv
实现它吗? ?
最佳答案
让我们看一下文档
如果我们查看 Pipfile. The Concept :
Pipfile will be superior to requirements.txt file in a number of ways: ...
- Existing requirements files tend to proliferate into multiple files - e.g. dev-requirements.txt, test-requirements.txt, etc. - but a Pipfile will allow seamlessly specifying groups of dependencies in one place. * This will be surfaced as only two built-in groups (default & development). (see note below)
Note
Custom groups may be added in the future. Remember, it is easier to add features in the future than it is to remove them. The Composer community has been successful with only default and development as group options for many years. This model is being followed.
回答
现在不可能了,尽管它的设计考虑了这种可能性。
也许将来有可能。
关于python-3.x - pipfile 中的自定义部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54652391/