Skip to content

Missing pyproject.toml / No Python Packaging #45

Description

@bradjin8

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

  • A pyproject.toml exists at the repository root with correct project metadata (name, version, description, license, Python version requirement, authors)
  • All runtime dependencies from requirements.txt are declared in [project.dependencies] with both lower and upper bounds (e.g., flask>=3.0,<4)
  • Dev/test dependencies are declared in [project.optional-dependencies] under a dev extra
  • A [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 works
  • The existing requirements.txt is 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] 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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions