host: add patch version number to poetry version

Add the patch version number to poetry version. Because UHD uses
the patch number for adding branch information on development branches
we need to save the patch number in some different variable for later
access.
This commit is contained in:
Lars Amsel 2025-01-07 14:37:20 +01:00 committed by Jörg Hofrichter
parent 3ffc7a6281
commit c6274925ba
2 changed files with 9 additions and 6 deletions

View File

@ -19,11 +19,14 @@ find_package(Git QUIET)
# release)
# - set UHD_VERSION_DEVEL to true for master and development branches
########################################################################
set(UHD_VERSION_MAJOR 4)
set(UHD_VERSION_API 7)
set(UHD_VERSION_ABI 0)
set(UHD_VERSION_PATCH 0)
set(UHD_VERSION_DEVEL TRUE)
set(UHD_VERSION_MAJOR 4)
set(UHD_VERSION_API 7)
set(UHD_VERSION_ABI 0)
set(UHD_VERSION_PATCH 0)
#TODO add a version tag variable which allows to store additional
# branch information instead of overwriting the patch version.
set(UHD_VERSION_PATCH_ORIG ${UHD_VERSION_PATCH})
set(UHD_VERSION_DEVEL TRUE)
########################################################################
# If we're on a development branch, we skip the patch version

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "uhd"
version = "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}"
version = "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH_ORIG}"
description = "Universal Software Radio Peripheral (USRP) Hardware Driver Python API"
keywords=["SDR", "UHD", "USRP"]
authors=["Ettus Research <uhd.maintainer@emerson.com>"]