Skip to content

Commit

Permalink
Use packaging to handle versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Ferrand committed Sep 18, 2023
1 parent 543e417 commit 8c65fc2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ black = "*"
flake8 = "*"
flake8-pyproject = "*"
mypy = "*"
packaging= "*"
pytest = "*"
pytest-cov = "*"
isort = "*"
Expand Down
4 changes: 2 additions & 2 deletions utils/create_release.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import datetime
import subprocess
from distutils.version import StrictVersion
from packaging import version


def main():
Expand All @@ -21,7 +21,7 @@ def main():
print("Please insert new version:")
new_version = str(input())

if StrictVersion(new_version) <= StrictVersion(current_version):
if version.parse(new_version) <= version.parse(current_version):
raise RuntimeError(
"Error new version is below current version: {0} < {1}".format(
new_version, current_version
Expand Down

0 comments on commit 8c65fc2

Please sign in to comment.