本文档翻译自:https://docs.conan.io/en/latest/reference/commands/development/editable.html
管理可编辑程序包(驻留在用户工作区中的程序包,但是像在高速缓存中一样被使用)。
使用子命令“添加”,“删除”和“列表”来创建,删除或列出当前在此模式下安装的软件包。
positional arguments:
{add,remove,list} sub-command help
add Put a package in editable mode
remove Disable editable mode for a package
list List packages in editable mode
optional arguments:
-h, --help show this help message and exit
conan editable add
$ conan editable add [-h] [-l LAYOUT] path reference
在用户文件夹
positional arguments:
path Path to the package folder in the user workspace
reference Package reference e.g.: mylib/1.X@user/channel
optional arguments:
-h, --help show this help message and exit
-l LAYOUT, --layout LAYOUT
Relative or absolute path to a file containing the
layout. Relative paths will be resolved first relative
to current dir, then to local cache "layouts" folder
此命令将程序包置于“可编辑模式”,并且该程序包的使用者将从给定的用户文件夹中使用它,而不是从缓存中使用它。 path指向的路径应该存在并且包含conanfile.py。
示例:使用文件win_layout指定的布局,将包cool / version @ user / dev置于可编辑模式。
$ conan editable add . cool/version@user/dev --layout=win_layout
conan editable remove
$ conan editable remove [-h] reference
删除软件包引用的可编辑模式。
positional arguments:
reference Package reference e.g.: mylib/1.X@user/channel
optional arguments:
-h, --help show this help message and exit
示例:删除“可编辑模式”,从缓存中再次使用包:
$ conan editable remove cool/version@user/dev
conan editable list
$ conan editable list [-h]
显示以“可编辑”模式打开的软件包的列表。