Skip to content

Publish bead to PyPI for pipx installation #1

@korenmiklos

Description

@korenmiklos

Goal

Make bead installable via pipx install bead by publishing to PyPI.

Current Status

Good News:

  • Package name "bead" is available on PyPI
  • Modern packaging setup with pyproject.toml using flit_core
  • CLI entry point configured
  • Basic metadata present (name, version, description, author, license)

Required Steps

1. Complete Project Metadata in pyproject.toml

  • Add readme = "README.md"
  • Add homepage or repository URL
  • Add keywords for discoverability
  • Add classifiers (Python versions, development status, topic)
  • Add project.urls for documentation, bug tracker

2. Prepare Documentation

  • Clean up README.md (remove inactive CI badges)
  • Add installation instructions for pipx install bead
  • Add quick start guide
  • Consider adding CHANGELOG.md

3. Build Configuration

  • Verify MANIFEST.in includes all necessary files
  • Consider removing tests from packages in pyproject.toml
  • Evaluate if tracelog.py should be in distribution

4. Create PyPI Account & API Token

  • Register at https://pypi.org
  • Create API token for uploads
  • Store token securely (GitHub secrets for CI)

5. Test on TestPyPI First

# Build the package
pip install build
python -m build

# Upload to TestPyPI
pip install twine
twine upload --repository testpypi dist/*

# Test installation
pipx install --index-url https://test.pypi.org/simple/ bead

6. Upload to Production PyPI

# Upload to PyPI
twine upload dist/*

# Verify installation
pipx install bead

7. Post-Upload Tasks

  • Set up GitHub Actions for automated releases
  • Add PyPI badge to README
  • Implement semantic versioning
  • Configure pre-commit hooks for version bumping

Considerations

  • ⚠️ Unusual dependency: pip>=25.1.1 - verify if intentional
  • ⚠️ Consider if tests directory should be in package distribution
  • ℹ️ .bumpversion.cfg exists - use for version management

Quick Reference

# One-time setup
pip install build twine

# For each release
python -m build
twine check dist/*
twine upload dist/*

Benefits

  • Easy installation: pipx install bead
  • Automatic dependency management
  • Version pinning support
  • Wide distribution and discoverability

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions