From 4f1505a2510c61b7a08308d8936b053a21a542a3 Mon Sep 17 00:00:00 2001 From: Christoph Schueler Date: Fri, 4 Oct 2024 11:31:21 +0300 Subject: [PATCH] Try to fix github workflow #4 --- build_ext.py | 4 ++-- install_antlr.py | 50 ------------------------------------------------ 2 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 install_antlr.py diff --git a/build_ext.py b/build_ext.py index cb75c3b..9d0f43c 100644 --- a/build_ext.py +++ b/build_ext.py @@ -9,7 +9,7 @@ import sysconfig from pathlib import Path from tempfile import TemporaryDirectory -from typing import Optional, Tuple +from typing import List, Optional, Tuple TOP_DIR = Path(__file__).parent @@ -94,7 +94,7 @@ def sort_by_version(version: str) -> Tuple[int]: return int(h), int(m), int(s) -def fetch_tags(repo: str) -> list[str]: +def fetch_tags(repo: str) -> List[str]: res = subprocess.run(["git", "ls-remote", "--tags", repo], shell=False, capture_output=True, text=True) # nosec if res.returncode == 0: return [] diff --git a/install_antlr.py b/install_antlr.py deleted file mode 100644 index 04dfe32..0000000 --- a/install_antlr.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -import platform as pf -from os import environ -from subprocess import call -from subprocess import check_call - - -VERSION = "4.11.1" -ANTLR = "https://www.antlr.org/download/antlr-{}-complete.jar".format(VERSION) - - -print("ENVIRON:", environ) -os = pf.system().lower() -uname = pf.uname() -print("UNAME:", uname) - - -def main(): - if os == "windows": - call(["curl", "-O", "-C", "-", "-L", ANTLR]) - call(["dir"]) - else: - call(["curl", "-O", "-C", "-", "-L", ANTLR]) - if os == "linux": - call( - """cat << 'EOF' > adoptopenjdk.repo -[AdoptOpenJDK] -name=AdoptOpenJDK -baseutl=http://adoptopenjdk.jfrog.io/artifactory/rpm/centos/$releasever/$basearch -enabled=1 -gpgcheck=1 -gpgkey=http://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public -EOF""", - shell=True, - ) - # call(["sudo", "yum", "install", "java-1.8.0-openjdk"]) - # call(["cp", "adoptopenjdk.repo", "/etc/yum.repos.d/"]) - # call(["yum", "install", "adoptopenjdk"]) - # call(["yum", "install", "openjdk-16-jre"]) - # call(["yum", "update"]) - # call(["yum", "search", "openjdk"]) - # call(["yum", "install", "java-12-openjdk"]) - elif os == "darwin": - pass - call(["ls", "-l", "-A"]) - - -if __name__ == "__main__": - main()