mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-15 21:09:46 +00:00
Revert "Show a dedicated hint for setuptools
dash-separator change" (#12453)
Reverts astral-sh/uv#12438
This commit is contained in:
parent
20e7dcd366
commit
ddbf90c906
2 changed files with 0 additions and 86 deletions
|
@ -54,12 +54,6 @@ static TORCH_NOT_FOUND_RE: LazyLock<Regex> =
|
|||
static DISTUTILS_NOT_FOUND_RE: LazyLock<Regex> =
|
||||
LazyLock::new(|| Regex::new(r"ModuleNotFoundError: No module named 'distutils'").unwrap());
|
||||
|
||||
/// e.g. `setuptools.errors.InvalidConfigError: Invalid dash-separated key`
|
||||
static SETUPTOOLS_SETUP_CFG_KEY_RE: LazyLock<Regex> = LazyLock::new(|| {
|
||||
Regex::new(r"setuptools.errors.InvalidConfigError: Invalid (dash-separated|uppercase) key")
|
||||
.unwrap()
|
||||
});
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
#[error(transparent)]
|
||||
|
@ -124,7 +118,6 @@ enum MissingLibrary {
|
|||
Linker(String),
|
||||
BuildDependency(String),
|
||||
DeprecatedModule(String, Version),
|
||||
NonNormalizedSetupCfgKey,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
@ -138,12 +131,6 @@ pub struct MissingHeaderCause {
|
|||
impl Display for MissingHeaderCause {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
match &self.missing_library {
|
||||
MissingLibrary::NonNormalizedSetupCfgKey => {
|
||||
write!(
|
||||
f,
|
||||
"setuptools removed support for dash-separated and uppercased keys in v78.0.0. Consider updating the relevant `setup.cfg`, or use `tool.uv.build-constraint-dependencies` to pin `setuptools<78`:\n```toml\n[tool.uv]\nbuild-constraint-dependencies = [\"setuptools<78\"]\n```"
|
||||
)
|
||||
}
|
||||
MissingLibrary::Header(header) => {
|
||||
if let (Some(package_name), Some(package_version)) =
|
||||
(&self.package_name, &self.package_version)
|
||||
|
@ -365,8 +352,6 @@ impl Error {
|
|||
"distutils".to_string(),
|
||||
Version::new([3, 12]),
|
||||
))
|
||||
} else if SETUPTOOLS_SETUP_CFG_KEY_RE.is_match(line.trim()) {
|
||||
Some(MissingLibrary::NonNormalizedSetupCfgKey)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue