Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-interpreter-specific wheels using tag with py2 #254

Merged
merged 2 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ type BuiltWheelMetadata = (PathBuf, String, Option<PythonInterpreter>);

impl BuildContext {
/// Checks which kind of bindings we have (pyo3/rust-cypthon or cffi or bin) and calls the
/// correct builder. Returns a Vec that contains location, python tag (e.g. py2.py3 or cp35)
/// correct builder. Returns a Vec that contains location, python tag (e.g. py3 or cp35)
/// and for bindings the python interpreter they bind against.
pub fn build_wheels(&self) -> Result<Vec<BuiltWheelMetadata>, Error> {
fs::create_dir_all(&self.out)
.context("Failed to create the target directory for the wheels")?;

let wheels = match &self.bridge {
BridgeModel::Cffi => vec![(self.build_cffi_wheel()?, "py2.py3".to_string(), None)],
BridgeModel::Bin => vec![(self.build_bin_wheel()?, "py2.py3".to_string(), None)],
BridgeModel::Cffi => vec![(self.build_cffi_wheel()?, "py3".to_string(), None)],
BridgeModel::Bin => vec![(self.build_bin_wheel()?, "py3".to_string(), None)],
BridgeModel::Bindings(_) => self.build_binding_wheels()?,
};

Expand Down
1 change: 0 additions & 1 deletion src/python_interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ fn windows_interpreter_no_build(
/// Installed Pythons found by py Launcher for Windows
/// -3.7-64 *
/// -3.6-32
/// -2.7-64
/// ```
///
/// When using `conda` we can use the `conda info -e` command to retrieve information
Expand Down
7 changes: 3 additions & 4 deletions src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ impl Target {
}

/// Returns the tags for the WHEEL file for cffi wheels
pub fn get_py2_and_py3_tags(&self, manylinux: &Manylinux) -> Vec<String> {
pub fn get_py3_tags(&self, manylinux: &Manylinux) -> Vec<String> {
vec![
format!("py2-none-{}", self.get_platform_tag(&manylinux)),
format!("py3-none-{}", self.get_platform_tag(&manylinux)),
]
}
Expand Down Expand Up @@ -237,10 +236,10 @@ impl Target {
/// Returns the tags for the platform without python version
pub fn get_universal_tags(&self, manylinux: &Manylinux) -> (String, Vec<String>) {
let tag = format!(
"py2.py3-none-{platform}",
"py3-none-{platform}",
platform = self.get_platform_tag(&manylinux)
);
let tags = self.get_py2_and_py3_tags(&manylinux);
let tags = self.get_py3_tags(&manylinux);
(tag, tags)
}
}
Loading