py-rattler 0.14.0__cp38-abi3-musllinux_1_2_armv7l.whl → 0.16.0__cp38-abi3-musllinux_1_2_armv7l.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.14.0
3
+ Version: 0.16.0
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: BSD License
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
10
10
  Classifier: Typing :: Typed
11
11
  Summary: A blazing fast library to work with the conda ecosystem
12
12
  Author-email: Bas Zalmstra <zalmstra.bas@gmail.com>, Tarun Pratap Singh <pratapsinghtarun9@gmail.com>
13
- License: BSD-3-Clause
13
+ License-Expression: BSD-3-Clause
14
14
  Requires-Python: >=3.8
15
15
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
16
16
  Project-URL: Homepage, https://github.com/conda/rattler
@@ -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,63 +1,63 @@
1
- py_rattler-0.14.0.dist-info/METADATA,sha256=eLtd7JlsbnXua5A_5YrqZDCLm6udPL4yKEp1qltDQrU,7910
2
- py_rattler-0.14.0.dist-info/WHEEL,sha256=6TI5-bE0swf5JGsPu_6BfXnUeHsOWQNmHJxNgRgW6EU,105
3
- rattler.libs/libgcc_s-5b5488a6.so.1,sha256=HGKUsVmTeNAxEdSy7Ua5Vh_I9FN3RCbPWzvZ7H_TrwE,2749061
4
- rattler/package_streaming/__init__.py,sha256=I-mbr0sJnHzdFQP8v0Yb_GKpu4bIO3JbAJtq_wzA71Q,898
5
- rattler/solver/__init__.py,sha256=NZabrelb_pcqOi5PyZTr3OeBbjd85IqW1-2ymOBO-k0,119
6
- rattler/solver/solver.py,sha256=EEF86vA-ryVuBmq5uOomgzPq1BGXsNcAhJvf7JKVVDQ,11259
1
+ py_rattler-0.16.0.dist-info/METADATA,sha256=Bx48H0csQlFHsxvMEBK6rpNZqctAqhLZZSlDJOOYx6c,10339
2
+ py_rattler-0.16.0.dist-info/WHEEL,sha256=0uVdf5TPqjpf0N8X4FqhUSzSJmbqPk4xsssud3ZOdts,105
3
+ rattler.libs/libgcc_s-0366c7ba.so.1,sha256=QjFj5R7pVqB-p92h2JTCmlyfd3UKsVGW_Y_l3SqOAaU,2753157
4
+ rattler/__init__.py,sha256=QKjBUll9mX4TVwJy-dy5Gt8IezLnJz8EPTlKhOsw2IA,2476
5
+ rattler/channel/__init__.py,sha256=K-ZAo0qFzchXWP-6DpMHLg_djGD25-0CRwusisIGp8k,221
6
+ rattler/channel/channel.py,sha256=kGeZKa_YkSM943CA1i_8O1FXG9kS9hkrnmSl6OhkbbQ,2474
7
+ rattler/channel/channel_config.py,sha256=rRD4dGeHTBIcm3vTuQR1wTGTELNdN69yq4lyCaTaN3M,1532
8
+ rattler/channel/channel_priority.py,sha256=OQfCHp_DeInkMB0YahCf2X7yCk0_RtM_C_Vy4Ny-65M,474
9
+ rattler/exceptions.py,sha256=2ivs3zwllwQwn1InBiArbrZbTzPXpssv7fzZkGdRpnI,4059
7
10
  rattler/explicit_environment/__init__.py,sha256=QHmwZkdVt-tFL-tEEdhLdH3apuI5F7ElpMzCRZeH3_o,170
8
11
  rattler/explicit_environment/environment.py,sha256=Dqcvm5c7C3K0FJ04YVN8WIUrl0R8Fe2TeXZ4Qq8Dg-0,2641
9
- rattler/match_spec/__init__.py,sha256=uBV3ov1VlCIZlIWhkxxMPcTqRBF5p5lqvT2g6kQv5kQ,167
10
- rattler/match_spec/match_spec.py,sha256=fyrvd9VUURJyHaJDqNdzJNa3dZZpKLUmhjGVWtdGV4w,9525
11
- rattler/match_spec/nameless_match_spec.py,sha256=f4P44Im6CL_yq7rcSE2XRfHRRSLZ1aAKVgrNggpzQ6c,4618
12
- rattler/lock/lock_file.py,sha256=ZP-ElSJ7WKkqOE6rj4U6OmM63GLcDH_yTg1H_Qoa60E,3455
12
+ rattler/index/__init__.py,sha256=X02qeNDYnyWR-J7FaAvNoQfw5DtYRbUGtNEq5nAva0Y,119
13
+ rattler/index/index.py,sha256=4Di_aIAtvspRflUoIcD4rZj-4za6i3ewWa8FK7kSlSg,4342
14
+ rattler/install/__init__.py,sha256=F_DwKOql1YkdV78JV5jT0RglNhs2ZwSup9uWGv9wO4I,69
15
+ rattler/install/installer.py,sha256=AuEgn19qhEQBOqjYErQLKhb9p704fgRhA4ZIHOab0sQ,4227
13
16
  rattler/lock/__init__.py,sha256=JkighOKfDQBqX3xrw1NXYlA_j1IFNI47_s6p2XvFtQc,571
14
- rattler/lock/package.py,sha256=C-lvnRWoRtj9CBRR2i5Eku_lFnBDI9Bf8vY57DWZ4YU,9035
15
- rattler/lock/hash.py,sha256=qNig1sf5EfRfaCK9x352DgqTpLdo75Gu4qvRZDbL33Q,805
16
- rattler/lock/environment.py,sha256=sbcGqkb9rrGwpVCucDKkwdp2SFOyHZQGqvBArGEZFYs,7915
17
17
  rattler/lock/channel.py,sha256=PaLb-vWRLTJWUx7fyMdP2Tow5wMlGuq3WUrHkrQIzeg,1331
18
- rattler/prefix/prefix_record.py,sha256=KWbjcBJO-KpdWz2VEYdlz_RPLpLByyaec0aViILi_EM,6290
18
+ rattler/lock/environment.py,sha256=sbcGqkb9rrGwpVCucDKkwdp2SFOyHZQGqvBArGEZFYs,7915
19
+ rattler/lock/hash.py,sha256=qNig1sf5EfRfaCK9x352DgqTpLdo75Gu4qvRZDbL33Q,805
20
+ rattler/lock/lock_file.py,sha256=ZP-ElSJ7WKkqOE6rj4U6OmM63GLcDH_yTg1H_Qoa60E,3455
21
+ rattler/lock/package.py,sha256=FnjWrHfcgRgqZepCKuCDA7tuIa0INGF8ivGswkQ_17E,9024
22
+ rattler/match_spec/__init__.py,sha256=uBV3ov1VlCIZlIWhkxxMPcTqRBF5p5lqvT2g6kQv5kQ,167
23
+ rattler/match_spec/match_spec.py,sha256=fyrvd9VUURJyHaJDqNdzJNa3dZZpKLUmhjGVWtdGV4w,9525
24
+ rattler/match_spec/nameless_match_spec.py,sha256=pn__lFSo6chFqDWLIag5jjwumiX2kiTDguMYIdy-lu8,4599
25
+ rattler/networking/__init__.py,sha256=Wlob5pywEgiqmAq8sVKyJS6qOpRegKemtcXTkwDED20,474
26
+ rattler/networking/client.py,sha256=hMe-eq8n8KkiqTlu4MR-9fc30AwSJd0dB_h60famki0,1584
27
+ rattler/networking/fetch_repo_data.py,sha256=sO3dDNdvJev6TOblnGEzpFYnY2xorfr5A5zrjsTDbWk,3714
28
+ rattler/networking/middleware.py,sha256=S1eArDWo45dKo8Um6mMYMOPs_OIdhLamejEQs8KorCQ,4838
29
+ rattler/package/__init__.py,sha256=omXnLVICkiH7HiaUzpRWAaJxS955Uimm1pT8dejJgVU,624
30
+ rattler/package/about_json.py,sha256=FElWUXFNeF1gQJXE6lmYNEdxQjhsuimVObIeqxn3y8M,8958
31
+ rattler/package/index_json.py,sha256=BxnJg5SPpiFsLhabz-Uuvc4ea_sg4N7Q-hqdQnXk8oc,12419
32
+ rattler/package/no_arch_type.py,sha256=y_1spiImY3654SDLRQWyp5mqr4l-gYKIuK4pCnEPj1s,3740
33
+ rattler/package/package_name.py,sha256=bX5CpTwyWOOuUlrejHmbJzz1R0KcchtWHLskOfA-Dlk,4426
34
+ rattler/package/paths_json.py,sha256=7l2Wmqobwcoe-TStXhoafWzXCT4OWif_yAAa6KVnKyg,21465
35
+ rattler/package/run_exports_json.py,sha256=fZlM_H7IBuVi6lfL4SLsV_NDb22TgFhpCkxjm8YIvfg,9305
36
+ rattler/package_streaming/__init__.py,sha256=I-mbr0sJnHzdFQP8v0Yb_GKpu4bIO3JbAJtq_wzA71Q,898
37
+ rattler/platform/__init__.py,sha256=YZaXxnJmG_WjYbhIAxA0jQDhaPYAR4rTVQCm4yRoyZQ,154
38
+ rattler/platform/arch.py,sha256=7tanyDql5BvDvY9UryEXyTJ9nWRfx6bn7BWrl6fGEfI,1145
39
+ rattler/platform/platform.py,sha256=FPHoKsJm717LkEZurFOM1LV_8BhLfJeKjsqrte2mZnQ,4896
19
40
  rattler/prefix/__init__.py,sha256=gkgyqZ0yTmxOCW8DHuSG-X0spEzb8BIoiox8YG50XYc,257
20
41
  rattler/prefix/prefix_paths.py,sha256=B0EwOFkVbSzuLChdjkjenTehfxjXwwMBIodSGOfBHFU,12828
21
- rattler/platform/arch.py,sha256=7tanyDql5BvDvY9UryEXyTJ9nWRfx6bn7BWrl6fGEfI,1145
22
- rattler/platform/__init__.py,sha256=YZaXxnJmG_WjYbhIAxA0jQDhaPYAR4rTVQCm4yRoyZQ,154
23
- rattler/platform/platform.py,sha256=H_P35Z0irNiyQX2fxX7ombMkGwyYa-Ow_iDIDxJrmG8,4395
24
- rattler/__init__.py,sha256=QKjBUll9mX4TVwJy-dy5Gt8IezLnJz8EPTlKhOsw2IA,2476
25
- rattler/repo_data/gateway.py,sha256=EMit1hPVJdHOXHDaodORMfayz4P896xRy5A2ksV8TT0,10023
26
- rattler/repo_data/sparse.py,sha256=qO3XuIfvcDEfo8mHu8UB9JBoz0IR3k_kNR32ZTpbPWU,12542
27
- rattler/repo_data/package_record.py,sha256=t8vxRsfAToIolhBRjt9lB4e5Q7Tm-FjZHUI9vhxd-eA,28358
42
+ rattler/prefix/prefix_record.py,sha256=1ALSRxHlhkOAl86_HKhU_l-Ny0PK11je6rnHo9alfh8,7048
43
+ rattler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
+ rattler/rattler.abi3.so,sha256=wSmzqZ-LHZ26uuC80yYVIrk5PmAJU_3NdUPQ8EBbytU,43311717
28
45
  rattler/repo_data/__init__.py,sha256=cMoMtFOJBGonfWxizGphWpXdQ1GYXDXos7ESYigfco8,549
29
- rattler/repo_data/repo_data.py,sha256=lB7hQ1SN5b2VxuOaOH1BOFeIXbRUf2fslitLyT5aVwo,2264
46
+ rattler/repo_data/gateway.py,sha256=tK6XmTGbafZjvEo6_T8G-iYTu10MtJkAtg4fhtA9A60,10019
47
+ rattler/repo_data/package_record.py,sha256=t8vxRsfAToIolhBRjt9lB4e5Q7Tm-FjZHUI9vhxd-eA,28358
30
48
  rattler/repo_data/patch_instructions.py,sha256=TNa7NgLtqGQ6lSpibLFxuPFwsmqRLrORpDZOpeZ5fnk,694
31
49
  rattler/repo_data/record.py,sha256=6CK2-KyvVZ8kaZ2l-o4DFWivxMJE_ChkOrm97bmIjn4,4572
32
- rattler/version/with_source.py,sha256=nEW_jetdsB-5hKnxHVYgwOsd0EAe0fNKaCLlD4fIZiM,2539
33
- rattler/version/version.py,sha256=06are6AdWAEDQafi5RrB8ORH87CcmtjcmpOaMhEwdn0,15973
34
- rattler/version/__init__.py,sha256=FQ_4xuCz_2tTPlIeSA_1SkPEP_DpuXw6tDDjsptMTZo,146
35
- rattler/exceptions.py,sha256=2ivs3zwllwQwn1InBiArbrZbTzPXpssv7fzZkGdRpnI,4059
36
- rattler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ rattler/repo_data/repo_data.py,sha256=39VnTUVCwXDy22FD1UluA3MGyzUYw2rLY9G91u-28TE,2261
51
+ rattler/repo_data/sparse.py,sha256=qO3XuIfvcDEfo8mHu8UB9JBoz0IR3k_kNR32ZTpbPWU,12542
37
52
  rattler/shell/__init__.py,sha256=GW5Amfmw7ln9l4kBBZCelaJxYBP5xbk5NjdNLMZhNMU,179
38
53
  rattler/shell/shell.py,sha256=n9bAb0YQpdiOB62nFUIuWDoAzXnKRi1Y-fHEW9wVIg4,4442
39
- rattler/package/paths_json.py,sha256=7l2Wmqobwcoe-TStXhoafWzXCT4OWif_yAAa6KVnKyg,21465
40
- rattler/package/__init__.py,sha256=omXnLVICkiH7HiaUzpRWAaJxS955Uimm1pT8dejJgVU,624
41
- rattler/package/about_json.py,sha256=FElWUXFNeF1gQJXE6lmYNEdxQjhsuimVObIeqxn3y8M,8958
42
- rattler/package/run_exports_json.py,sha256=fZlM_H7IBuVi6lfL4SLsV_NDb22TgFhpCkxjm8YIvfg,9305
43
- rattler/package/index_json.py,sha256=BxnJg5SPpiFsLhabz-Uuvc4ea_sg4N7Q-hqdQnXk8oc,12419
44
- rattler/package/no_arch_type.py,sha256=y_1spiImY3654SDLRQWyp5mqr4l-gYKIuK4pCnEPj1s,3740
45
- rattler/package/package_name.py,sha256=bX5CpTwyWOOuUlrejHmbJzz1R0KcchtWHLskOfA-Dlk,4426
46
- rattler/install/__init__.py,sha256=F_DwKOql1YkdV78JV5jT0RglNhs2ZwSup9uWGv9wO4I,69
47
- rattler/install/installer.py,sha256=akUuojDLiP5jcd1vbX__xLjBg2B46sFNSKk4RBYjvIc,3559
54
+ rattler/solver/__init__.py,sha256=NZabrelb_pcqOi5PyZTr3OeBbjd85IqW1-2ymOBO-k0,119
55
+ rattler/solver/solver.py,sha256=EEF86vA-ryVuBmq5uOomgzPq1BGXsNcAhJvf7JKVVDQ,11259
48
56
  rattler/utils/rattler_version.py,sha256=eXAVN6NYg5EmsQ_DrfgxW1yJ_eWAlWx7IANasMRYgV4,526
49
- rattler/networking/__init__.py,sha256=Wlob5pywEgiqmAq8sVKyJS6qOpRegKemtcXTkwDED20,474
50
- rattler/networking/middleware.py,sha256=S1eArDWo45dKo8Um6mMYMOPs_OIdhLamejEQs8KorCQ,4838
51
- rattler/networking/client.py,sha256=rRmbeEQYO1afHDgjgSncq68hSkFpyZ1ktYgC_Q_7LBQ,1528
52
- rattler/networking/fetch_repo_data.py,sha256=sO3dDNdvJev6TOblnGEzpFYnY2xorfr5A5zrjsTDbWk,3714
53
- rattler/index/__init__.py,sha256=Y-fiAzMcJSbL006dpALwGEhuMSTxuR1XC4o2gMqWcKA,87
54
- rattler/index/index.py,sha256=3xT2X59ThgF-YI5C7PRFoGNSHfaTEKwe672TpcYXo-k,4148
57
+ rattler/version/__init__.py,sha256=FQ_4xuCz_2tTPlIeSA_1SkPEP_DpuXw6tDDjsptMTZo,146
58
+ rattler/version/version.py,sha256=5CWe2wjH-7lmKUgzFFMSfNwLF04lzLgarhckkmdQ4cY,15954
59
+ rattler/version/with_source.py,sha256=nEW_jetdsB-5hKnxHVYgwOsd0EAe0fNKaCLlD4fIZiM,2539
55
60
  rattler/virtual_package/__init__.py,sha256=pOvvD-8V6Ld5gYBj2KPI3-cZLx8m2hcl6dqRUoBTHuw,262
56
- rattler/virtual_package/virtual_package.py,sha256=hrFvoT2LjIsW5ubfXdXEZnKlSIfLP5G4vrbJST9xukI,6707
57
61
  rattler/virtual_package/generic.py,sha256=ztDVHLNbO2SemZSpdoa2SdoXcZT1hopvBFQ11fNBZmQ,4411
58
- rattler/channel/__init__.py,sha256=K-ZAo0qFzchXWP-6DpMHLg_djGD25-0CRwusisIGp8k,221
59
- rattler/channel/channel_config.py,sha256=rRD4dGeHTBIcm3vTuQR1wTGTELNdN69yq4lyCaTaN3M,1532
60
- rattler/channel/channel_priority.py,sha256=OQfCHp_DeInkMB0YahCf2X7yCk0_RtM_C_Vy4Ny-65M,474
61
- rattler/channel/channel.py,sha256=kGeZKa_YkSM943CA1i_8O1FXG9kS9hkrnmSl6OhkbbQ,2474
62
- rattler/rattler.abi3.so,sha256=uvuUMX9RCCU0-Y1bMxIlz2i2_tfvUphIwOMsG_8Z_5g,40972901
63
- py_rattler-0.14.0.dist-info/RECORD,,
62
+ rattler/virtual_package/virtual_package.py,sha256=hrFvoT2LjIsW5ubfXdXEZnKlSIfLP5G4vrbJST9xukI,6707
63
+ py_rattler-0.16.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.7.8)
2
+ Generator: maturin (1.9.4)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp38-abi3-musllinux_1_2_armv7l
rattler/index/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
- from rattler.index.index import index_fs, index_s3
1
+ from rattler.index.index import index_fs, index_s3, S3Credentials
2
2
 
3
- __all__ = ["index_s3", "index_fs"]
3
+ __all__ = ["index_s3", "index_fs", "S3Credentials"]
rattler/index/index.py CHANGED
@@ -1,12 +1,36 @@
1
1
  from __future__ import annotations
2
2
 
3
+ from dataclasses import dataclass
3
4
  import os
4
- from typing import Optional
5
+ from typing import Optional, Literal
5
6
 
6
7
  from rattler.platform import Platform
7
8
  from rattler.rattler import py_index_fs, py_index_s3
8
9
 
9
10
 
11
+ @dataclass
12
+ class S3Credentials:
13
+ """Credentials for accessing an S3 backend."""
14
+
15
+ # The endpoint URL of the S3 backend
16
+ endpoint_url: str
17
+
18
+ # The region of the S3 backend
19
+ region: str
20
+
21
+ # The access key ID for the S3 bucket.
22
+ access_key_id: Optional[str] = None
23
+
24
+ # The secret access key for the S3 bucket.
25
+ secret_access_key: Optional[str] = None
26
+
27
+ # The session token for the S3 bucket.
28
+ session_token: Optional[str] = None
29
+
30
+ # Defines how to address the bucket, either using virtual-hosted-style or path-style.
31
+ addressing_style: Literal["path", "virtual-host"] = "virtual-host"
32
+
33
+
10
34
  async def index_fs(
11
35
  channel_directory: os.PathLike[str],
12
36
  target_platform: Optional[Platform] = None,
@@ -14,7 +38,7 @@ async def index_fs(
14
38
  write_zst: bool = True,
15
39
  write_shards: bool = True,
16
40
  force: bool = False,
17
- max_parallel: int = 128,
41
+ max_parallel: int | None = None,
18
42
  ) -> None:
19
43
  """
20
44
  Indexes dependencies in the `channel_directory` for one or more subdirectories within said directory.
@@ -46,18 +70,13 @@ async def index_fs(
46
70
 
47
71
  async def index_s3(
48
72
  channel_url: str,
49
- region: str,
50
- endpoint_url: str,
51
- force_path_style: bool = False,
52
- access_key_id: Optional[str] = None,
53
- secret_access_key: Optional[str] = None,
54
- session_token: Optional[str] = None,
73
+ credentials: Optional[S3Credentials] = None,
55
74
  target_platform: Optional[Platform] = None,
56
75
  repodata_patch: Optional[str] = None,
57
76
  write_zst: bool = True,
58
77
  write_shards: bool = True,
59
78
  force: bool = False,
60
- max_parallel: int = 32,
79
+ max_parallel: int | None = None,
61
80
  ) -> None:
62
81
  """
63
82
  Indexes dependencies in the `channel_url` for one or more subdirectories in the S3 directory.
@@ -69,12 +88,8 @@ async def index_s3(
69
88
  Arguments:
70
89
  channel_url: An S3 URL (e.g., s3://my-bucket/my-channel that containins the subdirectories
71
90
  of dependencies to index.
72
- region: The region of the S3 bucket.
73
- endpoint_url: The endpoint URL of the S3 bucket.
74
- force_path_style: Whether to use path-style addressing for S3.
75
- access_key_id: The access key ID to use for authentication.
76
- secret_access_key: The secret access key to use for authentication.
77
- session_token: The session token to use for authentication.
91
+ credentials: The credentials to use for accessing the S3 bucket. If not provided, will use the default
92
+ credentials from the environment.
78
93
  target_platform: A `Platform` to index dependencies for.
79
94
  repodata_patch: The name of the conda package (expected to be in the `noarch` subdir) that should be used for repodata patching.
80
95
  write_zst: Whether to write repodata.json.zst.
@@ -84,12 +99,7 @@ async def index_s3(
84
99
  """
85
100
  await py_index_s3(
86
101
  channel_url,
87
- region,
88
- endpoint_url,
89
- force_path_style,
90
- access_key_id,
91
- secret_access_key,
92
- session_token,
102
+ credentials,
93
103
  target_platform._inner if target_platform else target_platform,
94
104
  repodata_patch,
95
105
  write_zst,
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
  import os
3
3
  from typing import List, Optional
4
4
 
5
+ from rattler.match_spec import MatchSpec
5
6
  from rattler.networking.client import Client
6
7
  from rattler.platform.platform import Platform
7
8
  from rattler.prefix.prefix_record import PrefixRecord
@@ -16,10 +17,12 @@ async def install(
16
17
  cache_dir: Optional[os.PathLike[str]] = None,
17
18
  installed_packages: Optional[List[PrefixRecord]] = None,
18
19
  reinstall_packages: Optional[set[str]] = None,
20
+ ignored_packages: Optional[set[str]] = None,
19
21
  platform: Optional[Platform] = None,
20
22
  execute_link_scripts: bool = False,
21
23
  show_progress: bool = True,
22
24
  client: Optional[Client] = None,
25
+ requested_specs: Optional[List[MatchSpec]] = None,
23
26
  ) -> None:
24
27
  """
25
28
  Create an environment by downloading and linking the `dependencies` in
@@ -64,6 +67,8 @@ async def install(
64
67
  If `None` is specified then the `target_prefix` will be scanned for installed
65
68
  packages.
66
69
  reinstall_packages: A list of package names that should be reinstalled.
70
+ ignored_packages: A list of package names that should be ignored (left untouched).
71
+ These packages will not be removed, installed, or updated.
67
72
  platform: Target platform to create and link the
68
73
  environment. Defaults to current platform.
69
74
  execute_link_scripts: whether to execute the post-link and pre-unlink scripts
@@ -71,6 +76,9 @@ async def install(
71
76
  show_progress: If set to `True` a progress bar will be shown on the CLI.
72
77
  client: An authenticated client to use for downloading packages. If not specified a default
73
78
  client will be used.
79
+ requested_specs: A list of `MatchSpec`s that were originally requested. These will be used
80
+ to populate the `requested_specs` field in the generated `conda-meta/*.json` files.
81
+ If `None`, the `requested_specs` field will remain empty.
74
82
  """
75
83
 
76
84
  await py_install(
@@ -79,8 +87,10 @@ async def install(
79
87
  cache_dir=cache_dir,
80
88
  installed_packages=installed_packages,
81
89
  reinstall_packages=reinstall_packages,
90
+ ignored_packages=ignored_packages,
82
91
  platform=platform._inner if platform is not None else None,
83
92
  client=client._client if client is not None else None,
84
93
  execute_link_scripts=execute_link_scripts,
85
94
  show_progress=show_progress,
95
+ requested_specs=requested_specs,
86
96
  )
rattler/lock/package.py CHANGED
@@ -80,7 +80,7 @@ class LockedPackage(ABC):
80
80
  """
81
81
  Returns a representation of the LockedPackage.
82
82
  """
83
- return f"{type(self).__name__}(" f"name={self.name!r}," f"location={self.location!r}" ")"
83
+ return f"{type(self).__name__}(name={self.name!r},location={self.location!r})"
84
84
 
85
85
  @classmethod
86
86
  def _from_py_locked_package(cls, py_pkg: PyLockedPackage) -> LockedPackage:
@@ -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
@@ -1,4 +1,5 @@
1
1
  from __future__ import annotations
2
+ from collections.abc import Iterator
2
3
  from typing import Any, Dict, Literal, Tuple, Optional
3
4
 
4
5
  from rattler.rattler import PyPlatform
@@ -6,22 +7,28 @@ from rattler.platform.arch import Arch
6
7
 
7
8
  PlatformLiteral = Literal[
8
9
  "noarch",
10
+ "unknown",
9
11
  "linux-32",
10
12
  "linux-64",
11
13
  "linux-aarch64",
12
14
  "linux-armv6l",
13
15
  "linux-armv7l",
16
+ "linux-loong64",
14
17
  "linux-ppc64le",
15
18
  "linux-ppc64",
19
+ "linux-ppc",
16
20
  "linux-s390x",
17
21
  "linux-riscv32",
18
22
  "linux-riscv64",
23
+ "freebsd-64",
19
24
  "osx-64",
20
25
  "osx-arm64",
21
26
  "win-32",
22
27
  "win-64",
23
28
  "win-arm64",
24
- "emscripten-32",
29
+ "emscripten-wasm32",
30
+ "wasi-wasm32",
31
+ "zos-z",
25
32
  ]
26
33
 
27
34
 
@@ -73,7 +80,7 @@ class Platform(metaclass=PlatformSingleton):
73
80
 
74
81
  def __repr__(self) -> str:
75
82
  """
76
- Returnrs a representation of the platform.
83
+ Returns a representation of the platform.
77
84
 
78
85
  Examples
79
86
  --------
@@ -90,7 +97,23 @@ class Platform(metaclass=PlatformSingleton):
90
97
  """
91
98
  Returns the current platform.
92
99
  """
93
- return Platform._from_py_platform(PyPlatform.current())
100
+ return cls._from_py_platform(PyPlatform.current())
101
+
102
+ @classmethod
103
+ def all(cls) -> Iterator[Platform]:
104
+ """
105
+ Returns all supported platforms.
106
+
107
+ Examples
108
+ --------
109
+ ```python
110
+ >>> next(Platform.all())
111
+ Platform(noarch)
112
+ >>> len(list(Platform.all()))
113
+ 23
114
+ >>>
115
+ """
116
+ return (cls._from_py_platform(p) for p in PyPlatform.all())
94
117
 
95
118
  @property
96
119
  def is_linux(self) -> bool:
@@ -42,16 +42,18 @@ class PrefixRecord(RepoDataRecord):
42
42
  package_tarball_full_path: Optional[os.PathLike[str]] = None,
43
43
  extracted_package_dir: Optional[os.PathLike[str]] = None,
44
44
  requested_spec: Optional[str] = None,
45
+ requested_specs: Optional[List[str]] = None,
45
46
  files: Optional[List[os.PathLike[str]]] = None,
46
47
  ) -> None:
47
48
  record = PyRecord.create_prefix_record(
48
- repodata_record._record,
49
- paths_data._paths,
50
- link._inner if link else None,
51
- package_tarball_full_path,
52
- extracted_package_dir,
53
- requested_spec,
54
- files,
49
+ repodata_record=repodata_record._record,
50
+ paths_data=paths_data._paths,
51
+ link=link._inner if link else None,
52
+ package_tarball_full_path=package_tarball_full_path,
53
+ extracted_package_dir=extracted_package_dir,
54
+ files=files,
55
+ requested_spec=requested_spec,
56
+ requested_specs=requested_specs,
55
57
  )
56
58
  self._record = record
57
59
 
@@ -169,11 +171,8 @@ class PrefixRecord(RepoDataRecord):
169
171
  @property
170
172
  def requested_spec(self) -> Optional[str]:
171
173
  """
172
- The spec that was used when this package was installed.
173
- Note that this field is not currently updated if another
174
- spec was used. If this package was not directly requested by the
175
- user but was instead installed as a dependency of another package
176
- `None` will be returned.
174
+ The spec that was used when this package was installed (deprecated).
175
+ Use requested_specs instead.
177
176
 
178
177
  Examples
179
178
  --------
@@ -181,8 +180,8 @@ class PrefixRecord(RepoDataRecord):
181
180
  >>> r = PrefixRecord.from_path(
182
181
  ... "../test-data/conda-meta/requests-2.28.2-pyhd8ed1ab_0.json"
183
182
  ... )
184
- >>> r.requested_spec
185
- ''
183
+ >>> r.requested_spec is None
184
+ True
186
185
  >>>
187
186
  ```
188
187
  """
@@ -192,6 +191,31 @@ class PrefixRecord(RepoDataRecord):
192
191
  def requested_spec(self, value: Optional[str]) -> None:
193
192
  self._record.requested_spec = value
194
193
 
194
+ @property
195
+ def requested_specs(self) -> List[str]:
196
+ """
197
+ The specs that were used when this package was installed.
198
+ If this package was not directly requested by the user but was instead
199
+ installed as a dependency of another package an empty list will be
200
+ returned.
201
+
202
+ Examples
203
+ --------
204
+ ```python
205
+ >>> r = PrefixRecord.from_path(
206
+ ... "../test-data/conda-meta/requests-2.28.2-pyhd8ed1ab_0.json"
207
+ ... )
208
+ >>> r.requested_specs
209
+ []
210
+ >>>
211
+ ```
212
+ """
213
+ return self._record.requested_specs
214
+
215
+ @requested_specs.setter
216
+ def requested_specs(self, value: List[str]) -> None:
217
+ self._record.requested_specs = value
218
+
195
219
  def __repr__(self) -> str:
196
220
  """
197
221
  Returns a representation of the version
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.
@@ -15,7 +15,7 @@ class RepoData:
15
15
  def __init__(self, path: Union[str, PathLike[str]]) -> None:
16
16
  if not isinstance(path, (str, Path)):
17
17
  raise TypeError(
18
- "RepoData constructor received unsupported type " f" {type(path).__name__!r} for the `path` parameter"
18
+ f"RepoData constructor received unsupported type {type(path).__name__!r} for the `path` parameter"
19
19
  )
20
20
 
21
21
  self._repo_data = PyRepoData.from_path(path)
@@ -24,8 +24,7 @@ class Version:
24
24
  self._version = PyVersion(version)
25
25
  else:
26
26
  raise TypeError(
27
- "Version constructor received unsupported type "
28
- f" {type(version).__name__!r} for the `version` parameter"
27
+ f"Version constructor received unsupported type {type(version).__name__!r} for the `version` parameter"
29
28
  )
30
29
 
31
30
  @classmethod
Binary file
Binary file