Skip to content

Implement dynamic versioning in setup.py using setuptools-scm for automated PEP 440 compliance #1

@chigwell

Description

@chigwell

User Story
As a software maintainer,
I want to implement dynamic versioning in setup.py
so that release management becomes automated and versioning complies with PEP 440 standards.

Background
The current setup.py hardcodes the version as 2025.4.231619, which:

  • Requires manual updates for every release, increasing human error risk
  • Conflicts with PEP 440's recommendation for dynamic versioning
  • Complicates CI/CD pipelines by forcing version bumps in source control
    The static version in setup.py also creates synchronization challenges with PyPI deployments and semantic versioning practices.

Acceptance Criteria

  • Modify setup.py to dynamically generate package versions using setuptools-scm or equivalent
  • Remove hardcoded version='2025.4.231619' and replace with automated version detection
  • Add setuptools-scm to install_requires in setup.py if required
  • Ensure generated versions comply with PEP 440 format during local builds and CI/CD
  • Validate through testing that:
    • python setup.py sdist bdist_wheel produces packages with correct dynamic versions
    • PyPI deployments automatically inherit version from git tags
    • MIT license and other metadata remain unchanged in built packages
  • Update documentation if version display logic changes in README or elsewhere

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions