Skip to content

Commit

Permalink
switch to pkg_resources (PaddlePaddle#4216)
Browse files Browse the repository at this point in the history
  • Loading branch information
sijunhe authored Dec 23, 2022
1 parent 8b33cfe commit c61c4df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/should_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import subprocess
import sys

from packaging import version
from pkg_resources import parse_version

PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Expand Down Expand Up @@ -77,5 +77,5 @@ def read_version_of_local_package(version_file_path: str) -> str:
remote_version = read_version_of_remote_package(args.name)
local_version = read_version_of_local_package(local_version_file)

should_deploy = str(version.parse(remote_version) < version.parse(local_version)).lower()
should_deploy = str(parse_version(remote_version) < parse_version(local_version)).lower()
print(f"should_deploy={should_deploy}")

0 comments on commit c61c4df

Please sign in to comment.