Skip to content

Commit

Permalink
don't even use distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Jan 8, 2024
1 parent d015a16 commit 10e3e39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .github/docker-images/ubuntu-18-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ RUN apt-get update -qq \
ca-certificates \
&& apt-get clean

# Add the longsleep/golang-backports PPA
RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository ppa:longsleep/golang-backports && apt-get update

# Install Go from the PPA
RUN apt-get install -y golang-go
###############################################################################

###############################################################################
Expand Down
5 changes: 3 additions & 2 deletions builder/imports/golang.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import os
from pathlib import Path
from distutils.version import LooseVersion

from builder.core.fetch import fetch_and_extract, mirror_package
from builder.core.project import Import
Expand Down Expand Up @@ -47,7 +46,9 @@ def install(self, env):
if result.returncode == 0:
# check the version, we need version >=1.18
version_str = result.output.split(" ")[2][2:]
if LooseVersion(version_str) > LooseVersion("1.18.0"):
version_numbers = list(map(int, version_str.split('.')))
compare_version_numbers = list(map(int, "1.18.0".split('.')))
if version_numbers >= compare_version_numbers:
return

if target not in URLs:
Expand Down

0 comments on commit 10e3e39

Please sign in to comment.