Skip to content

Commit 57b11b2

Browse files
committed
pip: Drop extra poetry code in pyproject.toml
poetry v2 supports PEP621 so the original code will work for it.
1 parent 0501a0b commit 57b11b2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pip/flatpak-pip-generator

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,7 @@ elif opts.pyproject_file:
199199
pyproject_file = os.path.expanduser(opts.pyproject_file)
200200
with open(pyproject_file, "rb") as f:
201201
pyproject_data = toml_load(f)
202-
is_poetry = pyproject_data.get('tool', {}).get('poetry') is not None
203-
if is_poetry:
204-
dependencies = pyproject_data.get('tool', {}).get('poetry', {}).get('dependencies', {})
205-
dependencies.pop('python', None)
206-
else:
207-
dependencies = pyproject_data.get("project", {}).get("dependencies", [])
202+
dependencies = pyproject_data.get("project", {}).get("dependencies", [])
208203
packages = list(requirements.parse('\n'.join(dependencies)))
209204
with tempfile.NamedTemporaryFile('w', delete=False, prefix='requirements.') as req_file:
210205
req_file.write('\n'.join(dependencies))

0 commit comments

Comments
 (0)