Python inspector fails to scan a PyBuilder project
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by running the python-inspector command from the issue against the linked pyinsp-pybuilder-test project, comparing the failing first run with the successful second run. Inspect how setup.py and requirements.txt are handled during dependency resolution, especially the point where setup.py receives --python-version. Done means the reported command succeeds on its first run and produces the expected dependency output.
Written by the indexing model from the issue text.
Description
Hi,
I was trying to scan a project that was created using PyBuilder and the scan failed with the following error:
python-inspector --python-version 311 --operating-system linux --json-pdt tmp.json --analyze-setup-py-insecurely --requirement requirements.txt --setup-py setup.py --verbose
Resolving dependencies...
Warning: unable to recognize setup provider in ~/Documents/pyinsp-pybuilder-test/setup.py: defaulting to 'distutils.core'.
pyb 0.13.10
PyBuilder version 0.13.10
Build started at 2025-07-30 12:20:02
------------------------------------------------------------
[INFO] Building test version 0.1.dev (0.1.dev20250730102002)
[INFO] Executing build in /Users/hodzic/Documents/pyinsp-pybuilder-test
[INFO] Going to execute tasks: clean, install_build_dependencies, package
[INFO] Removing target directory /Users/hodzic/Documents/pyinsp-pybuilder-test/target
[INFO] Processing plugin packages 'pypandoc~=1.4' to be installed with {'upgrade': True}
[INFO] Processing plugin packages 'setuptools>=38.6.0' to be installed with {}
[INFO] Processing plugin packages 'twine>=1.15.0' to be installed with {'upgrade': True}
[INFO] Processing plugin packages 'wheel>=0.34.0' to be installed with {}
[INFO] Creating target 'build' VEnv in '/Users/hodzic/Documents/pyinsp-pybuilder-test/target/venv/build/cpython-3.11.11.final.0'
[INFO] Creating target 'test' VEnv in '/Users/hodzic/Documents/pyinsp-pybuilder-test/target/venv/test/cpython-3.11.11.final.0'
[INFO] Installing build dependencies
[INFO] Building distribution in /Users/hodzic/Documents/pyinsp-pybuilder-test/target/dist/test-0.1.0
[INFO] Copying scripts to /Users/hodzic/Documents/pyinsp-pybuilder-test/target/dist/test-0.1.0/scripts
[INFO] Writing setup.py as /Users/hodzic/Documents/pyinsp-pybuilder-test/target/dist/test-0.1.0/setup.py
------------------------------------------------------------
BUILD SUCCESSFUL
------------------------------------------------------------
Build Summary
Project: test
Version: 0.1.dev (0.1.dev20250730102002)
Base directory: ~/Documents/pyinsp-pybuilder-test
Environments:
Tasks: clean [0 ms] prepare [10881 ms] install_build_dependencies [287 ms] compile_sources [0 ms] package [0 ms]
Build finished at 2025-07-30 12:20:13
Build took 11 seconds (11563 ms)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --python-version not recognized
Have in mind second run with the same params was successful:
Resolving dependencies...
direct_dependencies:
DependentPackage(purl='pkg:pypi/[email protected]', extracted_requirement='pybuilder==0.13.10', scope='install')
DependentPackage(purl='pkg:pypi/[email protected]', extracted_requirement='pybuilder-pytest-coverage==1.1.2', scope='install')
environment: Environment(python_version='311', operating_system='linux')
repos:
PypiSimpleRepository(index_url='https://pypi.org/simple', credentials=None)
versions:
retrieved versions for package 'pybuilder-pytest-coverage'
retrieved versions for package 'pybuilder'
dependencies:
retrieved dependencies for requirement 'pkg:pypi/[email protected]'
retrieved dependencies for requirement 'pkg:pypi/[email protected]'
retrieve package data from pypi:
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/coverage%5btoml%[email protected]'
done!
Any guidance as to why it fails the first time and how to overcome it? Thanks!
You can see the source code here: https://github.com/voidpetal/pyinsp-pybuilder-test
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aboutcode-org/python-inspector
-
`packages` is empty when using a non-pypi.org simple index (e.g. Sonatype Nexus)Possibly taken @avika269 claimed this 6 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 62/100
aboutcode-org/python-inspector#268 · 2 comments ·
-
InconsistentCandidate: Pre-Release not allowMay be free again @Anurag-S1ngh claimed this 25 days ago, and no pull request is open. Openbug design nice-to-have
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aboutcode-org/python-inspector#257 · 1 comment ·
-
Python Inspector version 0.15.0 contains the wrong version stringMay be free again @Anurag-S1ngh claimed this 18 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
aboutcode-org/python-inspector#253 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
aboutcode-org/python-inspector#246 · 2 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aboutcode-org/python-inspector#242 · 1 comment ·
All issues in aboutcode-org/python-inspector
Similar issues
-
opensubtitlescom: provider rejects pt-PT even though its own converter maps itPossibly taken @paulo-0308 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Diaoul/subliminal#1405 ·
-
Internal ErrorOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
frappe/frappe_docker#2071 ·
Maintainers usually reply within 1 day
-
bug python
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
traceloop/openllmetry#4717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
The-Pocket/PocketFlow#161 ·
-
comp/desktop P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#157702 ·
Maintainers usually reply within 1 day