[Pkg-opencl-devel] Bug#950032: Use python3 in build script
Daniel Moran
dijumx at gmail.com
Mon Feb 3 21:01:47 GMT 2020
The issue seems to stem from the fact the python3 package(s) do not
provide /usr/bin/python.
I've attached a patch which should fix builds which use either the
CMakeList.txt file, or the ./configure.py script.
This is only an initial change, as I haven't been able to try it out,
but should force the use of python3 rather than relying on
/usr/bin/python to point to the correct place.
Regards,
Dan
-------------- next part --------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 440eab076509..9ce9b51f2042 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,7 +158,7 @@ if( ENABLE_RUNTIME_SUBNORMAL )
DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )
endif()
-find_program( PYTHON python )
+find_program( PYTHON python3 )
file( TO_CMAKE_PATH ${CMAKE_SOURCE_DIR}/generic/lib/gen_convert.py script_loc )
add_custom_command(
OUTPUT convert.cl
diff --git a/configure.py b/configure.py
index dab5dc94dfab..cd2a48235436 100755
--- a/configure.py
+++ b/configure.py
@@ -151,7 +151,7 @@ b.build(prepare_builtins, "LLVM_TOOL_LINK",
b.rule("PREPARE_BUILTINS", "%s -o $out $in" % prepare_builtins,
'PREPARE-BUILTINS $out')
-b.rule("PYTHON_GEN", "python < $in > $out", "PYTHON_GEN $out")
+b.rule("PYTHON_GEN", "python3 < $in > $out", "PYTHON_GEN $out")
b.build('generic/lib/convert.cl', "PYTHON_GEN", ['generic/lib/gen_convert.py'])
manifest_deps = set([sys.argv[0], os.path.join(srcdir, 'build', 'metabuild.py'),
More information about the Pkg-opencl-devel
mailing list