py-rattler 0.15.0__cp38-abi3-win32.whl → 0.16.0__cp38-abi3-win32.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,62 +1,62 @@
1
- py_rattler-0.15.0.dist-info/METADATA,sha256=O8BmOwclizGlNZS-UeE84gk7HT-0I8Kcv_wFn81s24I,10520
2
- py_rattler-0.15.0.dist-info/WHEEL,sha256=0sLiYwObebA6dvYy4EyeHDcb-vmfiMTUI0XLQAqXDR4,90
1
+ py_rattler-0.16.0.dist-info/METADATA,sha256=smvX7e9HOi74GAkfXzlfYGYkPneF02sR66ryc64sVhg,10531
2
+ py_rattler-0.16.0.dist-info/WHEEL,sha256=jqWOnj9MJMcVOhRvipbD_HJ5aGwHb2kcbqU5x15Xtbk,90
3
+ rattler/__init__.py,sha256=L8VELJ3BoORHTmiiCJfbcLBaCnsH7SZq_ogfjYeLnU8,2579
4
+ rattler/channel/__init__.py,sha256=66ZzlAEanXVHmRFZ5W3SSz4XaaPbOD_drHYNGtMvA7w,226
3
5
  rattler/channel/channel.py,sha256=X0rUb2VtxIzHzWaG8nsoH8l8q9htalzxSrv77moBIuw,2568
4
6
  rattler/channel/channel_config.py,sha256=fubqr_KtR6FzpGP-5W-v8anEjuH7kGt8hPHQ_ojmKZ8,1575
5
7
  rattler/channel/channel_priority.py,sha256=zPb2CG7RUBJVH2f-pbaxnYIDIUEvGjDJLS5-L8-CgUM,488
6
- rattler/channel/__init__.py,sha256=66ZzlAEanXVHmRFZ5W3SSz4XaaPbOD_drHYNGtMvA7w,226
7
8
  rattler/exceptions.py,sha256=LI7yj9TPgORKcIvl6KAhp3MqTXvvGzMI450K9jh0imc,4174
8
- rattler/explicit_environment/environment.py,sha256=EoKZcC5t7iBTtHFtq5wkjN65ZMnRjCl0cJsCpJs4JYw,2710
9
9
  rattler/explicit_environment/__init__.py,sha256=hslNA2pDXqP5fgbnVYJAqr8j0vucFi48_vnqb3r2hfo,173
10
- rattler/index/index.py,sha256=t0bOEZQdKTIRDrxkKtC4YLOPdpPGd0FFWme1O7GUGd4,4264
11
- rattler/index/__init__.py,sha256=8xQkHyHI5CZ7YRGSGq7HO0ap7KTSR_hDekwZe3A16z8,90
12
- rattler/install/installer.py,sha256=oMCJzqas3yzILfEJ5wrZ4ofHlUjoJEyYGwN9JVoO4ME,3645
10
+ rattler/explicit_environment/environment.py,sha256=EoKZcC5t7iBTtHFtq5wkjN65ZMnRjCl0cJsCpJs4JYw,2710
11
+ rattler/index/__init__.py,sha256=gM3_tJ-YRPwTCHWqwY9oByNKAUbSxfjGRaqCuVp5Bps,122
12
+ rattler/index/index.py,sha256=Hn31eQOD4U262g-PfZ3g8ZWgJ2-MuiA9sUjyteBC-rA,4451
13
13
  rattler/install/__init__.py,sha256=qV-pHnLSxQ57o3rVFuedEaZD2_wKmtrO3l52u96Le74,72
14
+ rattler/install/installer.py,sha256=Usw8aCZhDFvqvUl4XtDZcBIUsoaeNHNd4zhAcG9t3y0,4323
15
+ rattler/lock/__init__.py,sha256=ROhRcP69B8GVKey3eP9uqEZpSrLAwht3deKOkWzHOoo,594
14
16
  rattler/lock/channel.py,sha256=fWashbJ1-6WKQnlARggjp6T-QRmBcxhG-vyYEjUOla0,1383
15
17
  rattler/lock/environment.py,sha256=jQhjL43vBqwS9jgek2pM84I2SUU36OIUq3KddNS5IjQ,8128
16
18
  rattler/lock/hash.py,sha256=TCX8WBTN6t_5FdjJPMGxJk2qLKnCHnBEv5ASdxx_iUA,838
17
19
  rattler/lock/lock_file.py,sha256=JQzgsjhhOnNPP1WuPtnfzlsb3qRZHzkZyuaBD0iDTmc,3573
18
- rattler/lock/package.py,sha256=SI1PvY8vnYUF1l85HR1t5YxQiU9HsEA2Qhb2X4gIVQY,9337
19
- rattler/lock/__init__.py,sha256=ROhRcP69B8GVKey3eP9uqEZpSrLAwht3deKOkWzHOoo,594
20
+ rattler/lock/package.py,sha256=d21wOWcF56GiSih4rXg_Q3HePnKIlA9RZoqRtLBBjpU,9326
21
+ rattler/match_spec/__init__.py,sha256=dp2VL-6Cg-sJ1cBdiZ6RoZKOroR2z2lzX4SI0iAwGow,171
20
22
  rattler/match_spec/match_spec.py,sha256=hN4MQlqs-vwkts7gFVDUBrNdZCMlPYOSs-KyqdM_dHA,9786
21
23
  rattler/match_spec/nameless_match_spec.py,sha256=7COXyGPZ-BWe3jOAxKFa0ETfpH630jN_Cman_-on2lE,4762
22
- rattler/match_spec/__init__.py,sha256=dp2VL-6Cg-sJ1cBdiZ6RoZKOroR2z2lzX4SI0iAwGow,171
24
+ rattler/networking/__init__.py,sha256=4HyRiMVGhlhRDJ49SLJ-_x1IhIsTuvvSMXAIrt9QHKc,493
23
25
  rattler/networking/client.py,sha256=c777w6_xXw_blxbdgYJJ79ng--lShY4j4WoCi34n1YM,1649
24
26
  rattler/networking/fetch_repo_data.py,sha256=9laNDJEnHBASILfusEuSVXp5UJA3bRKSMRwCbokBVC8,3817
25
27
  rattler/networking/middleware.py,sha256=VB5N5QYYqyjzro6GtHH-jY1CCeSKWveKTtIlDJytmZw,5029
26
- rattler/networking/__init__.py,sha256=4HyRiMVGhlhRDJ49SLJ-_x1IhIsTuvvSMXAIrt9QHKc,493
28
+ rattler/package/__init__.py,sha256=3J5G3AAs1plpy5OdQ5E5htMAOulLDaL_N84DaJSvwMA,650
27
29
  rattler/package/about_json.py,sha256=iQ-I0VfwpsmjhXnyJZQBQ8dI_QbrNEL3BK9FPSxguhc,9287
28
30
  rattler/package/index_json.py,sha256=0IgkxVWGn5r3Bg1vXXwXrX_P8TtACIRJpuE50ZlUPTg,12856
29
31
  rattler/package/no_arch_type.py,sha256=NdzFNTIMbXKScH_m2063I50KkZ64b7crWsTZwCTAtms,3882
30
32
  rattler/package/package_name.py,sha256=CDMG8KEFMSV0IsVZm-Uujf_RPLV5FRK3K72T6e3no4w,4585
31
33
  rattler/package/paths_json.py,sha256=ahTLybi9ahtdoo5qh01a9g4lRP4AYYUuZZAukOejvwQ,22161
32
34
  rattler/package/run_exports_json.py,sha256=RQ8VPlS_tVC4qgwZcc88G-d9ICR9wMxUGvQSUB-mtdA,9573
33
- rattler/package/__init__.py,sha256=3J5G3AAs1plpy5OdQ5E5htMAOulLDaL_N84DaJSvwMA,650
34
35
  rattler/package_streaming/__init__.py,sha256=9_Piv_U0EjN-McmYtzFQ5XYPN_Y41Vf7u1Yspj_-LIc,924
35
- rattler/platform/arch.py,sha256=l2kg4E1Z2x-nrYtiF4vERvIVcqjLqwMfUcx-VQoLfmU,1203
36
- rattler/platform/platform.py,sha256=0oRuRPagBht46p91AvDQEKpbDtWumu29_DprYnGjWKQ,4589
37
36
  rattler/platform/__init__.py,sha256=QKFVTYNuY8aZrUbi0kOjP0Iw0lbBH0BeUFtLUitUkGg,158
38
- rattler/prefix/prefix_paths.py,sha256=ifMXcllEGd2FDP2fqlDtU-b_bEuJflAjPCnfQdghP5E,13270
39
- rattler/prefix/prefix_record.py,sha256=FKZ5lYNuK3wA0eDW_a1JLa-kT8xmUvu8SZ01Gb3Gn2I,6500
37
+ rattler/platform/arch.py,sha256=l2kg4E1Z2x-nrYtiF4vERvIVcqjLqwMfUcx-VQoLfmU,1203
38
+ rattler/platform/platform.py,sha256=rRD0XznnrKQAPsqz3_vCmCev-tOarhLv5QzddX4jauI,5113
40
39
  rattler/prefix/__init__.py,sha256=EQpguFmWOHVNb2WJk0kkgVpVi7c2KxKR-9ptsyZphX8,261
40
+ rattler/prefix/prefix_paths.py,sha256=ifMXcllEGd2FDP2fqlDtU-b_bEuJflAjPCnfQdghP5E,13270
41
+ rattler/prefix/prefix_record.py,sha256=tEnBZJQg9AXJlR_8HpHeupi4sk7jYcb1hMnyq74n3QQ,7282
41
42
  rattler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
+ rattler/rattler.pyd,sha256=oEg9JU00qu0wNzCFh0LqeakZKTYaNjRR_TH4I4m3io0,26763776
44
+ rattler/repo_data/__init__.py,sha256=fi9itrp0_9CA9w4cnLlAJBO9xkyxfIBPPstwJRWhoC4,566
42
45
  rattler/repo_data/gateway.py,sha256=JHFWfEiMhkTVmn2J4EXQkTC_8PtNplE7J38dTcbiuvU,10281
43
46
  rattler/repo_data/package_record.py,sha256=Q8jrllIp1uP_Uz0e43pX6fjka0in83HsqDkzhh4RZSU,29299
44
47
  rattler/repo_data/patch_instructions.py,sha256=WlI9gXPEvbYQUkxZpr5hi1u3PypkaaXAjpu0Plp2kCA,716
45
48
  rattler/repo_data/record.py,sha256=OTZrr2FUeBGqVKwjiu-1n7uiY_GnwDVFk77gZy6ozxk,4736
46
- rattler/repo_data/repo_data.py,sha256=PhFiR_A2YvjlTb6pU3bV0kIWwSla2A8CJeXd5lzVRpk,2338
49
+ rattler/repo_data/repo_data.py,sha256=Bytpf-BYARW_LkFwgdvCMLlB-JWodI6XkQDntaoLlD0,2335
47
50
  rattler/repo_data/sparse.py,sha256=xvj0BWNmKJTltzGYSkzcnup6xGIX7Ed46rL6g3PQvzk,12892
48
- rattler/repo_data/__init__.py,sha256=fi9itrp0_9CA9w4cnLlAJBO9xkyxfIBPPstwJRWhoC4,566
49
- rattler/shell/shell.py,sha256=CwOYm5kPNmwlTEcqaQZIKlNu2C5sJP3AqohEauyh1gQ,4574
50
51
  rattler/shell/__init__.py,sha256=6TIbXRkA94ZPjZPjYSu4h_d6a7iE2wTDb42u3UDjcQQ,182
51
- rattler/solver/solver.py,sha256=UuaLNiHwbwLomdGqMl7cTEobEGkIjeHbWpRN25uw1ZI,11469
52
+ rattler/shell/shell.py,sha256=CwOYm5kPNmwlTEcqaQZIKlNu2C5sJP3AqohEauyh1gQ,4574
52
53
  rattler/solver/__init__.py,sha256=TbNe5Q__R0V2z3Yq2ocUg6r4sOywmKZe-pDwBYV4wKA,122
54
+ rattler/solver/solver.py,sha256=UuaLNiHwbwLomdGqMl7cTEobEGkIjeHbWpRN25uw1ZI,11469
53
55
  rattler/utils/rattler_version.py,sha256=OI4RBQnrwnKxtqvE5Xzdc_Tidj_pFrRbTE2JOLhT9ag,545
54
- rattler/version/version.py,sha256=WCAQHuoFFFDFiGJRJZdJoXdoMHLof9aBXoV9JAgzWpg,16565
55
- rattler/version/with_source.py,sha256=pChI8Jr11O7pqAowKVPQktmi40GET740zh_Nr4thRSs,2619
56
56
  rattler/version/__init__.py,sha256=mstm5fHMHif1fXw0jo0giftoVUGjFGX2GxvASD5kSCU,150
57
+ rattler/version/version.py,sha256=re8PINwBF8VCTTCP0EmXxF8dMFkVp5eJOvKbasPeqfw,16545
58
+ rattler/version/with_source.py,sha256=pChI8Jr11O7pqAowKVPQktmi40GET740zh_Nr4thRSs,2619
59
+ rattler/virtual_package/__init__.py,sha256=PjKMWmztuN2ZbEn9u6l79dPntiRhH3f2zLH2Fvq8hu0,266
57
60
  rattler/virtual_package/generic.py,sha256=XOCqsULIrVbZzjf2_629HZWnplZifqo-fWkjtUTvJFE,4547
58
61
  rattler/virtual_package/virtual_package.py,sha256=YON4litF2m_dbHUzVPCHXPg4xh3CnpQmUEG6w-OUX40,6908
59
- rattler/virtual_package/__init__.py,sha256=PjKMWmztuN2ZbEn9u6l79dPntiRhH3f2zLH2Fvq8hu0,266
60
- rattler/__init__.py,sha256=L8VELJ3BoORHTmiiCJfbcLBaCnsH7SZq_ogfjYeLnU8,2579
61
- rattler/rattler.pyd,sha256=t-Ey2u5SJI2fUZ8RZ_Vmhe2d9_mPv9Ws-eK7MecOryw,25673728
62
- py_rattler-0.15.0.dist-info/RECORD,,
62
+ 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-win32
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.pyd 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