Skip to content

Commit

Permalink
py: fix abi_requires()
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Jul 26, 2021
1 parent 95356d1 commit ff880e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions python/pvxslibs/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@

version = get_distribution('pvxslibs').version # as a string

version_info = (int(x) for x in re.match(r'([\d]+)\.([\d]+)\.([\d]+)', version).groups())
version_info = re.match(r'([\d]+)\.([\d]+)\.([\d]+)([ab]\d+)?', version).groups()

version_info = namedtuple('Version', ['major', 'minor', 'maintainance'])(*version_info)
version_info = namedtuple('Version', ['major', 'minor', 'maintainance', 'dev']) \
(int(version_info[0]), int(version_info[1]), int(version_info[2]), version_info[3])

def abi_requires():
"""Return a version requirement string which identifies
Expand All @@ -28,4 +29,4 @@ def abi_requires():
"""
nextminor = version_info.minor+1

return 'pvxslibs >={0.major}.{0.minor}.{0.maintainance}, <{0.major}.{1}.0a1'.format(version_info, nextminor)
return 'pvxslibs >={0}, <{1.major}.{2}.0a1'.format(version, version_info, nextminor)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def define_DSOS(self):

setup(
name='pvxslibs',
version=pvxs_ver+"a3",
version=pvxs_ver+"a4",
description="PVXS libraries packaged for python",
url='https://mdavidsaver.github.io/pvxs',
author='Michael Davidsaver',
Expand Down

0 comments on commit ff880e9

Please sign in to comment.