Skip to content

Conversation

@sunt05
Copy link
Contributor

@sunt05 sunt05 commented Jul 3, 2025

Summary

  • Fixed the version detection issue that was causing the publish workflow to fail
  • The package was being built with version 0.0.0, causing PyPI to reject it

Problem

The last GitHub Actions run failed with:

Checking dist/umep_reqs-0.0.0-py3-none-any.whl: ERROR InvalidDistribution: Metadata is missing required fields: Name, Version.

This happened because:

  1. The new pyproject.toml was missing setuptools_scm configuration
  2. Without proper configuration, the package was built with version 0.0.0
  3. PyPI rejects packages with invalid version numbers

Solution

  • Added [tool.setuptools] section to configure package discovery
  • Added [tool.setuptools_scm] section to enable version detection from git tags
  • The package now correctly detects version from git tags (e.g., 2.4.dev13+gab28aa5)

Test plan

  • Tested build locally with python -m build - version is correctly detected
  • GitHub Actions should now build the package with proper version
  • Publishing to Test PyPI should succeed with valid metadata

- Add [tool.setuptools] section to properly configure package discovery
- Add [tool.setuptools_scm] section (though empty for now, using defaults)
- This ensures the package version is correctly detected from git tags
- Fixes the "Metadata is missing required fields: Name, Version" error

The build was failing because setuptools_scm wasn't properly configured in pyproject.toml, causing the package to be built with version 0.0.0.
@sunt05 sunt05 merged commit fa37307 into main Jul 3, 2025
1 check passed
@sunt05 sunt05 deleted the fix/setuptools-scm-config branch July 3, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants