Commit 538b5987 authored by Ivan Yossi's avatar Ivan Yossi 👌
Browse files

Partially revert 32d09e73

We only revert sip and pyqt, python update is good t have as it adds more
stability on arm builds. The issues that need to be resolved before
updating sip and pyqt:

- On arm pyqt causes
t.qpa.openglcontext: Could not create NSOpenGLContext with shared context, falling back to unshared context.
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable
- pyqt-builder fails on detecting sip as dependency on setuptools build
(We fixed this by removing deps on pyqt-builder package)
- Also for some reason sip env fails on krita build phase breaking the
nighties.
parent d4807d19
SET(PREFIX_ext_pyqt "${EXTPREFIX}" )
if(UNIX)
if (APPLE)
SET(PYTHON_EXECUTABLE_PATH ${PREFIX_ext_pyqt}/bin/python3)
if(NOT EXISTS ${PYTHON_EXECUTABLE_PATH})
message("WARNING: using system python3!")
SET(PYTHON_EXECUTABLE_PATH python3)
endif()
list(APPEND _PYQT_conf
--confirm-license
--qmake ${PREFIX_ext_pyqt}/bin/qmake
--sip ${PREFIX_ext_pyqt}/bin/sip
--sip-incdir ${PREFIX_ext_pyqt}/include
--sipdir ${PREFIX_ext_pyqt}/share/sip
)
ExternalProject_Add( ext_pyqt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://files.kde.org/krita/build/dependencies/PyQt5_gpl-5.13.1.tar.gz
URL_MD5 c77af2f4e230b0053fd22bc2ece2e6c0
CONFIGURE_COMMAND ${PYTHON_EXECUTABLE_PATH} <SOURCE_DIR>/configure.py ${_PYQT_conf}
BUILD_COMMAND make
# force single-threaded installation to avoid
# race conditions in post-install .py script
INSTALL_COMMAND make -j1 install
BUILD_IN_SOURCE 1
UPDATE_COMMAND ""
)
elseif(UNIX)
SET(PYTHON_EXECUTABLE_PATH ${PREFIX_ext_pyqt}/bin/python3)
if(NOT EXISTS ${PYTHON_EXECUTABLE_PATH})
message("WARNING: using system python3!")
......@@ -26,15 +58,6 @@ if(UNIX)
UPDATE_COMMAND ""
)
if (APPLE)
ExternalProject_Add_Step( ext_pyqtbuilder rename_egg
WORKING_DIRECTORY <SOURCE_DIR>
COMMENT "Removing pyqt_builder egg dependencies requirements"
COMMAND ${CMAKE_COMMAND} -E remove <SOURCE_DIR>/PyQt_builder.egg-info/requires.txt
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/macOS-remove-install_requires.patch
DEPENDEES patch
)
endif()
ExternalProject_Add( ext_pyqt5
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
......
......@@ -17,6 +17,7 @@ if (UNIX)
COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_python}/bin/python3 ${PREFIX_ext_python}/bin/python
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/sitecustomize.py ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/lib/python${PYTHON_VERSION}/
COMMAND ${CMAKE_COMMAND} -E create_symlink ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/lib/python${PYTHON_VERSION} ${PREFIX_ext_python}/lib/python${PYTHON_VERSION}
COMMAND ${CMAKE_COMMAND} -E create_symlink ./lib/python${PYTHON_VERSION}/site-packages ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/site-packages
# CMake FindPythonLib can't find framework libraries, lack of maintainer for Python
COMMAND find ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/lib -type l -d 1
| grep -o "[^/]*$"
......
SET(PREFIX_ext_sip "${EXTPREFIX}" )
if (UNIX)
if(APPLE)
if(NOT PYTHONINTERP_FOUND)
SET(PYTHON_EXECUTABLE ${PREFIX_ext_sip}/bin/python3)
if(NOT EXISTS "${PYTHON_EXECUTABLE}")
message("WARNING: using system python3!")
SET(PYTHON_EXECUTABLE python3)
endif()
endif()
ExternalProject_Add( ext_sip
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://files.kde.org/krita/build/dependencies/sip-4.19.19.tar.gz
URL_MD5 98111479309dc472410f26080d6d4a88
CMAKE_ARGS -DPYTHON_INCLUDE_DIR=${PREFIX_ext_sip}/lib/Python.framework/Headers
CONFIGURE_COMMAND ${PYTHON_EXECUTABLE} <SOURCE_DIR>/configure.py --deployment-target=10.11
-b ${PREFIX_ext_sip}/bin -d ${PREFIX_ext_sip}/lib/Python.framework/Versions/Current/site-packages/
-e ${PREFIX_ext_sip}/include --sipdir ${PREFIX_ext_sip}/share/sip --target-py-version 3.8 --sip-module PyQt5.sip
BUILD_COMMAND make
# force single-threaded installation to avoid
# race conditions in post-install .py script
INSTALL_COMMAND make -j1 install
# COMMAND ${CMAKE_COMMAND} -E create_symlink ./PyQt5/sip.so ${PREFIX_ext_sip}/lib/Python.framework/Versions/Current/site-packages/sip.so
# COMMAND ${CMAKE_COMMAND} -E create_symlink ./PyQt5/sip.pyi ${PREFIX_ext_sip}/lib/Python.framework/Versions/Current/site-packages/sip.pyi
BUILD_IN_SOURCE 1
UPDATE_COMMAND ""
)
elseif(UNIX)
set(PYTHON_EXECUTABLE_PATH ${PREFIX_ext_sip}/bin/python3)
if(NOT EXISTS ${PYTHON_EXECUTABLE_PATH})
message("WARNING: using system python3!")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment