Hatch看起来很棒,使用pip而不是内部安装程序,我想使用它。
但是,我在网上搜索了一下,发现很多迹象表明hatch
应该附带一个通过hatch install
访问的install
命令,但是在python3.10 @ hatch = 1.6.3
上,没有install
命令:
Usage: hatch [OPTIONS] COMMAND [ARGS]...
_ _ _ _
| | | | | | | |
| |_| | __ _| |_ ___| |__
| _ |/ _` | __/ __| '_ \
| | | | (_| | || (__| | | |
\_| |_/\__,_|\__\___|_| |_|
Options:
-e, --env TEXT The name of the environment to use [env var:
`HATCH_ENV`]
-p, --project TEXT The name of the project to work on [env var:
`HATCH_PROJECT`]
--color / --no-color Whether or not to display colored output
(default is auto-detection) [env vars:
`FORCE_COLOR`/`NO_COLOR`]
--interactive / --no-interactive
Whether or not to allow features like
prompts and progress bars (default is auto-
detection) [env var: `HATCH_INTERACTIVE`]
-v, --verbose Increase verbosity (can be used additively)
[env var: `HATCH_VERBOSE`]
-q, --quiet Decrease verbosity (can be used additively)
[env var: `HATCH_QUIET`]
--data-dir TEXT The path to a custom directory used to
persist data [env var: `HATCH_DATA_DIR`]
--cache-dir TEXT The path to a custom directory used to cache
data [env var: `HATCH_CACHE_DIR`]
--config TEXT The path to a custom config file to use [env
var: `HATCH_CONFIG`]
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
build Build a project
clean Remove build artifacts
config Manage the config file
dep Manage environment dependencies
env Manage project environments
new Create or initialize a project
project View project information
publish Publish build artifacts
run Run commands within project environments
shell Enter a shell within a project's environment
status Show information about the current environment
version View or set a project's version
以及dep
命令:
Usage: hatch dep [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
hash Output a hash of the currently defined dependencies
show Display dependencies in various formats
如何添加hatch的依赖项?我想确保它和poetry
一样有竞争力,poetry
确实提供了安装选项。
或者:对于更新版本的python3,是否有更新版本的hatch具有这些安装特性?
如果是这样的话,没问题--我可以解决它。
1条答案
按热度按时间pftdvrlh1#
当你执行
hatch shell
或hatch run
时,Hatch会自动生成一个新的运行环境,并将你的项目安装到那个环境中。你不需要手动管理pip install
或hatch install
之类的操作。现在看来,您需要手工管理依赖项。