Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install missing software on ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
Expand All @@ -38,12 +33,12 @@ jobs:
- name: Install missing software on macos
if: contains(matrix.os, 'macos')
run: |
brew install coreutils z3 qt@5
brew install coreutils python3 z3 qt@5

- name: Install missing Python packages
run: |
python -m pip install pip --upgrade
python -m pip install pytest
python3 -m pip install pip --upgrade
python3 -m pip install pytest

- name: CMake build on ubuntu (with GUI / system tinyxml2)
if: contains(matrix.os, 'ubuntu')
Expand Down Expand Up @@ -119,11 +114,11 @@ jobs:
- name: Run test/cli
run: |
cd test/cli
pytest test-*.py
python3 -m pytest test-*.py
cd ../../..
ln -s cppcheck 'cpp check'
cd 'cpp check/test/cli'
pytest test-*.py
python3 -m pytest test-*.py

# fails on macos since some includes (e.g. sys/epoll.h) are not available
- name: Run cfg tests
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ ifeq ($(SRCDIR),build)
endif
ifeq ($(MATCHCOMPILER),yes)
# Find available Python interpreter
PYTHON_INTERPRETER := $(shell which python)
PYTHON_INTERPRETER := $(shell which python3)
ifndef PYTHON_INTERPRETER
PYTHON_INTERPRETER := $(shell which python3)
PYTHON_INTERPRETER := $(shell which python)
endif
ifndef PYTHON_INTERPRETER
$(error Did not find a Python interpreter)
Expand Down
13 changes: 8 additions & 5 deletions cmake/findDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)

if (NOT USE_MATCHCOMPILER_OPT MATCHES "Off")
find_package(PythonInterp)
if (NOT ${PYTHONINTERP_FOUND})
message(WARNING "No python interpreter found. Therefore, the match compiler is switched off.")
set(USE_MATCHCOMPILER_OPT "Off")
find_package(PythonInterp 3 QUIET)
if (NOT PYTHONINTERP_FOUND)
set(PYTHONINTERP_FOUND "")
find_package(PythonInterp 2.7 QUIET)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to drop support for python 2.7 in the match compiler. you can do it in a follow up PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright.

But I still think we should drop Python 2.7 as a whole and not just in parts. We still have holes in the CI matrix with that and I'd rather remove stuff from it than add more.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope we can still find some CI-runner that has python 2.7. I also hope that it doesn't cost much to keep some user-scripts compatible with python 2.7 for a little while.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's no problem at all. Ubuntu 18.04 and 20.04 both still have it. And we also get it via the GitHub Action plugin and use it in the scriptcheck job.

There's also plenty of docker images available.

if (NOT PYTHONINTERP_FOUND)
message(WARNING "No python interpreter found. Therefore, the match compiler is switched off.")
set(USE_MATCHCOMPILER_OPT "Off")
endif()
endif()
endif()

Expand All @@ -48,7 +52,6 @@ if (NOT USE_BUNDLED_TINYXML2)
if (NOT tinyxml2_LIBRARY)
message(FATAL_ERROR "tinyxml2 has not been found")
else()
message(STATUS "tinyxml2_LIBRARY: ${tinyxml2_LIBRARY}")
set(tinyxml2_FOUND 1)
endif()
endif()
Expand Down
8 changes: 8 additions & 0 deletions cmake/printInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,20 @@ if (HAVE_RULES)
message( STATUS "PCRE_LIBRARY = ${PCRE_LIBRARY}" )
endif()
message( STATUS )
if (NOT USE_MATCHCOMPILER_OPT MATCHES "Off")
message( STATUS "PYTHON_VERSION_STRING = ${PYTHON_VERSION_STRING}" )
message( STATUS "PYTHON_EXECUTABLE = ${PYTHON_EXECUTABLE}" )
endif()
message( STATUS )
message( STATUS "USE_Z3 = ${USE_Z3}" )
if (USE_Z3)
message( STATUS "Z3_LIBRARIES = ${Z3_LIBRARIES}" )
message( STATUS "Z3_CXX_INCLUDE_DIRS = ${Z3_CXX_INCLUDE_DIRS}" )
endif()
message( STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}" )
if (NOT USE_BUNDLED_TINYXML2)
message(STATUS "tinyxml2_LIBRARY = ${tinyxml2_LIBRARY}")
endif()
message( STATUS )

if(${ANALYZE_ADDRESS})
Expand Down
4 changes: 2 additions & 2 deletions tools/dmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ int main(int argc, char **argv)
<< "endif\n";
fout << "ifeq ($(MATCHCOMPILER),yes)\n"
<< " # Find available Python interpreter\n"
<< " PYTHON_INTERPRETER := $(shell which python)\n"
<< " PYTHON_INTERPRETER := $(shell which python3)\n"
<< " ifndef PYTHON_INTERPRETER\n"
<< " PYTHON_INTERPRETER := $(shell which python3)\n"
<< " PYTHON_INTERPRETER := $(shell which python)\n"
<< " endif\n"
<< " ifndef PYTHON_INTERPRETER\n"
<< " $(error Did not find a Python interpreter)\n"
Expand Down