aboutcode-org / aboutcode-org/python-inspector

Support PEP 508 dependency specifications

Offen
#239 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
23
Forks
28
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.