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

feat: add a rattler_pypi_interop crate #1054

Open
wants to merge 70 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
8ed86d5
copying everything over from rattler_installs_package
travishathaway Feb 5, 2025
d902bdd
fixing newline
travishathaway Feb 6, 2025
2be8737
Merge branch 'main' into issue-1044
travishathaway Feb 6, 2025
c54d902
removing a lot of stuff; not finished but wanted a check point for th…
travishathaway Feb 16, 2025
f6e968a
trying to get tests to pass and removing unecessary dependencies
travishathaway Feb 16, 2025
279ee89
removing unused modules
travishathaway Feb 17, 2025
f619de9
making formatting changes
travishathaway Feb 17, 2025
8f17020
fixing broken tests and adding TODO notes for documentation work
travishathaway Feb 19, 2025
c9df2a1
bumping version of pep* crates
travishathaway Feb 19, 2025
299f07c
pre-commit fixes: part one
travishathaway Feb 20, 2025
58c6b07
lots of linter fixes!
travishathaway Feb 20, 2025
1868b29
removing unnecessary snapshots
travishathaway Feb 20, 2025
49d0463
improved docs landing page
travishathaway Feb 21, 2025
c6a5ac6
Merge branch 'main' into issue-1044
travishathaway Feb 21, 2025
ad71ea4
making a couple of fixes
travishathaway Feb 22, 2025
148871b
adding a PackageDb example to the rattler_pypi_interop::index module
travishathaway Feb 22, 2025
7382dcc
adding an example for wheel files
travishathaway Feb 23, 2025
68f1b1d
adding a new example
travishathaway Feb 23, 2025
306cfec
Merge branch 'main' into issue-1044
travishathaway Feb 25, 2025
dfdd4e3
adding more examples to docs and adding more tests
travishathaway Feb 25, 2025
f037ea4
Merge branch 'main' into issue-1044
travishathaway Feb 25, 2025
531ef96
fix: create parent directories for file storage (#1045)
pavelzw Feb 6, 2025
b322ac8
chore: release (#1050)
baszalmstra Feb 6, 2025
9e32421
chore(rattler_index): release v0.20.10 (#1052)
baszalmstra Feb 6, 2025
c17c0fc
fix: make linter happy and add license-files (#1047)
wolfv Feb 6, 2025
218b97f
fix: add channels to constructor of Environment (#1051)
baszalmstra Feb 6, 2025
c6fa336
bump: py-rattler 0.10.0
baszalmstra Feb 6, 2025
fb13a34
removing a lot of stuff; not finished but wanted a check point for th…
travishathaway Feb 16, 2025
52aeee0
trying to get tests to pass and removing unecessary dependencies
travishathaway Feb 16, 2025
7561337
removing unused modules
travishathaway Feb 17, 2025
4f42798
making formatting changes
travishathaway Feb 17, 2025
57d4eae
fixing broken tests and adding TODO notes for documentation work
travishathaway Feb 19, 2025
d914bf4
bumping version of pep* crates
travishathaway Feb 19, 2025
a1b48df
pre-commit fixes: part one
travishathaway Feb 20, 2025
0b8ebcd
lots of linter fixes!
travishathaway Feb 20, 2025
93089bc
removing unnecessary snapshots
travishathaway Feb 20, 2025
e20fdca
improved docs landing page
travishathaway Feb 21, 2025
a51e715
chore: bump rust 1.84.1 (#1053)
baszalmstra Feb 6, 2025
107bd17
fix: use atomic tempfile to persist file credentials instead of locki…
baszalmstra Feb 6, 2025
2ff7d31
chore: release (#1056)
baszalmstra Feb 6, 2025
47fbb5c
fix: do not try to call `ldd` on non-linux systems (#1064)
wolfv Feb 13, 2025
f859a93
feat: implement `--no-deps` and `--only-deps` (#1068)
wolfv Feb 14, 2025
6f1fa12
fix: clobber issue where path was not correctly searched for in clobb…
wolfv Feb 17, 2025
d532554
fix: use new PackageRecord when issuing reinstallation in `Transactio…
jpcorreia99 Feb 17, 2025
2e2f783
feat: write prefix record atomically (#1063)
wolfv Feb 18, 2025
551265d
chore(ci): bump prefix-dev/setup-pixi from 0.8.1 to 0.8.2 (#1059)
dependabot[bot] Feb 18, 2025
521f85f
chore: update dependencies (#1069)
wolfv Feb 18, 2025
7b6b683
chore: release (#1071)
baszalmstra Feb 18, 2025
74d47cc
feat: add run_exports cache (#1060)
nichmor Feb 18, 2025
500a435
misc: use run-exports (#1077)
nichmor Feb 19, 2025
1e8d614
feat: initial wasm/ts/js bindings (#1079)
baszalmstra Feb 20, 2025
2d8f907
feat: add Version.compare to WASM Version (#1080)
trim21 Feb 20, 2025
c4fc485
fix: support file URL for run exports cache (#1081)
nichmor Feb 20, 2025
dcdc80a
fix(js): use api-extractor to fix typings (#1083)
baszalmstra Feb 20, 2025
8caf489
build(js): add esm output (#1084)
trim21 Feb 20, 2025
f75273f
chore(ci): bump the npm-dependencies group in /js-rattler with 6 upda…
dependabot[bot] Feb 20, 2025
14fd9e9
chore(js): add readme (#1087)
baszalmstra Feb 20, 2025
6fc77a1
chore(ci): bump prefix-dev/setup-pixi from 0.8.2 to 0.8.3 (#1085)
dependabot[bot] Feb 20, 2025
74c7d27
build(js): replace webpack with rollup and build universal esm packag…
trim21 Feb 20, 2025
7284834
fix: split matchspec on start of constraint (#1094)
baszalmstra Feb 20, 2025
0dad541
making a couple of fixes
travishathaway Feb 22, 2025
4b689b2
adding a PackageDb example to the rattler_pypi_interop::index module
travishathaway Feb 22, 2025
4e619bc
adding an example for wheel files
travishathaway Feb 23, 2025
9298548
adding a new example
travishathaway Feb 23, 2025
e1bc4d9
fix: compiling with pixi on linux (#1097)
Hofer-Julian Feb 24, 2025
dcff164
feat: add `rattler_menuinst` crate (#840)
wolfv Feb 25, 2025
ce1b824
adding more examples to docs and adding more tests
travishathaway Feb 25, 2025
865f750
Merge branch 'issue-1044' of github.com:travishathaway/rattler into i…
travishathaway Feb 26, 2025
be93011
adding a deserializer derive attribute
travishathaway Feb 27, 2025
1a1d701
Merge branch 'main' into issue-1044
travishathaway Mar 6, 2025
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
Prev Previous commit
Next Next commit
fix: split matchspec on start of constraint (#1094)
  • Loading branch information
baszalmstra authored and travishathaway committed Feb 26, 2025

Verified

This commit was signed with the committer’s verified signature.
mcodes-o MCodes
commit 728483457053375305dd1f897e6112680329d0bc
24 changes: 23 additions & 1 deletion crates/rattler_repodata_gateway/src/gateway/query.rs
Original file line number Diff line number Diff line change
@@ -268,7 +268,7 @@ impl RepoDataQuery {

for (_, dependencies) in record.package_record.extra_depends.iter() {
for dependency in dependencies {
let dependency_name = PackageName::new_unchecked(dependency.split_once(' ').unwrap_or((dependency, "")).0);
let dependency_name = package_name_from_match_spec_str(dependency);
if seen.insert(dependency_name.clone()) {
pending_package_specs.insert(dependency_name.clone(), SourceSpecs::Transitive);
}
@@ -412,3 +412,25 @@ impl IntoFuture for NamesQuery {
self.execute().boxed()
}
}

fn package_name_from_match_spec_str(spec: &str) -> PackageName {
let package_name_str = spec
.split_once(|c: char| c.is_whitespace() || matches!(c, '>' | '<' | '=' | '!' | '~'))
.map_or(spec, |(name, _)| name);
PackageName::new_unchecked(package_name_str)
}

#[cfg(test)]
mod test {
use rstest::*;

#[rstest]
#[case("pillow", "pillow")]
#[case("pillow >=10", "pillow")]
#[case("pillow>=10,<12", "pillow")]
#[case("pillow >=10, <12", "pillow")]
fn test_package_name_from_match_spec_str(#[case] spec: &str, #[case] expected: &str) {
let package_name = super::package_name_from_match_spec_str(spec);
assert_eq!(package_name.as_source(), expected);
}
}