coiled 1.117.1.dev17__tar.gz → 1.117.1.dev19__tar.gz
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.
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/PKG-INFO +2 -2
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/capture_environment.py +5 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/package_sync.py +2 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/scan.py +110 -79
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/types.py +4 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/pyproject.toml +1 -1
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/.gitignore +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/LICENSE +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/README.md +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/__main__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/analytics.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/auth.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/batch.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/batch/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/batch/list.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/batch/logs.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/batch/run.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/batch/status.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/batch/wait.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/azure_logs.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/better_logs.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/crud.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/get_address.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/list.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/logs.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/metrics.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/ssh.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/cluster/utils.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/config.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/core.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/curl.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/diagnostics.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/env.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/examples/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/examples/exit.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/examples/hello_world.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/examples/nyc_parquet.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/examples/pytorch.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/examples/xarray_nwm.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/hello.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/scripts/fill_ipython.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/scripts/nyc_parquet.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/scripts/pytorch.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/scripts/xarray_nwm.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/hello/utils.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/login.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/notebook/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/notebook/notebook.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/prefect.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/prefect_serve.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/run.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/setup/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/setup/amp.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/setup/aws.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/setup/azure.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/setup/entry.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/setup/gcp.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/setup/prometheus.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/setup/util.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/sync.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cli/utils.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/cluster.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/coiled.yaml +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/compatibility.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/config.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/context.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/core.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/credentials/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/credentials/aws.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/credentials/google.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/errors.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/exceptions.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/extensions/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/extensions/prefect/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/extensions/prefect/runners.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/extensions/prefect/workers.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/function.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/plugins.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/prefect.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/pypi_conda_map.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/software.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/software_utils.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/spans.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/spark.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/utils.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/cluster.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/core.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/cwi_log_link.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/states.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/widgets/__init__.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/widgets/interface.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/widgets/rich.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/v2/widgets/util.py +0 -0
- {coiled-1.117.1.dev17 → coiled-1.117.1.dev19}/coiled/websockets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coiled
|
|
3
|
-
Version: 1.117.1.
|
|
3
|
+
Version: 1.117.1.dev19
|
|
4
4
|
Summary: Python client for coiled.io dask clusters
|
|
5
5
|
Project-URL: Homepage, https://coiled.io
|
|
6
6
|
Maintainer-email: Coiled <info@coiled.io>
|
|
@@ -25,7 +25,7 @@ Requires-Dist: jsondiff
|
|
|
25
25
|
Requires-Dist: packaging
|
|
26
26
|
Requires-Dist: paramiko>=2.4
|
|
27
27
|
Requires-Dist: pip-requirements-parser
|
|
28
|
-
Requires-Dist: pip>=
|
|
28
|
+
Requires-Dist: pip>=20.2
|
|
29
29
|
Requires-Dist: prometheus-client
|
|
30
30
|
Requires-Dist: rich>=11.2.0
|
|
31
31
|
Requires-Dist: setuptools>=49.3.0
|
|
@@ -55,6 +55,7 @@ async def default_python() -> PackageInfo:
|
|
|
55
55
|
"conda_name": "python",
|
|
56
56
|
"version": python_version,
|
|
57
57
|
"wheel_target": None,
|
|
58
|
+
"requested": True,
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
|
|
@@ -95,6 +96,7 @@ async def approximate_packages(
|
|
|
95
96
|
"conda_name": "pip",
|
|
96
97
|
"version": "22.3.1",
|
|
97
98
|
"wheel_target": None,
|
|
99
|
+
"requested": False,
|
|
98
100
|
})
|
|
99
101
|
else:
|
|
100
102
|
# insert the users pip version and hope it exists on conda-forge
|
|
@@ -108,6 +110,7 @@ async def approximate_packages(
|
|
|
108
110
|
"conda_name": "pip",
|
|
109
111
|
"version": pip["version"],
|
|
110
112
|
"wheel_target": None,
|
|
113
|
+
"requested": True,
|
|
111
114
|
})
|
|
112
115
|
coiled_selected_python = None
|
|
113
116
|
if not user_conda_installed_python:
|
|
@@ -151,6 +154,7 @@ async def approximate_packages(
|
|
|
151
154
|
"conda_name": pkg["conda_name"],
|
|
152
155
|
"version": pkg["version"],
|
|
153
156
|
"wheel_target": pkg["wheel_target"],
|
|
157
|
+
"requested": pkg["requested"],
|
|
154
158
|
}
|
|
155
159
|
# Send all packages to backend to help with debugging
|
|
156
160
|
for pkg in packages + local_python_code + local_python_wheel_packages + ignored_packages
|
|
@@ -220,6 +224,7 @@ async def create_environment_approximation(
|
|
|
220
224
|
"conda_name": conda_extra,
|
|
221
225
|
"version": "",
|
|
222
226
|
"wheel_target": None,
|
|
227
|
+
"requested": True,
|
|
223
228
|
}
|
|
224
229
|
for conda_extra in (conda_extras or [])
|
|
225
230
|
]
|
|
@@ -29,6 +29,7 @@ def scan(csv: bool, verbose: bool):
|
|
|
29
29
|
table.add_column("Conda Name", style="cyan", no_wrap=True)
|
|
30
30
|
table.add_column("Version", style="magenta")
|
|
31
31
|
table.add_column("Source", style="magenta")
|
|
32
|
+
table.add_column("Requested", style="cyan", no_wrap=True)
|
|
32
33
|
table.add_column("Channel", style="magenta", overflow="fold")
|
|
33
34
|
table.add_column("Channel URL", style="magenta", overflow="fold")
|
|
34
35
|
table.add_column("Wheel target", style="green", overflow="fold")
|
|
@@ -42,6 +43,7 @@ def scan(csv: bool, verbose: bool):
|
|
|
42
43
|
pkg["conda_name"],
|
|
43
44
|
pkg["version"],
|
|
44
45
|
pkg["source"],
|
|
46
|
+
"✅" if pkg["requested"] else "",
|
|
45
47
|
pkg["channel"] or "",
|
|
46
48
|
pkg["channel_url"] or "",
|
|
47
49
|
pkg["wheel_target"] or "",
|
|
@@ -153,6 +153,8 @@ async def handle_conda_package(pkg: CondaPackage) -> PackageInfo | None:
|
|
|
153
153
|
"name": convert_conda_to_pypi_name(name),
|
|
154
154
|
"version": pkg.version,
|
|
155
155
|
"wheel_target": None,
|
|
156
|
+
# Some versions of conda/mamba write "None" to the file instead of ""
|
|
157
|
+
"requested": bool(pkg.requested_spec and pkg.requested_spec.lower() != "none"),
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
|
|
@@ -192,113 +194,135 @@ async def handle_dist(dist: Distribution, locations: List[Path]) -> PackageInfo
|
|
|
192
194
|
return
|
|
193
195
|
installer = dist.read_text("INSTALLER") or ""
|
|
194
196
|
installer = installer.rstrip()
|
|
197
|
+
was_requested = dist.read_text("REQUESTED") is not None
|
|
195
198
|
# dist._path can sometimes be a zipp.Path or something else
|
|
196
199
|
dist_path = Path(str(dist._path)) # type: ignore
|
|
200
|
+
|
|
197
201
|
if installer == "conda":
|
|
198
202
|
return CondaPlaceHolder(name=convert_conda_to_pypi_name(dist_name), path=dist_path)
|
|
199
|
-
|
|
203
|
+
|
|
204
|
+
if dist_path.parent.suffix == ".egg":
|
|
200
205
|
# .egg files are no longer allowed on PyPI and setuptools > 80.0
|
|
201
206
|
# will not even install them, so let's ignore them
|
|
202
207
|
logger.info("Ignoring .egg package %s", dist_path)
|
|
203
208
|
return
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
vcs: Literal["git", "hg", "bzr", "svn"] = vcs_info["vcs"]
|
|
220
|
-
commit = vcs_info.get("commit_id")
|
|
221
|
-
url = url_metadata["url"]
|
|
222
|
-
pip_url = f"{vcs}+{url}"
|
|
223
|
-
# uv < 0.5.23 doesn't include commit_id, so we cannot pin
|
|
224
|
-
# to a specific commit.
|
|
225
|
-
if commit is not None:
|
|
226
|
-
pip_url += f"@{commit}"
|
|
227
|
-
return {
|
|
228
|
-
"name": dist_name,
|
|
229
|
-
"path": dist_path,
|
|
230
|
-
"source": "pip",
|
|
231
|
-
"channel": None,
|
|
232
|
-
"channel_url": None,
|
|
233
|
-
"subdir": None,
|
|
234
|
-
"conda_name": None,
|
|
235
|
-
"version": dist.version,
|
|
236
|
-
"wheel_target": pip_url,
|
|
237
|
-
}
|
|
238
|
-
elif str((Path("pypoetry") / "artifacts")) in url_metadata["url"]:
|
|
239
|
-
# if the install source is actually the pre 1.2 poetry cache location
|
|
240
|
-
# they this is actually just normal a pypi
|
|
241
|
-
# and we can ignore direct_url.json
|
|
209
|
+
|
|
210
|
+
url_metadata = json.loads(dist.read_text("direct_url.json") or "{}")
|
|
211
|
+
# Process direct_url.json metadata
|
|
212
|
+
# PEP-610: https://peps.python.org/pep-0610/
|
|
213
|
+
# If URL is not set, then this is not a valid PEP-610 package
|
|
214
|
+
# and we can ignore it.
|
|
215
|
+
# Similarly, if the URL is actually the pre 1.2 poetry cache location,
|
|
216
|
+
# then this is just a normal pip install and we can ignore direct_url.json
|
|
217
|
+
url = url_metadata.get("url", "")
|
|
218
|
+
if url and str((Path("pypoetry") / "artifacts")) not in url:
|
|
219
|
+
if url_metadata.get("vcs_info"):
|
|
220
|
+
# PEP-610 Source is VCS
|
|
221
|
+
vcs_info = url_metadata["vcs_info"]
|
|
222
|
+
if not isinstance(vcs_info, dict) or "vcs" not in vcs_info:
|
|
223
|
+
# PEP-610 requires vcs_info to be a dict with a vcs key
|
|
242
224
|
pass
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
"conda_name": None,
|
|
270
|
-
"version": dist.version,
|
|
271
|
-
"wheel_target": str(path),
|
|
272
|
-
}
|
|
273
|
-
egg_links = []
|
|
274
|
-
for location in locations:
|
|
275
|
-
egg_link_pth = location / Path(dist_name).with_suffix(".egg-link")
|
|
276
|
-
if egg_link_pth.is_file():
|
|
277
|
-
egg_links.append(location / Path(dist_name).with_suffix(".egg-link"))
|
|
278
|
-
if egg_links:
|
|
225
|
+
vcs: Literal["git", "hg", "bzr", "svn"] = vcs_info["vcs"]
|
|
226
|
+
commit = vcs_info.get("commit_id")
|
|
227
|
+
url = url_metadata["url"]
|
|
228
|
+
pip_url = f"{vcs}+{url}"
|
|
229
|
+
# uv < 0.5.23 doesn't include commit_id, so we cannot pin
|
|
230
|
+
# to a specific commit.
|
|
231
|
+
if commit is not None:
|
|
232
|
+
pip_url += f"@{commit}"
|
|
233
|
+
return {
|
|
234
|
+
"name": dist_name,
|
|
235
|
+
"path": dist_path,
|
|
236
|
+
"source": "pip",
|
|
237
|
+
"channel": None,
|
|
238
|
+
"channel_url": None,
|
|
239
|
+
"subdir": None,
|
|
240
|
+
"conda_name": None,
|
|
241
|
+
"version": dist.version,
|
|
242
|
+
"wheel_target": pip_url,
|
|
243
|
+
"requested": was_requested,
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if url_metadata.get("archive_info") is not None:
|
|
247
|
+
# PEP-610 - Source is an archive/wheel, somewhere!
|
|
248
|
+
p = urlparse(url)
|
|
249
|
+
if p.scheme == "file":
|
|
250
|
+
url = str(parse_file_uri(url))
|
|
279
251
|
return {
|
|
280
252
|
"name": dist_name,
|
|
281
|
-
"path": dist_path
|
|
253
|
+
"path": dist_path,
|
|
282
254
|
"source": "pip",
|
|
283
255
|
"channel": None,
|
|
284
256
|
"channel_url": None,
|
|
285
257
|
"subdir": None,
|
|
286
258
|
"conda_name": None,
|
|
287
259
|
"version": dist.version,
|
|
288
|
-
"wheel_target":
|
|
260
|
+
"wheel_target": url,
|
|
261
|
+
"requested": was_requested,
|
|
289
262
|
}
|
|
263
|
+
|
|
264
|
+
if url_metadata.get("dir_info") is not None:
|
|
265
|
+
# PEP-610 - Source is a local directory
|
|
266
|
+
path = parse_file_uri(url)
|
|
267
|
+
dir_info = url_metadata["dir_info"]
|
|
268
|
+
if dir_info.get("editable", False):
|
|
269
|
+
was_requested = True
|
|
270
|
+
return {
|
|
271
|
+
"name": dist_name,
|
|
272
|
+
"path": path,
|
|
273
|
+
"source": "pip",
|
|
274
|
+
"channel": None,
|
|
275
|
+
"channel_url": None,
|
|
276
|
+
"subdir": None,
|
|
277
|
+
"conda_name": None,
|
|
278
|
+
"version": dist.version,
|
|
279
|
+
"wheel_target": str(path),
|
|
280
|
+
"requested": was_requested,
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
egg_links = []
|
|
284
|
+
for location in locations:
|
|
285
|
+
egg_link_pth = location / Path(dist_name).with_suffix(".egg-link")
|
|
286
|
+
if egg_link_pth.is_file():
|
|
287
|
+
egg_links.append(location / Path(dist_name).with_suffix(".egg-link"))
|
|
288
|
+
if egg_links:
|
|
290
289
|
return {
|
|
291
290
|
"name": dist_name,
|
|
292
|
-
"path": dist_path,
|
|
291
|
+
"path": dist_path.parent,
|
|
293
292
|
"source": "pip",
|
|
294
293
|
"channel": None,
|
|
295
294
|
"channel_url": None,
|
|
296
295
|
"subdir": None,
|
|
297
296
|
"conda_name": None,
|
|
298
297
|
"version": dist.version,
|
|
299
|
-
"wheel_target":
|
|
298
|
+
"wheel_target": str(dist_path.parent),
|
|
299
|
+
"requested": True, # editable installs are always requested
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
# Handle .egg-info packages (legacy format)
|
|
303
|
+
# .egg-info directories are created for:
|
|
304
|
+
# 1. Editable installs (pip install -e)
|
|
305
|
+
# 2. Packages installed from setup.py directly
|
|
306
|
+
# 3. Older packages that don't use wheel format
|
|
307
|
+
# Since .egg-info packages typically don't have REQUESTED files,
|
|
308
|
+
# we assume they were explicitly requested
|
|
309
|
+
is_egg_info = str(dist_path).endswith(".egg-info")
|
|
310
|
+
if is_egg_info:
|
|
311
|
+
was_requested = True
|
|
312
|
+
|
|
313
|
+
return {
|
|
314
|
+
"name": dist_name,
|
|
315
|
+
"path": dist_path,
|
|
316
|
+
"source": "pip",
|
|
317
|
+
"channel": None,
|
|
318
|
+
"channel_url": None,
|
|
319
|
+
"subdir": None,
|
|
320
|
+
"conda_name": None,
|
|
321
|
+
"version": dist.version,
|
|
322
|
+
"wheel_target": None,
|
|
323
|
+
"requested": was_requested,
|
|
324
|
+
}
|
|
325
|
+
|
|
302
326
|
|
|
303
327
|
def _is_hash_match(dist: Distribution, pkg_paths: Dict[str, PackagePath], path: str):
|
|
304
328
|
dist_path = Path(str(dist._path)).parent # type: ignore
|
|
@@ -487,6 +511,12 @@ async def scan_prefix(
|
|
|
487
511
|
logger.warning("Could not find importable conda package for %s", pypi_name)
|
|
488
512
|
else:
|
|
489
513
|
filtered_conda[pypi_name] = importable_package
|
|
514
|
+
# Keep requested meta packages around
|
|
515
|
+
for pkg in packages:
|
|
516
|
+
if not pkg["path"] and pkg["requested"]:
|
|
517
|
+
pkg["name"] = f"{pkg['name']}-conda-metapackage"
|
|
518
|
+
filtered_conda[pkg["name"]] = pkg
|
|
519
|
+
break
|
|
490
520
|
else:
|
|
491
521
|
matching_package = next(
|
|
492
522
|
(
|
|
@@ -571,6 +601,7 @@ async def scan_prefix(
|
|
|
571
601
|
"subdir": None,
|
|
572
602
|
"conda_name": None,
|
|
573
603
|
"wheel_target": str(extra_path),
|
|
604
|
+
"requested": True,
|
|
574
605
|
})
|
|
575
606
|
for pkg in results:
|
|
576
607
|
if pkg["wheel_target"]:
|
|
@@ -58,6 +58,7 @@ class PackageInfo(TypedDict):
|
|
|
58
58
|
conda_name: Optional[str]
|
|
59
59
|
version: str
|
|
60
60
|
wheel_target: Optional[str]
|
|
61
|
+
requested: bool
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
class PackageSchema(TypedDict):
|
|
@@ -104,6 +105,7 @@ class PackageLevelEnum(int, Enum):
|
|
|
104
105
|
IGNORE = -2
|
|
105
106
|
MATCH_MINOR = -3
|
|
106
107
|
MATCH_MINOR_CEILING = -4
|
|
108
|
+
IGNORE_UNLESS_REQUESTED = -5
|
|
107
109
|
|
|
108
110
|
|
|
109
111
|
KNOWN_PACKAGE_LEVELS = {level.value for level in PackageLevelEnum}
|
|
@@ -122,6 +124,7 @@ class ApproximatePackageRequest(TypedDict):
|
|
|
122
124
|
conda_name: Optional[str]
|
|
123
125
|
version: str
|
|
124
126
|
wheel_target: Optional[str]
|
|
127
|
+
requested: bool
|
|
125
128
|
|
|
126
129
|
|
|
127
130
|
class ApproximatePackageResult(TypedDict):
|
|
@@ -247,6 +250,7 @@ class CondaPackage:
|
|
|
247
250
|
self.depends: List[str] = meta_json.get("depends", [])
|
|
248
251
|
self.constrains: List[str] = meta_json.get("constrains", [])
|
|
249
252
|
self.channel, self.channel_url = parse_conda_channel(self.name, meta_json["channel"], self.subdir)
|
|
253
|
+
self.requested_spec = meta_json.get("requested_spec", "")
|
|
250
254
|
|
|
251
255
|
def __repr__(self):
|
|
252
256
|
return (
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|