Skip to content

Conversation

messense
Copy link
Member

No description provided.

@messense
Copy link
Member Author

I'm not sure how to update to use the new pep508_rs api in

maturin/src/develop.rs

Lines 154 to 171 in b39f8ca

pkg.marker = pkg.marker.and_then(|marker| -> Option<MarkerTree> {
match marker.clone() {
MarkerTree::Expression(MarkerExpression {
l_value: MarkerValue::Extra,
operator: MarkerOperator::Equal,
r_value: MarkerValue::QuotedString(extra_value),
}) if &extra_value == extra => None,
MarkerTree::And(and) => match &*and {
[existing, MarkerTree::Expression(MarkerExpression {
l_value: MarkerValue::Extra,
operator: MarkerOperator::Equal,
r_value: MarkerValue::QuotedString(extra_value),
})] if extra_value == extra => Some(existing.clone()),
_ => Some(marker),
},
_ => Some(marker),
}
});

and

maturin/src/metadata.rs

Lines 300 to 309 in b39f8ca

let new_extra = MarkerTree::Expression(MarkerExpression {
l_value: MarkerValue::Extra,
operator: MarkerOperator::Equal,
r_value: MarkerValue::QuotedString(extra.to_string()),
});
if let Some(existing) = dep.marker.take() {
dep.marker = Some(MarkerTree::And(vec![existing, new_extra]));
} else {
dep.marker = Some(new_extra);
}

@konstin please help, thanks!

@messense messense requested a review from konstin November 30, 2024 04:49
@messense
Copy link
Member Author

Oh looks like pep440_rs requires Rust 1.80 which is too new for our MSRV.

@messense messense force-pushed the update-pyproject-toml branch from 19b19c9 to 49858b2 Compare December 1, 2024 02:32
@messense messense force-pushed the update-pyproject-toml branch 2 times, most recently from f656284 to a197368 Compare December 4, 2024 15:40
@messense messense force-pushed the update-pyproject-toml branch 2 times, most recently from de2c0fd to d487762 Compare January 11, 2025 06:05
@messense messense force-pushed the update-pyproject-toml branch from d487762 to f8871f2 Compare January 11, 2025 06:08
@messense messense merged commit dcf4a82 into main Jan 11, 2025
36 of 38 checks passed
@messense messense deleted the update-pyproject-toml branch January 11, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant