aboutcode-org / aboutcode-org/python-inspector

Support PEP 508 dependency specifications

未关闭
#239 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
23
派生
28
PR 合并指标
30 天内没有已合并 PR

描述

I have the following requirements.txt:
```
pydantic==2.11.7 ; python_full_version < '3.11'
```

python-inspector is running on a system with Python 3.11, but I'm setting the version to 3.10:
```sh
python-inspector --python-version 310 --json-pdt result.json --requirement requirements.txt
```

This is the result:
```json
{
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.14.3",
"options": [
"--index-url https://pypi.org/simple",
"--json-pdt result-minimal.json",
"--operating-system linux",
"--python-version 310",
"--requirement requirements-minimal.txt"
],
"notice": "Dependency tree generated with python-inspector.\npython-inspector is a free software tool from nexB Inc. and others.\nVisit https://github.com/aboutcode-org/python-inspector/ for support and download.",
"warnings": [],
"errors": []
},
"files": [
{
"type": "file",
"path": "requirements-minimal.txt",
"package_data": [
{
"type": "pypi",
"namespace": null,
"name": null,
"version": null,
"qualifiers": {},
"subpath": null,
"primary_language": "Python",
"description": null,
"release_date": null,
"parties": [],
"keywords": [],
"homepage_url": null,
"download_url": null,
"size": null,
"sha1": null,
"md5": null,
"sha256": null,
"sha512": null,
"bug_tracking_url": null,
"code_view_url": null,
"vcs_url": null,
"copyright": null,
"license_expression": null,
"declared_license": null,
"notice_text": null,
"source_packages": [],
"file_references": [],
"extra_data": {},
"dependencies": [
{
"purl": "pkg:pypi/pydantic@2.11.7",
"extracted_requirement": "pydantic==2.11.7; python_full_version < \"3.11\"",
"scope": "install",
"is_runtime": true,
"is_optional": false,
"is_resolved": true,
"resolved_package": {},
"extra_data": {
"is_editable": false,
"link": null,
"hash_options": [],
"is_constraint": false,
"is_archive": null,
"is_wheel": false,
"is_url": null,
"is_vcs_url": null,
"is_name_at_url": false,
"is_local_path": null
}
}
],
"repository_homepage_url": null,
"repository_download_url": null,
"api_data_url": null,
"datasource_id": "pip_requirements",
"purl": null
}
]
}
],
"packages": [],
"resolved_dependencies_graph": []
}
```

The expected outcome would be that the packages and the resolved dependency graph is correctly populated, but because I'm running on python 3.11 this dependency is not considered as relevant, and excluded.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。