File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/poetry/console/commands Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class BuildCommand(EnvCommand):
35
35
option (
36
36
"local-version" ,
37
37
"l" ,
38
- "Add or replace a local version label to the build." ,
38
+ "Add or replace a local version label to the build. (<warning>Deprecated</warning>) " ,
39
39
flag = False ,
40
40
),
41
41
option (
@@ -45,6 +45,12 @@ class BuildCommand(EnvCommand):
45
45
default = "dist" ,
46
46
flag = False ,
47
47
),
48
+ option (
49
+ "config-settings" ,
50
+ description = "Provide config settings that should be passed to backend in <key>=<value> format." ,
51
+ flag = False ,
52
+ multiple = True ,
53
+ ),
48
54
]
49
55
50
56
loggers : ClassVar [list [str ]] = [
@@ -70,8 +76,17 @@ def _config_settings(self) -> dict[str, str]:
70
76
config_settings = {}
71
77
72
78
if local_version_label := self .option ("local-version" ):
79
+ self .line_error (
80
+ f"<warning>`<fg=yellow;options=bold>--local-version</>` is deprecated."
81
+ f" Use `<fg=yellow;options=bold>--config-settings local-version={ local_version_label } </>`"
82
+ f" instead.</warning>"
83
+ )
73
84
config_settings ["local-version" ] = local_version_label
74
85
86
+ for config_setting in self .option ("config-settings" ):
87
+ key , _ , value = config_setting .partition ("=" )
88
+ config_settings [key ] = value
89
+
75
90
return config_settings
76
91
77
92
def _build (
You can’t perform that action at this time.
0 commit comments