Skip to content

Commit

Permalink
fix: convert prerelease version to strict semantic equivalent
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Nov 14, 2023
1 parent b0041bf commit f463db5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,24 @@ def load_version() -> Dict[str, str]:
return version


def get_semantic_version() -> str:
"""
Return the semantic version number.
Note that pypi does not allow semantic version numbers to contain a dash.
Also note that pypi does not allow semantic version numbers to contain a 'v' prefix.
and also that pypi does not allow semantic version numbers to contain a 'next' suffix.
"""
return VERSION["__version__"].replace("-next.", "a")


CHANGELOG = open(os.path.join(os.path.dirname(__file__), "CHANGELOG.md")).read()
ABOUT = load_about()
VERSION = load_version()

setup(
name="secure-logger",
version=VERSION["__version__"],
version=get_semantic_version(),
description="A decorator to generate redacted and nicely formatted log entries",
long_description=load_readme(),
long_description_content_type="text/x-rst",
Expand Down

0 comments on commit f463db5

Please sign in to comment.