py-rattler 0.15.0__cp38-abi3-musllinux_1_2_x86_64.whl → 0.16.0__cp38-abi3-musllinux_1_2_x86_64.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.15.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
@@ -1,63 +1,63 @@
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=Tkp9stbRIiaQETwyCezZzCzHFTy2RbsLAxx9TuLUD80,105
3
- rattler.libs/libgcc_s-1e52349c.so.1,sha256=Ani0u_W_tB8ESsFePO4D2mn2lrgWLhyFdw6RETxBTYM,437537
1
+ py_rattler-0.16.0.dist-info/METADATA,sha256=Bx48H0csQlFHsxvMEBK6rpNZqctAqhLZZSlDJOOYx6c,10339
2
+ py_rattler-0.16.0.dist-info/WHEEL,sha256=Y-XoD5BXFXbl1oL2pSk_D17tiXoT-Jq8mjjLLKU_QmM,105
3
+ rattler.libs/libgcc_s-98a1ef30.so.1,sha256=XOVRhHznCIpbSdhFoozhla-OfRqBtXftKPQ4cSMKjrs,433441
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
4
9
  rattler/exceptions.py,sha256=2ivs3zwllwQwn1InBiArbrZbTzPXpssv7fzZkGdRpnI,4059
5
- rattler/shell/shell.py,sha256=n9bAb0YQpdiOB62nFUIuWDoAzXnKRi1Y-fHEW9wVIg4,4442
6
- rattler/shell/__init__.py,sha256=GW5Amfmw7ln9l4kBBZCelaJxYBP5xbk5NjdNLMZhNMU,179
7
- rattler/explicit_environment/environment.py,sha256=Dqcvm5c7C3K0FJ04YVN8WIUrl0R8Fe2TeXZ4Qq8Dg-0,2641
8
10
  rattler/explicit_environment/__init__.py,sha256=QHmwZkdVt-tFL-tEEdhLdH3apuI5F7ElpMzCRZeH3_o,170
9
- rattler/version/version.py,sha256=06are6AdWAEDQafi5RrB8ORH87CcmtjcmpOaMhEwdn0,15973
10
- rattler/version/__init__.py,sha256=FQ_4xuCz_2tTPlIeSA_1SkPEP_DpuXw6tDDjsptMTZo,146
11
- rattler/version/with_source.py,sha256=nEW_jetdsB-5hKnxHVYgwOsd0EAe0fNKaCLlD4fIZiM,2539
11
+ rattler/explicit_environment/environment.py,sha256=Dqcvm5c7C3K0FJ04YVN8WIUrl0R8Fe2TeXZ4Qq8Dg-0,2641
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
16
+ rattler/lock/__init__.py,sha256=JkighOKfDQBqX3xrw1NXYlA_j1IFNI47_s6p2XvFtQc,571
12
17
  rattler/lock/channel.py,sha256=PaLb-vWRLTJWUx7fyMdP2Tow5wMlGuq3WUrHkrQIzeg,1331
13
- rattler/lock/package.py,sha256=C-lvnRWoRtj9CBRR2i5Eku_lFnBDI9Bf8vY57DWZ4YU,9035
14
18
  rattler/lock/environment.py,sha256=sbcGqkb9rrGwpVCucDKkwdp2SFOyHZQGqvBArGEZFYs,7915
15
- rattler/lock/lock_file.py,sha256=ZP-ElSJ7WKkqOE6rj4U6OmM63GLcDH_yTg1H_Qoa60E,3455
16
- rattler/lock/__init__.py,sha256=JkighOKfDQBqX3xrw1NXYlA_j1IFNI47_s6p2XvFtQc,571
17
19
  rattler/lock/hash.py,sha256=qNig1sf5EfRfaCK9x352DgqTpLdo75Gu4qvRZDbL33Q,805
18
- rattler/virtual_package/__init__.py,sha256=pOvvD-8V6Ld5gYBj2KPI3-cZLx8m2hcl6dqRUoBTHuw,262
19
- rattler/virtual_package/generic.py,sha256=ztDVHLNbO2SemZSpdoa2SdoXcZT1hopvBFQ11fNBZmQ,4411
20
- rattler/virtual_package/virtual_package.py,sha256=hrFvoT2LjIsW5ubfXdXEZnKlSIfLP5G4vrbJST9xukI,6707
21
- rattler/solver/solver.py,sha256=EEF86vA-ryVuBmq5uOomgzPq1BGXsNcAhJvf7JKVVDQ,11259
22
- rattler/solver/__init__.py,sha256=NZabrelb_pcqOi5PyZTr3OeBbjd85IqW1-2ymOBO-k0,119
23
- rattler/repo_data/patch_instructions.py,sha256=TNa7NgLtqGQ6lSpibLFxuPFwsmqRLrORpDZOpeZ5fnk,694
24
- rattler/repo_data/record.py,sha256=6CK2-KyvVZ8kaZ2l-o4DFWivxMJE_ChkOrm97bmIjn4,4572
25
- rattler/repo_data/gateway.py,sha256=tK6XmTGbafZjvEo6_T8G-iYTu10MtJkAtg4fhtA9A60,10019
26
- rattler/repo_data/__init__.py,sha256=cMoMtFOJBGonfWxizGphWpXdQ1GYXDXos7ESYigfco8,549
27
- rattler/repo_data/package_record.py,sha256=t8vxRsfAToIolhBRjt9lB4e5Q7Tm-FjZHUI9vhxd-eA,28358
28
- rattler/repo_data/sparse.py,sha256=qO3XuIfvcDEfo8mHu8UB9JBoz0IR3k_kNR32ZTpbPWU,12542
29
- rattler/repo_data/repo_data.py,sha256=lB7hQ1SN5b2VxuOaOH1BOFeIXbRUf2fslitLyT5aVwo,2264
30
- rattler/channel/channel.py,sha256=kGeZKa_YkSM943CA1i_8O1FXG9kS9hkrnmSl6OhkbbQ,2474
31
- rattler/channel/channel_config.py,sha256=rRD4dGeHTBIcm3vTuQR1wTGTELNdN69yq4lyCaTaN3M,1532
32
- rattler/channel/__init__.py,sha256=K-ZAo0qFzchXWP-6DpMHLg_djGD25-0CRwusisIGp8k,221
33
- rattler/channel/channel_priority.py,sha256=OQfCHp_DeInkMB0YahCf2X7yCk0_RtM_C_Vy4Ny-65M,474
34
- rattler/install/installer.py,sha256=akUuojDLiP5jcd1vbX__xLjBg2B46sFNSKk4RBYjvIc,3559
35
- rattler/install/__init__.py,sha256=F_DwKOql1YkdV78JV5jT0RglNhs2ZwSup9uWGv9wO4I,69
36
- rattler/package_streaming/__init__.py,sha256=I-mbr0sJnHzdFQP8v0Yb_GKpu4bIO3JbAJtq_wzA71Q,898
37
- rattler/prefix/prefix_paths.py,sha256=B0EwOFkVbSzuLChdjkjenTehfxjXwwMBIodSGOfBHFU,12828
38
- rattler/prefix/prefix_record.py,sha256=KWbjcBJO-KpdWz2VEYdlz_RPLpLByyaec0aViILi_EM,6290
39
- rattler/prefix/__init__.py,sha256=gkgyqZ0yTmxOCW8DHuSG-X0spEzb8BIoiox8YG50XYc,257
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
40
30
  rattler/package/about_json.py,sha256=FElWUXFNeF1gQJXE6lmYNEdxQjhsuimVObIeqxn3y8M,8958
41
31
  rattler/package/index_json.py,sha256=BxnJg5SPpiFsLhabz-Uuvc4ea_sg4N7Q-hqdQnXk8oc,12419
42
- rattler/package/run_exports_json.py,sha256=fZlM_H7IBuVi6lfL4SLsV_NDb22TgFhpCkxjm8YIvfg,9305
43
- rattler/package/package_name.py,sha256=bX5CpTwyWOOuUlrejHmbJzz1R0KcchtWHLskOfA-Dlk,4426
44
- rattler/package/__init__.py,sha256=omXnLVICkiH7HiaUzpRWAaJxS955Uimm1pT8dejJgVU,624
45
32
  rattler/package/no_arch_type.py,sha256=y_1spiImY3654SDLRQWyp5mqr4l-gYKIuK4pCnEPj1s,3740
33
+ rattler/package/package_name.py,sha256=bX5CpTwyWOOuUlrejHmbJzz1R0KcchtWHLskOfA-Dlk,4426
46
34
  rattler/package/paths_json.py,sha256=7l2Wmqobwcoe-TStXhoafWzXCT4OWif_yAAa6KVnKyg,21465
47
- rattler/__init__.py,sha256=QKjBUll9mX4TVwJy-dy5Gt8IezLnJz8EPTlKhOsw2IA,2476
48
- rattler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
- rattler/platform/arch.py,sha256=7tanyDql5BvDvY9UryEXyTJ9nWRfx6bn7BWrl6fGEfI,1145
35
+ rattler/package/run_exports_json.py,sha256=fZlM_H7IBuVi6lfL4SLsV_NDb22TgFhpCkxjm8YIvfg,9305
36
+ rattler/package_streaming/__init__.py,sha256=I-mbr0sJnHzdFQP8v0Yb_GKpu4bIO3JbAJtq_wzA71Q,898
50
37
  rattler/platform/__init__.py,sha256=YZaXxnJmG_WjYbhIAxA0jQDhaPYAR4rTVQCm4yRoyZQ,154
51
- rattler/platform/platform.py,sha256=H_P35Z0irNiyQX2fxX7ombMkGwyYa-Ow_iDIDxJrmG8,4395
38
+ rattler/platform/arch.py,sha256=7tanyDql5BvDvY9UryEXyTJ9nWRfx6bn7BWrl6fGEfI,1145
39
+ rattler/platform/platform.py,sha256=FPHoKsJm717LkEZurFOM1LV_8BhLfJeKjsqrte2mZnQ,4896
40
+ rattler/prefix/__init__.py,sha256=gkgyqZ0yTmxOCW8DHuSG-X0spEzb8BIoiox8YG50XYc,257
41
+ rattler/prefix/prefix_paths.py,sha256=B0EwOFkVbSzuLChdjkjenTehfxjXwwMBIodSGOfBHFU,12828
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=5FAAOxyoVRtvaTUl2Xyp-Xsk-m0iapUsNvsG2uV1gI0,46388473
45
+ rattler/repo_data/__init__.py,sha256=cMoMtFOJBGonfWxizGphWpXdQ1GYXDXos7ESYigfco8,549
46
+ rattler/repo_data/gateway.py,sha256=tK6XmTGbafZjvEo6_T8G-iYTu10MtJkAtg4fhtA9A60,10019
47
+ rattler/repo_data/package_record.py,sha256=t8vxRsfAToIolhBRjt9lB4e5Q7Tm-FjZHUI9vhxd-eA,28358
48
+ rattler/repo_data/patch_instructions.py,sha256=TNa7NgLtqGQ6lSpibLFxuPFwsmqRLrORpDZOpeZ5fnk,694
49
+ rattler/repo_data/record.py,sha256=6CK2-KyvVZ8kaZ2l-o4DFWivxMJE_ChkOrm97bmIjn4,4572
50
+ rattler/repo_data/repo_data.py,sha256=39VnTUVCwXDy22FD1UluA3MGyzUYw2rLY9G91u-28TE,2261
51
+ rattler/repo_data/sparse.py,sha256=qO3XuIfvcDEfo8mHu8UB9JBoz0IR3k_kNR32ZTpbPWU,12542
52
+ rattler/shell/__init__.py,sha256=GW5Amfmw7ln9l4kBBZCelaJxYBP5xbk5NjdNLMZhNMU,179
53
+ rattler/shell/shell.py,sha256=n9bAb0YQpdiOB62nFUIuWDoAzXnKRi1Y-fHEW9wVIg4,4442
54
+ rattler/solver/__init__.py,sha256=NZabrelb_pcqOi5PyZTr3OeBbjd85IqW1-2ymOBO-k0,119
55
+ rattler/solver/solver.py,sha256=EEF86vA-ryVuBmq5uOomgzPq1BGXsNcAhJvf7JKVVDQ,11259
52
56
  rattler/utils/rattler_version.py,sha256=eXAVN6NYg5EmsQ_DrfgxW1yJ_eWAlWx7IANasMRYgV4,526
53
- rattler/networking/middleware.py,sha256=S1eArDWo45dKo8Um6mMYMOPs_OIdhLamejEQs8KorCQ,4838
54
- rattler/networking/__init__.py,sha256=Wlob5pywEgiqmAq8sVKyJS6qOpRegKemtcXTkwDED20,474
55
- rattler/networking/client.py,sha256=hMe-eq8n8KkiqTlu4MR-9fc30AwSJd0dB_h60famki0,1584
56
- rattler/networking/fetch_repo_data.py,sha256=sO3dDNdvJev6TOblnGEzpFYnY2xorfr5A5zrjsTDbWk,3714
57
- rattler/index/index.py,sha256=REYuZWRhb9eJiC7fQe7JL_rm-HgN1UfI1RQmvA75CYs,4165
58
- rattler/index/__init__.py,sha256=Y-fiAzMcJSbL006dpALwGEhuMSTxuR1XC4o2gMqWcKA,87
59
- rattler/match_spec/match_spec.py,sha256=fyrvd9VUURJyHaJDqNdzJNa3dZZpKLUmhjGVWtdGV4w,9525
60
- rattler/match_spec/nameless_match_spec.py,sha256=pn__lFSo6chFqDWLIag5jjwumiX2kiTDguMYIdy-lu8,4599
61
- rattler/match_spec/__init__.py,sha256=uBV3ov1VlCIZlIWhkxxMPcTqRBF5p5lqvT2g6kQv5kQ,167
62
- rattler/rattler.abi3.so,sha256=x4mG_Xw-rBA244njT-QWyS7yS1-Q2qDKHz9K8cAUE9A,44762337
63
- py_rattler-0.15.0.dist-info/RECORD,,
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
60
+ rattler/virtual_package/__init__.py,sha256=pOvvD-8V6Ld5gYBj2KPI3-cZLx8m2hcl6dqRUoBTHuw,262
61
+ rattler/virtual_package/generic.py,sha256=ztDVHLNbO2SemZSpdoa2SdoXcZT1hopvBFQ11fNBZmQ,4411
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_x86_64
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,
@@ -46,12 +70,7 @@ 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,
@@ -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:
@@ -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
@@ -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
index fbf1265..c7d1060 100755
Binary file