-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Use pep440_rs and pep508_rs #1558
Conversation
✅ Deploy Preview for maturin-guide ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
] | ||
|
||
[[package]] | ||
name = "pep508_rs" |
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.
effectively this only adds only one new dependency
operator: MarkerOperator::Equal, | ||
r_value: MarkerValue::QuotedString(extra_value), | ||
}) if &extra_value == extra => None, | ||
MarkerTree::And(and) => match &*and { |
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.
not sure how to deal with the borrow checker better here without vec patterns
@@ -61,6 +64,42 @@ pub struct Metadata21 { | |||
pub entry_points: IndexMap<String, IndexMap<String, String>>, | |||
} | |||
|
|||
impl Metadata21 { | |||
/// Initializes with name, version and otherwise the defaults | |||
pub fn new(name: String, version: Version) -> Self { |
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.
Since Version does not have a default
(min_python_minor..=MAXIMUM_PYPY_MINOR).map(|minor| format!("pypy3.{minor}")), | ||
(min_python_minor..=MAXIMUM_PYPY_MINOR) | ||
.filter(|minor| { | ||
requires_python |
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.
this is some duplication unfortunately
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.
LGTM, thanks!
bors r+
1558: Use pep440_rs and pep508_rs r=messense a=konstin This switches from string heuristics to proper PEP 440 and PEP 508 parsing. This includes full support for `requires-python`, extra handling and wasmtime detection. Co-authored-by: konstin <[email protected]>
Build failed: |
This switches from string heuristics to proper PEP 440 and PEP 508 parsing. This includes full support for
requires-python
, extra handling and wasmtime detection.