Skip to content

Commit

Permalink
Fix typo implmentation_name -> implementation_name
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed May 7, 2023
1 parent 4f8cf7d commit f731a3a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ impl BuildContext {
let interp_names: HashSet<_> = non_abi3_interps
.iter()
.map(|interp| match interp.interpreter_kind {
InterpreterKind::CPython => interp.implmentation_name.to_string(),
InterpreterKind::CPython => interp.implementation_name.to_string(),
InterpreterKind::PyPy => "PyPy".to_string(),
})
.collect();
Expand Down
8 changes: 4 additions & 4 deletions src/build_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ impl BuildOptions {
executable: PathBuf::new(),
platform: None,
runnable: false,
implmentation_name: interpreter_kind.to_string().to_ascii_lowercase(),
implementation_name: interpreter_kind.to_string().to_ascii_lowercase(),
soabi: soabi.cloned(),
});
} else {
Expand Down Expand Up @@ -360,7 +360,7 @@ impl BuildOptions {
executable: PathBuf::new(),
platform: None,
runnable: false,
implmentation_name: "cpython".to_string(),
implementation_name: "cpython".to_string(),
soabi: None,
}])
} else if let Some(config_file) = env::var_os("PYO3_CONFIG_FILE") {
Expand All @@ -387,7 +387,7 @@ impl BuildOptions {
executable: PathBuf::new(),
platform: None,
runnable: false,
implmentation_name: "cpython".to_string(),
implementation_name: "cpython".to_string(),
soabi: None,
}])
} else {
Expand Down Expand Up @@ -427,7 +427,7 @@ impl BuildOptions {
executable: PathBuf::new(),
platform: None,
runnable: false,
implmentation_name: "cpython".to_string(),
implementation_name: "cpython".to_string(),
soabi: None,
}])
} else if target.cross_compiling() {
Expand Down
16 changes: 8 additions & 8 deletions src/python_interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ pub struct PythonInterpreter {
/// and it's `executable` is empty
pub runnable: bool,
/// Comes from `sys.platform.name`
pub implmentation_name: String,
pub implementation_name: String,
/// Comes from sysconfig var `SOABI`
pub soabi: Option<String>,
}
Expand Down Expand Up @@ -433,7 +433,7 @@ fn fun_with_abiflags(
impl PythonInterpreter {
/// Does this interpreter have PEP 384 stable api aka. abi3 support?
pub fn has_stable_api(&self) -> bool {
if self.implmentation_name.parse::<InterpreterKind>().is_err() {
if self.implementation_name.parse::<InterpreterKind>().is_err() {
false
} else {
match self.interpreter_kind {
Expand Down Expand Up @@ -465,12 +465,12 @@ impl PythonInterpreter {
} else {
context.get_platform_tag(platform_tags)?
};
let tag = if self.implmentation_name.parse::<InterpreterKind>().is_err() {
let tag = if self.implementation_name.parse::<InterpreterKind>().is_err() {
// Use generic tags when `sys.implementation.name` != `platform.python_implementation()`, for example Pyston
// See also https://github.com/pypa/packaging/blob/0031046f7fad649580bc3127d1cef9157da0dd79/packaging/tags.py#L234-L261
format!(
"{interpreter}{major}{minor}-{soabi}-{platform}",
interpreter = self.implmentation_name,
interpreter = self.implementation_name,
major = self.major,
minor = self.minor,
soabi = self
Expand Down Expand Up @@ -676,20 +676,20 @@ impl PythonInterpreter {
executable,
platform,
runnable: true,
implmentation_name: message.implementation_name,
implementation_name: message.implementation_name,
soabi: message.soabi,
}))
}

/// Construct a `PythonInterpreter` from a sysconfig and target
pub fn from_config(config: InterpreterConfig) -> Self {
let implmentation_name = config.interpreter_kind.to_string().to_ascii_lowercase();
let implementation_name = config.interpreter_kind.to_string().to_ascii_lowercase();
PythonInterpreter {
config,
executable: PathBuf::new(),
platform: None,
runnable: false,
implmentation_name,
implementation_name,
soabi: None,
}
}
Expand Down Expand Up @@ -879,7 +879,7 @@ impl PythonInterpreter {
let pointer_width = self.pointer_width.unwrap_or(64);
format!(
"{}-{}.{}-{}bit",
self.implmentation_name, self.major, self.minor, pointer_width
self.implementation_name, self.major, self.minor, pointer_width
)
}

Expand Down

0 comments on commit f731a3a

Please sign in to comment.