Skip to content

add AutoconfVersion supporting AX_COMPARE_VERSION scheme - #230

Open
IM-SAL wants to merge 1 commit into
aboutcode-org:mainfrom
IM-SAL:add-autoconfig-version-scheme
Open

IM-SAL wants to merge 1 commit into
aboutcode-org:mainfrom
IM-SAL:add-autoconfig-version-scheme

Conversation

@IM-SAL

@IM-SAL IM-SAL commented Nov 25, 2026 •

Copy link
Copy Markdown

Summary

-Adds AutoconfVersion, a new version class implementing the comparison
-scheme used by GNU Autoconf's AX_COMPARE_VERSION macro.

Changes

  • src/univers/versions.py — new AutoconfVersion class + added to AVAILABLE_VERSIONS
  • tests/test_autoconf_version.py — 5 tests covering:
    • Basic comparisons (==, >, <)
    • Length-differing versions (3.15 < 3.15.6)
    • Separator normalization (-, _, . treated as equivalent)
    • Empty string treated as version 0
    • Invalid strings raise InvalidVersion

References

Closes #178

Signed-off-by: IM-SAL salboiindev@gmail.com

Signed-off-by: IM-SAL <salboiindev@gmail.com>
@IM-SAL
IM-SAL force-pushed the add-autoconfig-version-scheme branch from 46a91a6 to bdd9180 Compare November 25, 2026 08:53

This branch has not been deployed

No deployments
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.

Add support for scheme https://www.gnu.org/software/autoconf-archive/ax_compare_version.html

1 participant