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

Upgrade pyproject-toml to 0.13.4 #2342

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

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 f656284 to a197368 Compare December 4, 2024 15:40
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