Skip to content

[misc] Release prep: version without tag prefix, SPDX license - #2233

Merged
felixdittrich92 merged 2 commits into
mindee:mainfrom
felixdittrich92:release-prep
Nov 23, 2026
Merged

felixdittrich92 merged 2 commits into
mindee:mainfrom
felixdittrich92:release-prep

Conversation

@felixdittrich92

Copy link
Copy Markdown
Collaborator

Summary

Two small packaging fixes before the v1.2.0 release (same as felixdittrich92/OnnxTR#132):

  • doctr.__version__ without the tag prefix: the publish workflow passes the release tag (vX.Y.Z) as BUILD_VERSION, which setup.py wrote as is into doctr/version.py. The package version is normalized to X.Y.Z, but __version__ kept the prefix (the published python-doctr 1.1.0 reports 'v1.1.0'). The prefix is now removed.
  • SPDX license expression: license = {file = "LICENSE"} (TOML table) and the license classifier are deprecated by setuptools, builds will no longer be supported after 2027-02-18. The license is now declared as license = "Apache-2.0" with license-files = ["LICENSE"], which requires setuptools>=77.0.0 at build time.

Tests

Built like the publish workflow (BUILD_VERSION=v1.2.0 python -m build):

  • no deprecation warning anymore (8 deprecation lines before: license TOML table and license classifier)
  • doctr.__version__ and the package metadata are both 1.2.0 (1.1.1a0 without BUILD_VERSION); before this PR, __version__ was 'v1.2.0'
  • metadata: License-Expression: Apache-2.0, License-File: LICENSE
  • twine check passes for the wheel and the sdist
  • the wheel installs and imports in a fresh virtual environment

🤖 Generated with Claude Code

- setup.py: strip the "v" prefix of the release tag passed as BUILD_VERSION,
  so doctr.__version__ is "X.Y.Z" (the published 1.1.0 reports "v1.1.0")
- pyproject.toml: declare the license as an SPDX expression with
  license-files and drop the deprecated license classifier
  (requires setuptools>=77.0.0 at build time)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@felixdittrich92 felixdittrich92 added topic: build Related to dependencies and build type: misc Miscellaneous labels Nov 23, 2026
@felixdittrich92 felixdittrich92 self-assigned this Nov 23, 2026
@felixdittrich92 felixdittrich92 added this to the 1.2.0 milestone Nov 23, 2026
@felixdittrich92
felixdittrich92 merged commit 770710c into mindee:main Nov 23, 2026
55 of 57 checks passed
@felixdittrich92
felixdittrich92 deleted the release-prep branch November 23, 2026 09:47
@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.25%. Comparing base (fa3cfc0) to head (d756d08).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2233      +/-   ##
==========================================
- Coverage   98.26%   98.25%   -0.01%     
==========================================
  Files         181      181              
  Lines       12863    12863              
==========================================
- Hits        12640    12639       -1     
- Misses        223      224       +1     
Flag Coverage Δ
unittests 98.25% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: build Related to dependencies and build type: misc Miscellaneous

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant