Skip to content

Commit 8d1807e

Browse files
committed
Revert "fixed poetry git, url, path deps to pass tests"
This reverts commit 199be25.
1 parent c6b94ca commit 8d1807e

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

metadata_please/source_checkout.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -230,26 +230,7 @@ def from_poetry_checkout(path: Path) -> bytes:
230230
optional = False
231231

232232
if not version:
233-
# e.g. git, path or url dependencies
234-
if "path" in v:
235-
buf.append(f"Requires-Dist: {v['path']}\n")
236-
237-
elif "url" in v:
238-
buf.append(f"Requires-Dist: {v['url']}\n")
239-
240-
elif "git" in v:
241-
git_link = f"git+{v['git']}"
242-
243-
# from both poetry and pypa docs, seems like only one of the following should be specified
244-
revision = v.get("rev") or v.get("tag") or v.get("branch")
245-
if revision:
246-
git_link += f"@{revision}"
247-
248-
if "subdirectory" in v:
249-
git_link += f"#subdirectory={v['subdirectory']}"
250-
251-
buf.append(f"Requires-Dist: {k} @ {git_link}\n")
252-
233+
# e.g. git, path or url dependencies, skip for now
253234
continue
254235

255236
# https://python-poetry.org/docs/dependency-specification/#version-constraints

metadata_please/tests/source_checkout.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ def test_poetry_full(self) -> None:
111111
c3 = "~1"
112112
d = {version="2", python="<3.11"}
113113
e = {version="2", markers="sys_platform == 'darwin'"}
114-
skipped = {git = "...", tag = "12345"}
115-
my-package = { url = "https://example.com/my-package-0.1.0.tar.gz" }
116-
my-other-package = { path = "../my-package/dist/my-other-package-0.1.0.tar.gz" }
114+
skipped = {git = "..."}
117115
complex = {extras=["bar", "baz"], version="2"}
118116
opt = { version = "^2.9", optional = true}
119117
unused-extra = { version = "2", optional = true }
@@ -135,9 +133,6 @@ def test_poetry_full(self) -> None:
135133
"c3>=1,<2",
136134
"d==2 ; python_version < '3.11'",
137135
"e==2 ; sys_platform == 'darwin'",
138-
"skipped @ git+...@12345",
139-
"https://example.com/my-package-0.1.0.tar.gz",
140-
"../my-package/dist/my-other-package-0.1.0.tar.gz",
141136
"complex[bar,baz]==2",
142137
'opt>=2.9,<3.0 ; extra == "foo"',
143138
],

0 commit comments

Comments
 (0)