Skip to content

Commit

Permalink
fix blade package tools and compatibility to python2.7 (#1035)
Browse files Browse the repository at this point in the history
Co-authored-by: jefferydeng <[email protected]>
Co-authored-by: CHEN Feng <[email protected]>
  • Loading branch information
3 people authored May 23, 2024
1 parent 64968d6 commit c8a4e92
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist_blade
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ function make_blade_zip() {

cd $src_dir

echo "VERSION = r'''$version'''" > blade/version.py
echo "VERSION = r'''$version'''" > blade/blade_version.py
zip blade.zip __main__.py blade/*.py
rm blade/version.py
rm blade/blade_version.py
mv ./blade.zip ${dist_file_path}

cd $blade_dir
Expand Down
4 changes: 2 additions & 2 deletions src/blade/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
from blade.toolchain import BuildArchitecture
from blade.toolchain import ToolChain

# The 'version.py' is generated by the dist script, then it only exists in blade.zip
# The 'blade_version.py' is generated by the dist script, then it only exists in blade.zip
try:
from blade.version import VERSION
from blade.blade_version import VERSION
except ImportError:
VERSION = '(developing, unversioned)'

Expand Down
4 changes: 2 additions & 2 deletions src/blade/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class StrictVersion(Version):
"""

version_re = re.compile(
r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', re.VERBOSE | re.ASCII
r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', re.VERBOSE
)

def parse(self, vstring):
Expand Down Expand Up @@ -356,4 +356,4 @@ def _cmp(self, other):
return 1


# end class LooseVersion
# end class LooseVersion

0 comments on commit c8a4e92

Please sign in to comment.