Repository: cppa-cursor-browser
Assignee: Brad @bradjin8
Severity: Medium
Problem
The project has no pyproject.toml, setup.py, or setup.cfg — it is not an installable Python package. This forces the export script to use sys.path.insert(0, project_root) to import project modules, a fragile mechanism that breaks under any invocation context other than running from the repo root. The absence of packaging infrastructure also blocks PyPI distribution (competitors like cursor-chat-to-markdown are pip-installable), prevents use of console-script entry points, and makes the export script's parallel implementation the path of least resistance over shared-module reuse.
Acceptance Criteria
Implementation Notes
Use the modern [build-system] with hatchling or setuptools>=68 as the build backend. The package structure may need a top-level src/ layout or an __init__.py at the project root depending on the current module layout. Coordinate with item 1 (export script refactoring) — once pyproject.toml is in place, the export script can drop sys.path.insert and import normally. This item should ideally land first so that item 1 can build on it. Also coordinate with item 6 (unbounded dependency pins): the [project.dependencies] section should use bounded version specifiers from the start.
References
- Eval finding: test 27
- Cluster:
packaging-infrastructure-missing
- Related files:
requirements.txt, scripts/export.py (the sys.path.insert hack at the top), project root (no pyproject.toml exists)
- Compounds: COMPOUND-C (no install path + parallel implementation)
Repository: cppa-cursor-browser
Assignee: Brad @bradjin8
Severity: Medium
Problem
The project has no
pyproject.toml,setup.py, orsetup.cfg— it is not an installable Python package. This forces the export script to usesys.path.insert(0, project_root)to import project modules, a fragile mechanism that breaks under any invocation context other than running from the repo root. The absence of packaging infrastructure also blocks PyPI distribution (competitors like cursor-chat-to-markdown are pip-installable), prevents use of console-script entry points, and makes the export script's parallel implementation the path of least resistance over shared-module reuse.Acceptance Criteria
pyproject.tomlexists at the repository root with correct project metadata (name, version, description, license, Python version requirement, authors)requirements.txtare declared in[project.dependencies]with both lower and upper bounds (e.g.,flask>=3.0,<4)[project.optional-dependencies]under adevextra[project.scripts]entry point is defined for the CLI export command (e.g.,cursor-chat-export = "scripts.export:main")pip install -e .succeeds from the repo root and the console-script entry point worksrequirements.txtis retained for backward compatibility but references the pyproject.toml as the source of truth (or is removed if redundant)Implementation Notes
Use the modern
[build-system]withhatchlingorsetuptools>=68as the build backend. The package structure may need a top-levelsrc/layout or an__init__.pyat the project root depending on the current module layout. Coordinate with item 1 (export script refactoring) — once pyproject.toml is in place, the export script can dropsys.path.insertand import normally. This item should ideally land first so that item 1 can build on it. Also coordinate with item 6 (unbounded dependency pins): the[project.dependencies]section should use bounded version specifiers from the start.References
packaging-infrastructure-missingrequirements.txt,scripts/export.py(thesys.path.inserthack at the top), project root (nopyproject.tomlexists)