From 2747ba61761994aae1bfc781d60542c82271a296 Mon Sep 17 00:00:00 2001 From: Arnaud Caron Date: Wed, 6 Oct 2021 14:59:13 -0700 Subject: [PATCH 1/4] bugfix: explicitly convert antlrcpp::Any to std::string Signed-off-by: Arnaud Caron --- src/ParseFasm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ParseFasm.cpp b/src/ParseFasm.cpp index bccb7ca1..ae1b819a 100644 --- a/src/ParseFasm.cpp +++ b/src/ParseFasm.cpp @@ -210,7 +210,7 @@ class FasmParserBaseVisitor : public FasmParserVisitor { virtual Any visitFasmFile( FasmParser::FasmFileContext* context) override { for (auto& line : context->fasmLine()) { - std::string str = visit(line); + std::string str = visit(line).as(); if (!str.empty()) { out << str; if (hex_mode) From 43722db0c1a83ff24c0557f3849f6a5d2241077b Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Tue, 12 Oct 2021 17:36:46 -0700 Subject: [PATCH 2/4] Fix pip breaking `file:` support. Fixes #72. Signed-off-by: Tim 'mithro' Ansell --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 1a491d27..f48df8e8 100644 --- a/environment.yml +++ b/environment.yml @@ -5,4 +5,4 @@ dependencies: - python - swig - pip: - - -r file:requirements.txt + - -r requirements.txt From 6d99ca530bbaada52cf48652c3f5c6c6da20db5a Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Tue, 12 Oct 2021 18:30:18 -0700 Subject: [PATCH 3/4] Install pip+wheel with `--user`. It seems like Windows has issues with upgrading the pip/wheel installed via `actions/setup-pyython@v2`. Signed-off-by: Tim 'mithro' Ansell --- .github/workflows/check-install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-install.yml b/.github/workflows/check-install.yml index 8793a2b1..ff298c62 100644 --- a/.github/workflows/check-install.yml +++ b/.github/workflows/check-install.yml @@ -40,8 +40,8 @@ jobs: - name: Install pip+wheel run: | - pip install --upgrade wheel - pip install --upgrade pip + pip install --user --upgrade wheel + pip install --user --upgrade pip - name: Test installation shell: bash From 60cffae9334fb873b37c7fc74a41381d9d426680 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Tue, 12 Oct 2021 18:32:08 -0700 Subject: [PATCH 4/4] Try using `python -m pip` rather than calling pip directly. Using the `-m` option makes sure we are using the pip that is available inside the environment provided by the Python executable, even if `pip` in the path is setup to use a different Python (for example with a hard-coded `#!/usr/bin/python`). Signed-off-by: Tim 'mithro' Ansell --- .github/workflows/check-install.yml | 6 +++--- .github/workflows/presubmit.yml | 4 ++-- .github/workflows/publish-to-pypi.yml | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check-install.yml b/.github/workflows/check-install.yml index ff298c62..744ed272 100644 --- a/.github/workflows/check-install.yml +++ b/.github/workflows/check-install.yml @@ -40,13 +40,13 @@ jobs: - name: Install pip+wheel run: | - pip install --user --upgrade wheel - pip install --user --upgrade pip + python -m pip install --user --upgrade wheel + python -m pip install --user --upgrade pip - name: Test installation shell: bash run: | - pip install git+https://github.com/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}#egg=fasm + python -m pip install git+https://github.com/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}#egg=fasm - name: Run Smoke Test run: | diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index aca2f95f..96d29855 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -19,7 +19,7 @@ jobs: sudo apt update sudo apt install clang-format python -m pip install --upgrade pip - pip install -r requirements.txt + python -m pip install -r requirements.txt - name: Python style check run: | make format lint @@ -66,7 +66,7 @@ jobs: sudo apt update sudo apt install cmake default-jre-headless uuid-dev libantlr4-runtime-dev python -m pip install --upgrade pip - pip install -r requirements.txt + python -m pip install -r requirements.txt python update_version.py - name: Tox run: ANTLR4_RUNTIME_TYPE=${{ matrix.antlr_runtime_type }} tox -e ${{ matrix.TOXENV }} diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 375f6dc4..a7a9d644 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -31,8 +31,8 @@ jobs: - name: Install build dependencies run: | - pip install -U pip - pip install -r requirements.txt + python -m pip install -U pip + python -m pip install -r requirements.txt python update_version.py - name: Install package dependencies @@ -89,8 +89,8 @@ jobs: - name: Install build dependencies run: | - pip install -U pip - pip install twine auditwheel + python -m pip install -U pip + python -m pip install twine auditwheel python update_version.py - name: 🚧 Build distribution 📦 @@ -181,8 +181,8 @@ jobs: - name: Install build dependencies run: | - pip install -U pip - pip install -r requirements.txt + python -m pip install -U pip + python -m pip install -r requirements.txt python update_version.py - name: Install package dependencies