-
Notifications
You must be signed in to change notification settings - Fork 808
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
Add additional ARM targets to release #2417
Conversation
This will take some trial and error. |
961ca84
to
b75959c
Compare
0924efa
to
791d697
Compare
1d92264
to
33a58b3
Compare
@@ -534,8 +540,6 @@ jobs: | |||
- target: aarch64-unknown-linux-musl | |||
arch: aarch64 | |||
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 | |||
- target: armv7-unknown-linux-musleabihf | |||
arch: armv7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we build this here, or in the linux-arm
category that I augmented above?
53a217b
to
7971c67
Compare
crates/platform-tags/src/platform.rs
Outdated
@@ -107,6 +109,8 @@ impl Arch { | |||
Self::Aarch64 | Self::Armv7L | Self::Powerpc64 | Self::Powerpc64Le | Self::S390X => 17, | |||
// manylinux 1 | |||
Self::X86 | Self::X86_64 => 5, | |||
// not supported | |||
Self::Armv6L => 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@konstin - This is a bit awkward
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about
diff --git a/crates/platform-tags/src/platform.rs b/crates/platform-tags/src/platform.rs
index c28e9b76..d36c91e9 100644
--- a/crates/platform-tags/src/platform.rs
+++ b/crates/platform-tags/src/platform.rs
@@ -103,14 +103,16 @@ impl fmt::Display for Arch {
impl Arch {
/// Returns the oldest possible Manylinux tag for this architecture
- pub fn get_minimum_manylinux_minor(&self) -> u16 {
+ pub fn get_minimum_manylinux_minor(&self) -> Option<u16> {
match self {
// manylinux 2014
- Self::Aarch64 | Self::Armv7L | Self::Powerpc64 | Self::Powerpc64Le | Self::S390X => 17,
+ Self::Aarch64 | Self::Armv7L | Self::Powerpc64 | Self::Powerpc64Le | Self::S390X => {
+ Some(17)
+ }
// manylinux 1
- Self::X86 | Self::X86_64 => 5,
+ Self::X86 | Self::X86_64 => Some(5),
// not supported
- Self::Armv6L => 0,
+ Self::Armv6L => None,
}
}
}
diff --git a/crates/platform-tags/src/tags.rs b/crates/platform-tags/src/tags.rs
index b4db57da..3cd9a2db 100644
--- a/crates/platform-tags/src/tags.rs
+++ b/crates/platform-tags/src/tags.rs
@@ -336,18 +336,19 @@ fn compatible_tags(platform: &Platform) -> Result<Vec<String>, PlatformError> {
let platform_tags = match (&os, arch) {
(Os::Manylinux { major, minor }, _) => {
let mut platform_tags = vec![format!("linux_{}", arch)];
- platform_tags.extend(
- (arch.get_minimum_manylinux_minor()..=*minor)
- .map(|minor| format!("manylinux_{major}_{minor}_{arch}")),
- );
- if (arch.get_minimum_manylinux_minor()..=*minor).contains(&12) {
- platform_tags.push(format!("manylinux2010_{arch}"));
- }
- if (arch.get_minimum_manylinux_minor()..=*minor).contains(&17) {
- platform_tags.push(format!("manylinux2014_{arch}"));
- }
- if (arch.get_minimum_manylinux_minor()..=*minor).contains(&5) {
- platform_tags.push(format!("manylinux1_{arch}"));
+ if let Some(min_minor) = arch.get_minimum_manylinux_minor() {
+ platform_tags.extend(
+ (min_minor..=*minor).map(|minor| format!("manylinux_{major}_{minor}_{arch}")),
+ );
+ if (min_minor..=*minor).contains(&12) {
+ platform_tags.push(format!("manylinux2010_{arch}"));
+ }
+ if (min_minor..=*minor).contains(&17) {
+ platform_tags.push(format!("manylinux2014_{arch}"));
+ }
+ if (min_minor..=*minor).contains(&5) {
+ platform_tags.push(format!("manylinux1_{arch}"));
+ }
}
platform_tags
}
I saw this PR and thought that it can be supported directly in maturin-action. |
@messense - Thank you very much. |
crates/platform-tags/src/platform.rs
Outdated
@@ -107,6 +109,8 @@ impl Arch { | |||
Self::Aarch64 | Self::Armv7L | Self::Powerpc64 | Self::Powerpc64Le | Self::S390X => 17, | |||
// manylinux 1 | |||
Self::X86 | Self::X86_64 => 5, | |||
// not supported | |||
Self::Armv6L => 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about
diff --git a/crates/platform-tags/src/platform.rs b/crates/platform-tags/src/platform.rs
index c28e9b76..d36c91e9 100644
--- a/crates/platform-tags/src/platform.rs
+++ b/crates/platform-tags/src/platform.rs
@@ -103,14 +103,16 @@ impl fmt::Display for Arch {
impl Arch {
/// Returns the oldest possible Manylinux tag for this architecture
- pub fn get_minimum_manylinux_minor(&self) -> u16 {
+ pub fn get_minimum_manylinux_minor(&self) -> Option<u16> {
match self {
// manylinux 2014
- Self::Aarch64 | Self::Armv7L | Self::Powerpc64 | Self::Powerpc64Le | Self::S390X => 17,
+ Self::Aarch64 | Self::Armv7L | Self::Powerpc64 | Self::Powerpc64Le | Self::S390X => {
+ Some(17)
+ }
// manylinux 1
- Self::X86 | Self::X86_64 => 5,
+ Self::X86 | Self::X86_64 => Some(5),
// not supported
- Self::Armv6L => 0,
+ Self::Armv6L => None,
}
}
}
diff --git a/crates/platform-tags/src/tags.rs b/crates/platform-tags/src/tags.rs
index b4db57da..3cd9a2db 100644
--- a/crates/platform-tags/src/tags.rs
+++ b/crates/platform-tags/src/tags.rs
@@ -336,18 +336,19 @@ fn compatible_tags(platform: &Platform) -> Result<Vec<String>, PlatformError> {
let platform_tags = match (&os, arch) {
(Os::Manylinux { major, minor }, _) => {
let mut platform_tags = vec![format!("linux_{}", arch)];
- platform_tags.extend(
- (arch.get_minimum_manylinux_minor()..=*minor)
- .map(|minor| format!("manylinux_{major}_{minor}_{arch}")),
- );
- if (arch.get_minimum_manylinux_minor()..=*minor).contains(&12) {
- platform_tags.push(format!("manylinux2010_{arch}"));
- }
- if (arch.get_minimum_manylinux_minor()..=*minor).contains(&17) {
- platform_tags.push(format!("manylinux2014_{arch}"));
- }
- if (arch.get_minimum_manylinux_minor()..=*minor).contains(&5) {
- platform_tags.push(format!("manylinux1_{arch}"));
+ if let Some(min_minor) = arch.get_minimum_manylinux_minor() {
+ platform_tags.extend(
+ (min_minor..=*minor).map(|minor| format!("manylinux_{major}_{minor}_{arch}")),
+ );
+ if (min_minor..=*minor).contains(&12) {
+ platform_tags.push(format!("manylinux2010_{arch}"));
+ }
+ if (min_minor..=*minor).contains(&17) {
+ platform_tags.push(format!("manylinux2014_{arch}"));
+ }
+ if (min_minor..=*minor).contains(&5) {
+ platform_tags.push(format!("manylinux1_{arch}"));
+ }
}
platform_tags
}
918c2c5
to
9b6b8e0
Compare
Closes #2415.
Closes #2416.