Skip to content

Replace generated version.h with macro#735

Merged
hugovk merged 1 commit into
ultrajson:mainfrom
hugovk:version-macro
May 15, 2026
Merged

Replace generated version.h with macro#735
hugovk merged 1 commit into
ultrajson:mainfrom
hugovk:version-macro

Conversation

@hugovk

@hugovk hugovk commented May 15, 2026

Copy link
Copy Markdown
Member

Fixes #734.

Looking inside the wheels for 5.12.0 and 5.12.1:

The new one contains ./src/ujson/python/version.h which isn't meant to be in the wheel.

This caused by a change in the new setuptools_scm 10.0.0 relating to src/ layouts.

The easiest fix is to drop the generated file, and replace it with a macro, as the version is only used in one place.

@codecov

codecov Bot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.58%. Comparing base (9eb608d) to head (d2d901a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #735   +/-   ##
=======================================
  Coverage   92.58%   92.58%           
=======================================
  Files           7        7           
  Lines        2199     2199           
=======================================
  Hits         2036     2036           
  Misses        163      163           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bwoodsend

Copy link
Copy Markdown
Collaborator

That's much nicer than having that generated header file floating around

@hugovk hugovk merged commit e9183ae into ultrajson:main May 15, 2026
30 checks passed
@hugovk hugovk deleted the version-macro branch May 15, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: Fixed For any bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5.12.1 ships a src namespace package, polluting the src namespace

2 participants