py-rattler 0.13.1__cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl → 0.15.0__cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of py-rattler might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-rattler
3
- Version: 0.13.1
3
+ Version: 0.15.0
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: BSD License
@@ -52,7 +52,7 @@ Rattler is a library that provides common functionality used within the conda ec
52
52
  The goal of the library is to enable programs and other libraries to easily interact with the conda ecosystem without being dependent on Python.
53
53
  Its primary use case is as a library that you can use to provide conda related workflows in your own tools.
54
54
 
55
- Rattler is written in Rust and tries to provide a clean API to its functionalities (see: [Components](#components)).
55
+ Rattler is written in Rust and tries to provide a clean API to its functionalities (see: [Components](#components)).
56
56
  With the primary goal in mind we aim to provide bindings to different languages to make it easy to integrate Rattler in non-rust projects.
57
57
 
58
58
  Rattler is actively used by [pixi](https://github.com/prefix-dev/pixi), [rattler-build](https://github.com/prefix-dev/rattler-build), and the https://prefix.dev backend.
@@ -64,6 +64,75 @@ This is an example of installing an environment containing `cowpy` and all its d
64
64
 
65
65
  ![Installing an environment](https://github.com/conda/rattler/assets/4995967/c7946f6e-28a9-41ef-8836-ef4b4c94d273)
66
66
 
67
+ ## Python and Javascript bindings
68
+
69
+ You can invoke `rattler` from Python or Javascript via our powerful bindings to solve, install and run commands in conda environments. Rattler offers you the fastest and cleanest Python bindings to the conda ecosystem.
70
+
71
+ ### Python
72
+
73
+ To install the Python bindings, you can use pip or conda:
74
+
75
+ ```bash
76
+ pip install py-rattler
77
+ # or
78
+ conda install -c conda-forge py-rattler
79
+ ```
80
+
81
+ You can find the extensive documentation for the Python bindings [here](https://conda.github.io/rattler/py-rattler/).
82
+
83
+ <details>
84
+ <summary>Example usage of rattler from Python</summary>
85
+ The Python bindings to rattler are designed to be used with `asyncio`. You can access the raw power of the rattler library to solve environments, install packages, and run commands in the installed environments.
86
+
87
+ ```python
88
+ import asyncio
89
+ import tempfile
90
+
91
+ from rattler import solve, install, VirtualPackage
92
+
93
+ async def main() -> None:
94
+ # Start by solving the environment.
95
+ #
96
+ # Solving is the process of going from specifications of package and their
97
+ # version requirements to a list of concrete packages.
98
+ print("started solving the environment")
99
+ solved_records = await solve(
100
+ # Channels to use for solving
101
+ channels=["conda-forge"],
102
+ # The specs to solve for
103
+ specs=["python ~=3.12.0", "pip", "requests 2.31.0"],
104
+ # Virtual packages define the specifications of the environment
105
+ virtual_packages=VirtualPackage.detect(),
106
+ )
107
+ print("solved required dependencies")
108
+
109
+ # Install the packages into a new environment (or updates it if it already
110
+ # existed).
111
+ env_path = tempfile.mkdtemp()
112
+ await install(
113
+ records=solved_records,
114
+ target_prefix=env_path,
115
+ )
116
+
117
+ print(f"created environment: {env_path}")
118
+
119
+
120
+ if __name__ == "__main__":
121
+ asyncio.run(main())
122
+ ```
123
+ </details>
124
+
125
+ ### Javascript
126
+
127
+ To use the Javascript bindings, you can install the `@conda-org/rattler` package via npm. rattler is compiled to WebAssembly and can be used in the browser or in Node.js.
128
+
129
+ ```bash
130
+ npm install @conda-org/rattler
131
+ ```
132
+
133
+ Using rattler from Javascript is useful to get access to the same version comparison functions as used throughout the conda ecosystem. It is also used as part of [`mambajs`](https://github.com/emscripten-forge/mambajs) which uses the rattler library to solve and install packages from the emscripten-forge channel _in the browser_.
134
+
135
+
67
136
  ## Give it a try!
68
137
 
69
138
  Before you begin, make sure you have the following prerequisites:
@@ -93,24 +162,24 @@ Run the following command to start jupyterlab:
93
162
  ./.prefix/bin/jupyter-lab
94
163
  ```
95
164
 
96
- Voila!
97
- You have a working installation of jupyterlab installed on your system!
98
- You can of course install any package you want this way.
165
+ Voila!
166
+ You have a working installation of jupyterlab installed on your system!
167
+ You can of course install any package you want this way.
99
168
  Try it!
100
169
 
101
170
  ## Contributing 😍
102
171
 
103
- We would love to have you contribute!
104
- See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server.
172
+ We would love to have you contribute!
173
+ See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server.
105
174
  You can [join our discord server via this link][chat-url].
106
175
 
107
176
 
108
177
  ## Components
109
178
 
110
- Rattler consists of several crates that provide different functionalities.
179
+ Rattler consists of several crates that provide different functionalities.
111
180
 
112
181
  * **rattler_conda_types**: foundational types for all datastructures used within the conda eco-system.
113
- * **rattler_package_streaming**: provides functionality to download, extract and create conda package archives.
182
+ * **rattler_package_streaming**: provides functionality to download, extract and create conda package archives.
114
183
  * **rattler_repodata_gateway**: downloads, reads and processes information about existing conda packages from an index.
115
184
  * **rattler_shell**: code to activate an existing environment and run programs in it.
116
185
  * **rattler_solve**: a backend agnostic library to solve the package satisfiability problem.
@@ -1,62 +1,62 @@
1
- py_rattler-0.13.1.dist-info/METADATA,sha256=Rr2E94GLr-7_oXjqHW3XgP-l7kYHLgw2GobYO7YE6zA,7910
2
- py_rattler-0.13.1.dist-info/WHEEL,sha256=3TinPYnt4CFOqWAu30MbbZRMdVq42rDXuvLp9oRb4Ew,129
3
- rattler/package_streaming/__init__.py,sha256=I-mbr0sJnHzdFQP8v0Yb_GKpu4bIO3JbAJtq_wzA71Q,898
4
- rattler/solver/__init__.py,sha256=NZabrelb_pcqOi5PyZTr3OeBbjd85IqW1-2ymOBO-k0,119
5
- rattler/solver/solver.py,sha256=EEF86vA-ryVuBmq5uOomgzPq1BGXsNcAhJvf7JKVVDQ,11259
6
- rattler/explicit_environment/__init__.py,sha256=QHmwZkdVt-tFL-tEEdhLdH3apuI5F7ElpMzCRZeH3_o,170
1
+ py_rattler-0.15.0.dist-info/METADATA,sha256=RdzX-xtkcRqxw7G_HH96VvtW6DtiRaKxviuOY-_kzbs,10328
2
+ py_rattler-0.15.0.dist-info/WHEEL,sha256=3TinPYnt4CFOqWAu30MbbZRMdVq42rDXuvLp9oRb4Ew,129
3
+ rattler/exceptions.py,sha256=2ivs3zwllwQwn1InBiArbrZbTzPXpssv7fzZkGdRpnI,4059
4
+ rattler/shell/shell.py,sha256=n9bAb0YQpdiOB62nFUIuWDoAzXnKRi1Y-fHEW9wVIg4,4442
5
+ rattler/shell/__init__.py,sha256=GW5Amfmw7ln9l4kBBZCelaJxYBP5xbk5NjdNLMZhNMU,179
7
6
  rattler/explicit_environment/environment.py,sha256=Dqcvm5c7C3K0FJ04YVN8WIUrl0R8Fe2TeXZ4Qq8Dg-0,2641
8
- rattler/match_spec/__init__.py,sha256=uBV3ov1VlCIZlIWhkxxMPcTqRBF5p5lqvT2g6kQv5kQ,167
9
- rattler/match_spec/match_spec.py,sha256=fyrvd9VUURJyHaJDqNdzJNa3dZZpKLUmhjGVWtdGV4w,9525
10
- rattler/match_spec/nameless_match_spec.py,sha256=f4P44Im6CL_yq7rcSE2XRfHRRSLZ1aAKVgrNggpzQ6c,4618
7
+ rattler/explicit_environment/__init__.py,sha256=QHmwZkdVt-tFL-tEEdhLdH3apuI5F7ElpMzCRZeH3_o,170
8
+ rattler/version/version.py,sha256=06are6AdWAEDQafi5RrB8ORH87CcmtjcmpOaMhEwdn0,15973
9
+ rattler/version/__init__.py,sha256=FQ_4xuCz_2tTPlIeSA_1SkPEP_DpuXw6tDDjsptMTZo,146
10
+ rattler/version/with_source.py,sha256=nEW_jetdsB-5hKnxHVYgwOsd0EAe0fNKaCLlD4fIZiM,2539
11
+ rattler/lock/channel.py,sha256=PaLb-vWRLTJWUx7fyMdP2Tow5wMlGuq3WUrHkrQIzeg,1331
12
+ rattler/lock/package.py,sha256=C-lvnRWoRtj9CBRR2i5Eku_lFnBDI9Bf8vY57DWZ4YU,9035
13
+ rattler/lock/environment.py,sha256=sbcGqkb9rrGwpVCucDKkwdp2SFOyHZQGqvBArGEZFYs,7915
11
14
  rattler/lock/lock_file.py,sha256=ZP-ElSJ7WKkqOE6rj4U6OmM63GLcDH_yTg1H_Qoa60E,3455
12
15
  rattler/lock/__init__.py,sha256=JkighOKfDQBqX3xrw1NXYlA_j1IFNI47_s6p2XvFtQc,571
13
- rattler/lock/package.py,sha256=C-lvnRWoRtj9CBRR2i5Eku_lFnBDI9Bf8vY57DWZ4YU,9035
14
16
  rattler/lock/hash.py,sha256=qNig1sf5EfRfaCK9x352DgqTpLdo75Gu4qvRZDbL33Q,805
15
- rattler/lock/environment.py,sha256=sbcGqkb9rrGwpVCucDKkwdp2SFOyHZQGqvBArGEZFYs,7915
16
- rattler/lock/channel.py,sha256=PaLb-vWRLTJWUx7fyMdP2Tow5wMlGuq3WUrHkrQIzeg,1331
17
- rattler/prefix/prefix_record.py,sha256=KWbjcBJO-KpdWz2VEYdlz_RPLpLByyaec0aViILi_EM,6290
18
- rattler/prefix/__init__.py,sha256=gkgyqZ0yTmxOCW8DHuSG-X0spEzb8BIoiox8YG50XYc,257
19
- rattler/prefix/prefix_paths.py,sha256=B0EwOFkVbSzuLChdjkjenTehfxjXwwMBIodSGOfBHFU,12828
20
- rattler/platform/arch.py,sha256=7tanyDql5BvDvY9UryEXyTJ9nWRfx6bn7BWrl6fGEfI,1145
21
- rattler/platform/__init__.py,sha256=YZaXxnJmG_WjYbhIAxA0jQDhaPYAR4rTVQCm4yRoyZQ,154
22
- rattler/platform/platform.py,sha256=H_P35Z0irNiyQX2fxX7ombMkGwyYa-Ow_iDIDxJrmG8,4395
23
- rattler/__init__.py,sha256=QKjBUll9mX4TVwJy-dy5Gt8IezLnJz8EPTlKhOsw2IA,2476
24
- rattler/repo_data/gateway.py,sha256=G9CTfz6Qc84Wo3QJSxWjsCH79WOohSxxUxYwKiss8ng,10141
25
- rattler/repo_data/sparse.py,sha256=qO3XuIfvcDEfo8mHu8UB9JBoz0IR3k_kNR32ZTpbPWU,12542
26
- rattler/repo_data/package_record.py,sha256=t8vxRsfAToIolhBRjt9lB4e5Q7Tm-FjZHUI9vhxd-eA,28358
27
- rattler/repo_data/__init__.py,sha256=cMoMtFOJBGonfWxizGphWpXdQ1GYXDXos7ESYigfco8,549
28
- rattler/repo_data/repo_data.py,sha256=lB7hQ1SN5b2VxuOaOH1BOFeIXbRUf2fslitLyT5aVwo,2264
17
+ rattler/virtual_package/__init__.py,sha256=pOvvD-8V6Ld5gYBj2KPI3-cZLx8m2hcl6dqRUoBTHuw,262
18
+ rattler/virtual_package/generic.py,sha256=ztDVHLNbO2SemZSpdoa2SdoXcZT1hopvBFQ11fNBZmQ,4411
19
+ rattler/virtual_package/virtual_package.py,sha256=hrFvoT2LjIsW5ubfXdXEZnKlSIfLP5G4vrbJST9xukI,6707
20
+ rattler/solver/solver.py,sha256=EEF86vA-ryVuBmq5uOomgzPq1BGXsNcAhJvf7JKVVDQ,11259
21
+ rattler/solver/__init__.py,sha256=NZabrelb_pcqOi5PyZTr3OeBbjd85IqW1-2ymOBO-k0,119
29
22
  rattler/repo_data/patch_instructions.py,sha256=TNa7NgLtqGQ6lSpibLFxuPFwsmqRLrORpDZOpeZ5fnk,694
30
23
  rattler/repo_data/record.py,sha256=6CK2-KyvVZ8kaZ2l-o4DFWivxMJE_ChkOrm97bmIjn4,4572
31
- rattler/version/with_source.py,sha256=nEW_jetdsB-5hKnxHVYgwOsd0EAe0fNKaCLlD4fIZiM,2539
32
- rattler/version/version.py,sha256=06are6AdWAEDQafi5RrB8ORH87CcmtjcmpOaMhEwdn0,15973
33
- rattler/version/__init__.py,sha256=FQ_4xuCz_2tTPlIeSA_1SkPEP_DpuXw6tDDjsptMTZo,146
34
- rattler/exceptions.py,sha256=2ivs3zwllwQwn1InBiArbrZbTzPXpssv7fzZkGdRpnI,4059
35
- rattler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
- rattler/shell/__init__.py,sha256=GW5Amfmw7ln9l4kBBZCelaJxYBP5xbk5NjdNLMZhNMU,179
37
- rattler/shell/shell.py,sha256=n9bAb0YQpdiOB62nFUIuWDoAzXnKRi1Y-fHEW9wVIg4,4442
38
- rattler/package/paths_json.py,sha256=7l2Wmqobwcoe-TStXhoafWzXCT4OWif_yAAa6KVnKyg,21465
39
- rattler/package/__init__.py,sha256=omXnLVICkiH7HiaUzpRWAaJxS955Uimm1pT8dejJgVU,624
24
+ rattler/repo_data/gateway.py,sha256=tK6XmTGbafZjvEo6_T8G-iYTu10MtJkAtg4fhtA9A60,10019
25
+ rattler/repo_data/__init__.py,sha256=cMoMtFOJBGonfWxizGphWpXdQ1GYXDXos7ESYigfco8,549
26
+ rattler/repo_data/package_record.py,sha256=t8vxRsfAToIolhBRjt9lB4e5Q7Tm-FjZHUI9vhxd-eA,28358
27
+ rattler/repo_data/sparse.py,sha256=qO3XuIfvcDEfo8mHu8UB9JBoz0IR3k_kNR32ZTpbPWU,12542
28
+ rattler/repo_data/repo_data.py,sha256=lB7hQ1SN5b2VxuOaOH1BOFeIXbRUf2fslitLyT5aVwo,2264
29
+ rattler/channel/channel.py,sha256=kGeZKa_YkSM943CA1i_8O1FXG9kS9hkrnmSl6OhkbbQ,2474
30
+ rattler/channel/channel_config.py,sha256=rRD4dGeHTBIcm3vTuQR1wTGTELNdN69yq4lyCaTaN3M,1532
31
+ rattler/channel/__init__.py,sha256=K-ZAo0qFzchXWP-6DpMHLg_djGD25-0CRwusisIGp8k,221
32
+ rattler/channel/channel_priority.py,sha256=OQfCHp_DeInkMB0YahCf2X7yCk0_RtM_C_Vy4Ny-65M,474
33
+ rattler/install/installer.py,sha256=akUuojDLiP5jcd1vbX__xLjBg2B46sFNSKk4RBYjvIc,3559
34
+ rattler/install/__init__.py,sha256=F_DwKOql1YkdV78JV5jT0RglNhs2ZwSup9uWGv9wO4I,69
35
+ rattler/package_streaming/__init__.py,sha256=I-mbr0sJnHzdFQP8v0Yb_GKpu4bIO3JbAJtq_wzA71Q,898
36
+ rattler/prefix/prefix_paths.py,sha256=B0EwOFkVbSzuLChdjkjenTehfxjXwwMBIodSGOfBHFU,12828
37
+ rattler/prefix/prefix_record.py,sha256=KWbjcBJO-KpdWz2VEYdlz_RPLpLByyaec0aViILi_EM,6290
38
+ rattler/prefix/__init__.py,sha256=gkgyqZ0yTmxOCW8DHuSG-X0spEzb8BIoiox8YG50XYc,257
40
39
  rattler/package/about_json.py,sha256=FElWUXFNeF1gQJXE6lmYNEdxQjhsuimVObIeqxn3y8M,8958
41
- rattler/package/run_exports_json.py,sha256=fZlM_H7IBuVi6lfL4SLsV_NDb22TgFhpCkxjm8YIvfg,9305
42
40
  rattler/package/index_json.py,sha256=BxnJg5SPpiFsLhabz-Uuvc4ea_sg4N7Q-hqdQnXk8oc,12419
43
- rattler/package/no_arch_type.py,sha256=y_1spiImY3654SDLRQWyp5mqr4l-gYKIuK4pCnEPj1s,3740
41
+ rattler/package/run_exports_json.py,sha256=fZlM_H7IBuVi6lfL4SLsV_NDb22TgFhpCkxjm8YIvfg,9305
44
42
  rattler/package/package_name.py,sha256=bX5CpTwyWOOuUlrejHmbJzz1R0KcchtWHLskOfA-Dlk,4426
45
- rattler/install/__init__.py,sha256=F_DwKOql1YkdV78JV5jT0RglNhs2ZwSup9uWGv9wO4I,69
46
- rattler/install/installer.py,sha256=akUuojDLiP5jcd1vbX__xLjBg2B46sFNSKk4RBYjvIc,3559
43
+ rattler/package/__init__.py,sha256=omXnLVICkiH7HiaUzpRWAaJxS955Uimm1pT8dejJgVU,624
44
+ rattler/package/no_arch_type.py,sha256=y_1spiImY3654SDLRQWyp5mqr4l-gYKIuK4pCnEPj1s,3740
45
+ rattler/package/paths_json.py,sha256=7l2Wmqobwcoe-TStXhoafWzXCT4OWif_yAAa6KVnKyg,21465
46
+ rattler/__init__.py,sha256=QKjBUll9mX4TVwJy-dy5Gt8IezLnJz8EPTlKhOsw2IA,2476
47
+ rattler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
+ rattler/platform/arch.py,sha256=7tanyDql5BvDvY9UryEXyTJ9nWRfx6bn7BWrl6fGEfI,1145
49
+ rattler/platform/__init__.py,sha256=YZaXxnJmG_WjYbhIAxA0jQDhaPYAR4rTVQCm4yRoyZQ,154
50
+ rattler/platform/platform.py,sha256=H_P35Z0irNiyQX2fxX7ombMkGwyYa-Ow_iDIDxJrmG8,4395
47
51
  rattler/utils/rattler_version.py,sha256=eXAVN6NYg5EmsQ_DrfgxW1yJ_eWAlWx7IANasMRYgV4,526
48
- rattler/networking/__init__.py,sha256=Wlob5pywEgiqmAq8sVKyJS6qOpRegKemtcXTkwDED20,474
49
52
  rattler/networking/middleware.py,sha256=S1eArDWo45dKo8Um6mMYMOPs_OIdhLamejEQs8KorCQ,4838
50
- rattler/networking/client.py,sha256=rRmbeEQYO1afHDgjgSncq68hSkFpyZ1ktYgC_Q_7LBQ,1528
53
+ rattler/networking/__init__.py,sha256=Wlob5pywEgiqmAq8sVKyJS6qOpRegKemtcXTkwDED20,474
54
+ rattler/networking/client.py,sha256=hMe-eq8n8KkiqTlu4MR-9fc30AwSJd0dB_h60famki0,1584
51
55
  rattler/networking/fetch_repo_data.py,sha256=sO3dDNdvJev6TOblnGEzpFYnY2xorfr5A5zrjsTDbWk,3714
56
+ rattler/index/index.py,sha256=REYuZWRhb9eJiC7fQe7JL_rm-HgN1UfI1RQmvA75CYs,4165
52
57
  rattler/index/__init__.py,sha256=Y-fiAzMcJSbL006dpALwGEhuMSTxuR1XC4o2gMqWcKA,87
53
- rattler/index/index.py,sha256=jxm6v9gJtyg-AIizrpf0f5NOTMwA5SMvcbCL_HdnUG0,3725
54
- rattler/virtual_package/__init__.py,sha256=pOvvD-8V6Ld5gYBj2KPI3-cZLx8m2hcl6dqRUoBTHuw,262
55
- rattler/virtual_package/virtual_package.py,sha256=hrFvoT2LjIsW5ubfXdXEZnKlSIfLP5G4vrbJST9xukI,6707
56
- rattler/virtual_package/generic.py,sha256=ztDVHLNbO2SemZSpdoa2SdoXcZT1hopvBFQ11fNBZmQ,4411
57
- rattler/channel/__init__.py,sha256=K-ZAo0qFzchXWP-6DpMHLg_djGD25-0CRwusisIGp8k,221
58
- rattler/channel/channel_config.py,sha256=rRD4dGeHTBIcm3vTuQR1wTGTELNdN69yq4lyCaTaN3M,1532
59
- rattler/channel/channel_priority.py,sha256=OQfCHp_DeInkMB0YahCf2X7yCk0_RtM_C_Vy4Ny-65M,474
60
- rattler/channel/channel.py,sha256=kGeZKa_YkSM943CA1i_8O1FXG9kS9hkrnmSl6OhkbbQ,2474
61
- rattler/rattler.abi3.so,sha256=GAbReE51PUJbQF6r-LpM1Kjtt5WCHFPZvf6wb4wp3Ew,52562032
62
- py_rattler-0.13.1.dist-info/RECORD,,
58
+ rattler/match_spec/match_spec.py,sha256=fyrvd9VUURJyHaJDqNdzJNa3dZZpKLUmhjGVWtdGV4w,9525
59
+ rattler/match_spec/nameless_match_spec.py,sha256=pn__lFSo6chFqDWLIag5jjwumiX2kiTDguMYIdy-lu8,4599
60
+ rattler/match_spec/__init__.py,sha256=uBV3ov1VlCIZlIWhkxxMPcTqRBF5p5lqvT2g6kQv5kQ,167
61
+ rattler/rattler.abi3.so,sha256=hHrrPRei33-eyqjvDAt1BCFXAluqTWTzYa8esRjlfMU,54031976
62
+ py_rattler-0.15.0.dist-info/RECORD,,
rattler/index/index.py CHANGED
@@ -11,8 +11,10 @@ async def index_fs(
11
11
  channel_directory: os.PathLike[str],
12
12
  target_platform: Optional[Platform] = None,
13
13
  repodata_patch: Optional[str] = None,
14
+ write_zst: bool = True,
15
+ write_shards: bool = True,
14
16
  force: bool = False,
15
- max_parallel: int = 128,
17
+ max_parallel: int | None = None,
16
18
  ) -> None:
17
19
  """
18
20
  Indexes dependencies in the `channel_directory` for one or more subdirectories within said directory.
@@ -26,6 +28,8 @@ async def index_fs(
26
28
  of dependencies to index.
27
29
  target_platform: A `Platform` to index dependencies for.
28
30
  repodata_patch: The name of the conda package (expected to be in the `noarch` subdir) that should be used for repodata patching.
31
+ write_zst: Whether to write repodata.json.zst.
32
+ write_shards: Whether to write sharded repodata.
29
33
  force: Whether to forcefully re-index all subdirs.
30
34
  max_parallel: The maximum number of packages to process in-memory simultaneously.
31
35
  """
@@ -33,6 +37,8 @@ async def index_fs(
33
37
  channel_directory,
34
38
  target_platform._inner if target_platform else target_platform,
35
39
  repodata_patch,
40
+ write_zst,
41
+ write_shards,
36
42
  force,
37
43
  max_parallel,
38
44
  )
@@ -48,8 +54,10 @@ async def index_s3(
48
54
  session_token: Optional[str] = None,
49
55
  target_platform: Optional[Platform] = None,
50
56
  repodata_patch: Optional[str] = None,
57
+ write_zst: bool = True,
58
+ write_shards: bool = True,
51
59
  force: bool = False,
52
- max_parallel: int = 128,
60
+ max_parallel: int | None = None,
53
61
  ) -> None:
54
62
  """
55
63
  Indexes dependencies in the `channel_url` for one or more subdirectories in the S3 directory.
@@ -69,6 +77,8 @@ async def index_s3(
69
77
  session_token: The session token to use for authentication.
70
78
  target_platform: A `Platform` to index dependencies for.
71
79
  repodata_patch: The name of the conda package (expected to be in the `noarch` subdir) that should be used for repodata patching.
80
+ write_zst: Whether to write repodata.json.zst.
81
+ write_shards: Whether to write sharded repodata.
72
82
  force: Whether to forcefully re-index all subdirs.
73
83
  max_parallel: The maximum number of packages to process in-memory simultaneously.
74
84
  """
@@ -82,6 +92,8 @@ async def index_s3(
82
92
  session_token,
83
93
  target_platform._inner if target_platform else target_platform,
84
94
  repodata_patch,
95
+ write_zst,
96
+ write_shards,
85
97
  force,
86
98
  max_parallel,
87
99
  )
@@ -71,9 +71,8 @@ class NamelessMatchSpec:
71
71
  """
72
72
  The channel of the package.
73
73
  """
74
- if (channel := self._nameless_match_spec.channel) is not None:
75
- return Channel(channel.name)
76
- return None
74
+ channel = self._nameless_match_spec.channel
75
+ return channel and Channel._from_py_channel(channel)
77
76
 
78
77
  @property
79
78
  def subdir(self) -> Optional[str]:
@@ -20,9 +20,10 @@ class Client:
20
20
  middlewares: (
21
21
  list[AuthenticationMiddleware | MirrorMiddleware | OciMiddleware | GCSMiddleware | S3Middleware] | None
22
22
  ) = None,
23
+ headers: dict[str, str] | None = None,
23
24
  ) -> None:
24
25
  self._client = PyClientWithMiddleware(
25
- [middleware._middleware for middleware in middlewares] if middlewares else None
26
+ [middleware._middleware for middleware in middlewares] if middlewares else None, headers
26
27
  )
27
28
 
28
29
  @classmethod
rattler/rattler.abi3.so CHANGED
Binary file
@@ -37,7 +37,7 @@ class SourceConfig:
37
37
 
38
38
  cache_action: CacheAction = "cache-or-fetch"
39
39
  """How to interact with the cache.
40
-
40
+
41
41
  * `'cache-or-fetch'` (default): Use the cache if its up to date or fetch from the URL if there is no valid cached value.
42
42
  * `'use-cache-only'`: Only use the cache, but error out if the cache is not up to date
43
43
  * `'force-cache-only'`: Only use the cache, ignore whether or not it is up to date.
@@ -116,10 +116,7 @@ class Gateway:
116
116
  self._gateway = PyGateway(
117
117
  cache_dir=cache_dir,
118
118
  default_config=default_config._into_py(),
119
- per_channel_config={
120
- channel._channel if isinstance(channel, Channel) else Channel(channel)._channel: config._into_py()
121
- for channel, config in (per_channel_config or {}).items()
122
- },
119
+ per_channel_config={channel: config._into_py() for channel, config in (per_channel_config or {}).items()},
123
120
  max_concurrent_requests=max_concurrent_requests,
124
121
  client=client._client if client is not None else None,
125
122
  )