Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building with Python 3.6 #2347

Open
mingodad opened this issue Nov 2, 2022 · 0 comments
Open

Building with Python 3.6 #2347

mingodad opened this issue Nov 2, 2022 · 0 comments

Comments

@mingodad
Copy link
Contributor

mingodad commented Nov 2, 2022

Trying to build this project on Ubuntu 18.04 that has Python 3.6 I did this small change and got it to build:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6173963f..362fccc66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -175,7 +175,7 @@ if (SOUFFLE_SWIG_PYTHON OR SOUFFLE_SWIG_JAVA)
     find_package(SWIG REQUIRED)
 
     if (SOUFFLE_SWIG_PYTHON)
-        find_package(Python3 3.7 REQUIRED)
+        find_package(Python3 3.6 REQUIRED)
     endif()
 
     if (SOUFFLE_SWIG_JAVA)
@@ -364,7 +364,7 @@ endif(SOUFFLE_CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
 add_subdirectory(src)
 
 if (SOUFFLE_ENABLE_TESTING)
-    find_package(Python3 3.7 REQUIRED)
+    find_package(Python3 3.6 REQUIRED)
     add_subdirectory(src/tests)
     add_subdirectory(tests)
 endif()
diff --git a/src/souffle-compile.template.py b/src/souffle-compile.template.py
index 48ee3046e..d63e384e6 100644
--- a/src/souffle-compile.template.py
+++ b/src/souffle-compile.template.py
@@ -41,7 +41,8 @@ import tempfile
 def launch_command(cmd, descr, verbose=False):
     if verbose:
         sys.stdout.write(cmd + "\n")
-    status = subprocess.run(cmd, capture_output=True, text=True, shell=True)
+    #status = subprocess.run(cmd, capture_output=True, text=True, shell=True)
+    status = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
     if status.returncode != 0:
         sys.stdout.write(status.stdout)
         sys.stderr.write(status.stderr)

It seems that the need for Python 3.7 is easy to be lowered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants