Enhancement: parse `install_requires` and `python_requires` in `setup.py`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python, typescript
Línea de trabajo
Start with the Python scanner in src/core-open/scanners/python-scanner.ts, especially PYTHON_MANIFEST_FILES and the scan loop around lines 1344–1363, then inspect nearby parser tests. Add coverage in test/python-setup-py.test.ts using literal setup.py inputs; never execute the file as Python. Done means literals are extracted with the stated precedence and optional dependency behavior, while dynamic values are skipped without failing the scan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
- Difficulty: medium
- Area: Python scanner
Problem
setup.py is in PYTHON_MANIFEST_FILES (src/core-open/scanners/python-scanner.ts, around lines 1251–1260), so a directory that contains only setup.py is treated as a Python project. The scan loop (around lines 1344–1363) parses pyproject.toml, setup.cfg, Pipfile, and requirements files only. There is no parseSetupPy, and no test mentions setup.py as a dependency source.
A setuptools project that has not migrated to pyproject.toml / setup.cfg is discovered, then reported with no dependencies and no runtime, even when the file is a straightforward literal:
setup(
name="demo",
python_requires=">=3.11",
install_requires=[
"requests>=2.31",
"flask>=3.0",
],
extras_require={"dev": ["pytest>=7"]},
)
Do not execute setup.py.
Expected behaviour
A conservative, literal reader (regex / small AST of string lists only — no exec, no import of the project) extracts name, python_requires, install_requires, and optionally extras_require when they are string literals or lists of string literals, including the setuptools.setup(...) and from setuptools import setup forms. Dynamic values (install_requires=read_requirements(), computed lists) are skipped, not guessed. python_requires is a runtime fallback, with the same precedence as setup.cfg (pyproject.toml still wins when both exist). Extras are optionalDependencies. A package already in install_requires stays production.
Acceptance
- A
setup.py-only project with literalinstall_requiresandpython_requiresreports those packages and the Python runtime. extras_requireliterals are optional rows.- A
setup.pythat only builds its requirements dynamically reports no invented packages and does not fail the scan. pyproject.toml/setup.cfgin the same directory still win for name, runtime, and duplicate package sections.- Tests live in a new
test/python-setup-py.test.ts. Never run the file as Python.
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 3
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 76
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vibgrate/cli
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
Todos los issues de vibgrate/cli
Issues similares
-
documentation Entwickler
Dificultad 1/5 Menos de una hora Aptitud para principiantes 89/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area:frontend bug ci-test level:low priority:high
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
skytuhua-org/Gen-V1#2974 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
area: cli area: core priority: P3 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
appandflow/stim#6736 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
naomiaro/waveform-playlist#973 ·
Los mantenedores suelen responder en 1 día