You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"This error likely indicates that you need to install a library that provides \"{header}\" for {version_id}",
118
+
"This error likely indicates that you need to install a library that provides \"{}\" for `{}`",
119
+
header.cyan(),
120
+
version_id.cyan(),
117
121
)
118
122
}else{
119
123
write!(
120
124
f,
121
-
"This error likely indicates that you need to install a library that provides \"{header}\"",
125
+
"This error likely indicates that you need to install a library that provides \"{}\"",
126
+
header.cyan(),
122
127
)
123
128
}
124
129
}
@@ -128,17 +133,25 @@ impl Display for MissingHeaderCause {
128
133
{
129
134
write!(
130
135
f,
131
-
"This error likely indicates that you need to install the library that provides a shared library for {library} for {package_name}@{package_version} (e.g., lib{library}-dev)",
136
+
"This error likely indicates that you need to install the library that provides a shared library for `{}` for `{}` (e.g., `{}`)",
"This error likely indicates that you need to install the library that provides a shared library for {library} for {version_id} (e.g., lib{library}-dev)",
144
+
"This error likely indicates that you need to install the library that provides a shared library for `{}` for `{}` (e.g., `{}`)",
145
+
library.cyan(),
146
+
version_id.cyan(),
147
+
format!("lib{library}-dev").cyan(),
137
148
)
138
149
}else{
139
150
write!(
140
151
f,
141
-
"This error likely indicates that you need to install the library that provides a shared library for {library} (e.g., lib{library}-dev)",
152
+
"This error likely indicates that you need to install the library that provides a shared library for `{}` (e.g., `{}`)",
153
+
library.cyan(),
154
+
format!("lib{library}-dev").cyan(),
142
155
)
143
156
}
144
157
}
@@ -148,17 +161,36 @@ impl Display for MissingHeaderCause {
148
161
{
149
162
write!(
150
163
f,
151
-
"This error likely indicates that {package_name}@{package_version} depends on {package}, but doesn't declare it as a build dependency. If {package_name} is a first-party package, consider adding {package} to its `build-system.requires`. Otherwise, `uv pip install {package}` into the environment and re-run with `--no-build-isolation`."
164
+
"This error likely indicates that `{}` depends on `{}`, but doesn't declare it as a build dependency. If `{}` is a first-party package, consider adding `{}` to its `{}`. Otherwise, `{}` into the environment and re-run with `{}`.",
"This error likely indicates that {version_id} depends on {package}, but doesn't declare it as a build dependency. If {version_id} is a first-party package, consider adding {package} to its `build-system.requires`. Otherwise, `uv pip install {package}` into the environment and re-run with `--no-build-isolation`.",
176
+
"This error likely indicates that `{}` depends on `{}`, but doesn't declare it as a build dependency. If `{}` is a first-party package, consider adding `{}` to its `{}`. Otherwise, `{}` into the environment and re-run with `{}`.",
177
+
version_id.cyan(),
178
+
package.cyan(),
179
+
version_id.cyan(),
180
+
package.cyan(),
181
+
"build-system.requires".green(),
182
+
format!("uv pip install {package}").green(),
183
+
"--no-build-isolation".green(),
157
184
)
158
185
}else{
159
186
write!(
160
187
f,
161
-
"This error likely indicates that a package depends on {package}, but doesn't declare it as a build dependency. If the package is a first-party package, consider adding {package} to its `build-system.requires`. Otherwise, `uv pip install {package}` into the environment and re-run with `--no-build-isolation`.",
188
+
"This error likely indicates that a package depends on `{}`, but doesn't declare it as a build dependency. If the package is a first-party package, consider adding `{}` to its `{}`. Otherwise, `{}` into the environment and re-run with `{}`.",
189
+
package.cyan(),
190
+
package.cyan(),
191
+
"build-system.requires".green(),
192
+
format!("uv pip install {package}").green(),
193
+
"--no-build-isolation".green(),
162
194
)
163
195
}
164
196
}
@@ -168,12 +200,18 @@ impl Display for MissingHeaderCause {
168
200
{
169
201
write!(
170
202
f,
171
-
"{package} was removed from the standard library in Python {version}. Consider adding a constraint (like `{package_name} >{package_version}`) to avoid building a version of {package_name} that depends on {package}.",
203
+
"`{}` was removed from the standard library in Python {version}. Consider adding a constraint (like `{}`) to avoid building a version of `{}` that depends on `{}`.",
"{package} was removed from the standard library in Python {version}. Consider adding a constraint to avoid building a package-version that depends on {package}.",
212
+
"`{}` was removed from the standard library in Python {version}. Consider adding a constraint to avoid building a package that depends on `{}`.",
error: command '/usr/bin/gcc' failed with exit code 1
441
+
442
+
hint: This error likely indicates that you need to install a library that provides "graphviz/cgraph.h" for `pygraphviz-1.11`
404
443
"###);
405
-
insta::assert_snapshot!(
406
-
std::error::Error::source(&err).unwrap(),
407
-
@r###"This error likely indicates that you need to install a library that provides "graphviz/cgraph.h" for pygraphviz-1.11"###
408
-
);
409
444
}
410
445
411
446
#[test]
@@ -447,11 +482,9 @@ mod test {
447
482
/usr/bin/ld: cannot find -lncurses: No such file or directory
448
483
collect2: error: ld returned 1 exit status
449
484
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
485
+
486
+
hint: This error likely indicates that you need to install the library that provides a shared library for `ncurses` for `pygraphviz-1.11` (e.g., `libncurses-dev`)
450
487
"###);
451
-
insta::assert_snapshot!(
452
-
std::error::Error::source(&err).unwrap(),
453
-
@"This error likely indicates that you need to install the library that provides a shared library for ncurses for pygraphviz-1.11 (e.g., libncurses-dev)"
454
-
);
455
488
}
456
489
457
490
#[test]
@@ -495,11 +528,9 @@ mod test {
495
528
or: setup.py cmd --help
496
529
497
530
error: invalid command 'bdist_wheel'
531
+
532
+
hint: This error likely indicates that `pygraphviz-1.11` depends on `wheel`, but doesn't declare it as a build dependency. If `pygraphviz-1.11` is a first-party package, consider adding `wheel` to its `build-system.requires`. Otherwise, `uv pip install wheel` into the environment and re-run with `--no-build-isolation`.
498
533
"###);
499
-
insta::assert_snapshot!(
500
-
std::error::Error::source(&err).unwrap(),
501
-
@"This error likely indicates that pygraphviz-1.11 depends on wheel, but doesn't declare it as a build dependency. If pygraphviz-1.11 is a first-party package, consider adding wheel to its `build-system.requires`. Otherwise, `uv pip install wheel` into the environment and re-run with `--no-build-isolation`."
502
-
);
503
534
}
504
535
505
536
#[test]
@@ -536,10 +567,8 @@ mod test {
536
567
[stderr]
537
568
import distutils.core
538
569
ModuleNotFoundError: No module named 'distutils'
570
+
571
+
hint: `distutils` was removed from the standard library in Python 3.12. Consider adding a constraint (like `pygraphviz >1.11`) to avoid building a version of `pygraphviz` that depends on `distutils`.
539
572
"###);
540
-
insta::assert_snapshot!(
541
-
std::error::Error::source(&err).unwrap(),
542
-
@"distutils was removed from the standard library in Python 3.12. Consider adding a constraint (like `pygraphviz >1.11`) to avoid building a version of pygraphviz that depends on distutils."
0 commit comments