summarylogtreecommitdiffstats
path: root/pycompile.patch
diff options
context:
space:
mode:
authorGuilhem Saurel2020-07-06 09:31:04 +0200
committerGuilhem Saurel2020-07-06 09:31:04 +0200
commitd415a3683f8c9d36d16ab2335632462437535123 (patch)
tree1c0ee866e2aa0998d634b06477f115d148cd2807 /pycompile.patch
parenta4af97614590c7fd3cae62ece0050c5403c79635 (diff)
downloadaur-d415a3683f8c9d36d16ab2335632462437535123.tar.gz
disable tests & fix DESTDIR
Diffstat (limited to 'pycompile.patch')
-rw-r--r--pycompile.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/pycompile.patch b/pycompile.patch
new file mode 100644
index 00000000000..464ff91db98
--- /dev/null
+++ b/pycompile.patch
@@ -0,0 +1,13 @@
+diff --git a/config/cmake_files/medMacros.cmake b/config/cmake_files/medMacros.cmake
+index 7c82cec..f6ca6d0 100644
+--- a/config/cmake_files/medMacros.cmake
++++ b/config/cmake_files/medMacros.cmake
+@@ -457,7 +457,7 @@ MACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
+ GET_FILENAME_COMPONENT(inputname ${input} NAME)
+ INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC})
+ INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
+- INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
++ INSTALL(CODE "SET(CMD \"import py_compile, os ; py_compile.compile(os.environ.get('DESTDIR', '') + '/' + '${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}', dfile='${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
+ ENDFOREACH(input ${PYFILE2COMPINST})