Dependencies from pyproject.toml not recognized in Python Inspector

Open
#197 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Reproduce the report with the supplied pyproject.toml and the python-inspector -p 3.12 -o linux --json inspector_output.json command. Trace how Python Inspector reads project metadata and compare the result with the dependencies declared under [project].dependencies; done means requests and numpy appear in the JSON output.

Written by the indexing model from the issue text.

Description

Hi,

I’m encountering an issue where the python-inspector tool does not recognize dependencies listed in my pyproject.toml file. Here are the details:

Environment
  • Python Inspector Version: 0.12.0
  • Python Version: 3.12
  • Operating System: Linux, Ubuntu 22.04
Steps to Reproduce
  1. Prepare a directory with the following pyproject.toml file:

    [build-system]
    requires = ["setuptools", "wheel"]
    build-backend = "setuptools.build_meta"
    
    [project]
    name = "example-project"
    version = "0.1.0"
    dependencies = [
        "requests>=2.25.1",
        "numpy>=1.20.0",
    ]
    
  2. Run the Python Inspector tool:

    python-inspector -p 3.12 -o linux --json inspector_output.json
    
  3. Observe the output.

Expected Behavior

Dependencies listed in the pyproject.toml file (requests and numpy) should be recognized and included in the output.

Actual Behavior

The dependencies from pyproject.toml are not recognized or included in the output.

Additional Information

This issue arose while using ORT, which depends on python-inspector. It seems like the problem originates from python-inspector itself when analyzing pyproject.toml.

Please let me know if you need further details or logs!

Thanks,
Boaz

Dominant language
Python
Stars
23
Forks
29
Avg merge
1h 7m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aboutcode-org/python-inspector

All issues in aboutcode-org/python-inspector

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.