Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_scripts/wheel_files.py1
-rw-r--r--sources/pyside-tools/pyside_tool.py27
-rw-r--r--sources/pyside-tools/requirements-android.txt1
-rw-r--r--sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py2
-rw-r--r--sources/shiboken6/cmake/ShibokenHelpers.cmake25
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py1
6 files changed, 28 insertions, 29 deletions
diff --git a/build_scripts/wheel_files.py b/build_scripts/wheel_files.py
index 4cbf12aa2..e84cf8cd2 100644
--- a/build_scripts/wheel_files.py
+++ b/build_scripts/wheel_files.py
@@ -1037,6 +1037,7 @@ def module_QtVirtualKeyboard() -> ModuleData:
data = ModuleData("VirtualKeyboard")
data.plugins.append("virtualkeyboard")
data.qtlib.append("libQt6VirtualKeyboardSettings")
+ data.qtlib.append("libQt6VirtualKeyboardQml")
return data
diff --git a/sources/pyside-tools/pyside_tool.py b/sources/pyside-tools/pyside_tool.py
index 887f2bdda..5c009859d 100644
--- a/sources/pyside-tools/pyside_tool.py
+++ b/sources/pyside-tools/pyside_tool.py
@@ -198,6 +198,18 @@ def metaobjectdump():
pyside_script_wrapper("metaobjectdump.py")
+def _check_requirements(requirements_file):
+ """Check if all required packages are installed."""
+ missing_packages = []
+ with open(requirements_file, 'r', encoding='UTF-8') as file:
+ for line in file:
+ # versions
+ package = line.strip().split('==')[0]
+ if not importlib.util.find_spec(package):
+ missing_packages.append(line.strip())
+ return missing_packages
+
+
def project():
pyside_script_wrapper("project.py")
@@ -220,12 +232,15 @@ def android_deploy():
file=sys.stderr)
else:
android_requirements_file = Path(__file__).parent / "requirements-android.txt"
- with open(android_requirements_file, 'r', encoding='UTF-8') as file:
- while line := file.readline():
- dependent_package = line.rstrip()
- if not bool(importlib.util.find_spec(dependent_package)):
- command = [sys.executable, "-m", "pip", "install", dependent_package]
- subprocess.run(command)
+ if android_requirements_file.exists():
+ missing_packages = _check_requirements(android_requirements_file)
+ if missing_packages:
+ print("The following packages are required but not installed:")
+ for package in missing_packages:
+ print(f" - {package}")
+ print("Please install them using:")
+ print(f" pip install -r {android_requirements_file}")
+ sys.exit(1)
pyside_script_wrapper("android_deploy.py")
diff --git a/sources/pyside-tools/requirements-android.txt b/sources/pyside-tools/requirements-android.txt
index 9ed5d8427..1a247f6c1 100644
--- a/sources/pyside-tools/requirements-android.txt
+++ b/sources/pyside-tools/requirements-android.txt
@@ -1,3 +1,4 @@
jinja2
pkginfo
tqdm
+packaging==24.1
diff --git a/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py b/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py
index 120c54af3..14330726a 100644
--- a/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py
+++ b/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py
@@ -36,7 +36,7 @@ class DeployTestBase(unittest.TestCase):
android_requirements_file = pyside_tools / "requirements-android.txt"
with open(android_requirements_file, 'r', encoding='UTF-8') as file:
while line := file.readline():
- dependent_package = line.rstrip()
+ dependent_package = line.rstrip().split('==')[0]
if not bool(importlib.util.find_spec(dependent_package)):
command = [sys.executable, "-m", "pip", "install", dependent_package]
subprocess.run(command)
diff --git a/sources/shiboken6/cmake/ShibokenHelpers.cmake b/sources/shiboken6/cmake/ShibokenHelpers.cmake
index bcaf31e89..c6414b2ca 100644
--- a/sources/shiboken6/cmake/ShibokenHelpers.cmake
+++ b/sources/shiboken6/cmake/ShibokenHelpers.cmake
@@ -869,28 +869,9 @@ endfunction()
# Get path to libclang.dll/libclang.so depending on the platform
macro(find_libclang)
- if(CMAKE_HOST_WIN32)
- set(libclang_directory_suffix "bin")
- set(libclang_suffix ".dll")
- else()
- set(libclang_directory_suffix "lib")
- if(CMAKE_HOST_APPLE)
- set(libclang_suffix ".dylib")
- else()
- set(libclang_suffix ".so")
- endif()
- endif()
-
- set(libclang_lib_dir "")
- if(DEFINED ENV{LLVM_INSTALL_DIR})
- set(libclang_lib_dir "$ENV{LLVM_INSTALL_DIR}/${libclang_directory_suffix}")
- elseif(DEFINED ENV{CLANG_INSTALL_DIR})
- set(libclang_lib_dir "$ENV{CLANG_INSTALL_DIR}/${libclang_directory_suffix}")
- else()
- message(WARNING
- "Couldn't find libclang${libclang_suffix} "
- "You will likely need to add it manually to PATH to ensure the build succeeds.")
- endif()
+ find_package(Clang CONFIG REQUIRED)
+ get_target_property(libclang_location libclang LOCATION)
+ get_filename_component(libclang_lib_dir "${libclang_location}" DIRECTORY)
endmacro()
# Allow setting a shiboken debug level from the the build system or from the environment
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index 2bb3c9a87..84cb15feb 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -509,6 +509,7 @@ def init_PySide6_QtCore():
"PySide6.QtCore.QUrl.ComponentFormattingOptions":
PySide6.QtCore.QUrl.ComponentFormattingOption, # mismatch option/enum, why???
"PyUnicode": typing.Text,
+ "QByteArray": typing.Union[PySide6.QtCore.QByteArray, bytes, bytearray, memoryview],
"QByteArrayView": PySide6.QtCore.QByteArray,
"Q_NULLPTR": None,
"QCalendar.Unspecified": PySide6.QtCore.QCalendar.Unspecified,