Skip to content

Commit

Permalink
drop distutil in favor of setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
denehoffman authored Nov 3, 2023
1 parent 5b2c216 commit fc922fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oterm/store/store.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
import sys
from distutils.version import StrictVersion
from packaging import version
from importlib import metadata
from pathlib import Path

Expand Down Expand Up @@ -87,9 +87,9 @@ async def create(cls) -> "Store":
current_version: str = metadata.version("oterm")
db_version = await self.get_user_version()
for version, steps in upgrades:
if StrictVersion(current_version) >= StrictVersion(
if version.parse(current_version) >= version.parse(
version
) and StrictVersion(version) > StrictVersion(db_version):
) and version.parse(version) > version.parse(db_version):
for step in steps:
await step(self.db_path)
await self.set_user_version(current_version)
Expand Down

0 comments on commit fc922fd

Please sign in to comment.