aboutcode-org / aboutcode-org/pip-requirements-parser

Potential improvement for editable installs

未關閉
#6 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
20
分支
13
PR 合併指標
30 天內沒有已合併 PR

描述

I noticed another small difference between `pip-api` and `pip-requirements-parser` which I'd like to bring up.
At the moment, `pip-requirements-parser` relies on an egg fragment being at the end of an editable install in order to infer its name/specifier. Otherwise, the `EditableRequirement`'s `req` member is set to `None`.

`pip-api` has some special logic that checks whether the editable installation points to a directory. If so, it checks that directory for a `setup.py` and attempts to parse the package name and version out of the file. You can find the relevant logic [here](https://github.com/di/pip-api/blob/master/pip_api/_parse_requirements.py#L248).

How do you feel about having this logic in `pip-requirements-parser`? I appreciate that this logic perhaps goes a bit beyond "parsing" but it'd be useful since not all editable requirements have an egg fragment.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。