Skip to content

Commit

Permalink
Fix version library conflict (#1026)
Browse files Browse the repository at this point in the history
Reason:
* distutils is deprected and removed from 3.12
* packaging is not a stdlib
  • Loading branch information
chen3feng authored Oct 11, 2023
1 parent 315b21c commit 77bbb05
Show file tree
Hide file tree
Showing 6 changed files with 368 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .codebeatignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/blade/pathlib.py
src/blade/version.py
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ build64_*
/blade.zip

/.coverage*

__pycache__
7 changes: 1 addition & 6 deletions src/blade/cc_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
import os
from string import Template

try:
from packaging.version import parse as version_parse
except ImportError:
from distutils.version import LooseVersion as version_parse


from blade import build_manager
from blade import build_rules
from blade import config
Expand All @@ -37,6 +31,7 @@
stable_unique,
var_to_list,
var_to_list_or_none)
from blade.version import LooseVersion as version_parse


# See https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#Overall-Options
Expand Down
2 changes: 1 addition & 1 deletion src/blade/java_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import collections
import os
import re
from distutils.version import LooseVersion

from blade import build_manager
from blade import build_rules
Expand All @@ -25,6 +24,7 @@
from blade.target import Target, LOCATION_RE
from blade.util import var_to_list
from blade.util import iteritems
from blade.version import LooseVersion


class MavenJar(Target):
Expand Down
Loading

0 comments on commit 77bbb05

Please sign in to comment.