PyQt-builder 1.16.2__tar.gz → 1.16.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/PKG-INFO +1 -1
  2. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/PyQt_builder.egg-info/PKG-INFO +1 -1
  3. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/_version.py +2 -2
  4. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/abstract_package.py +2 -2
  5. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt6.py +19 -2
  6. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt6_webengine.py +3 -1
  7. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/qt_metadata.py +91 -31
  8. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/qt_wheel.py +37 -11
  9. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/qt_wheel_distinfo/METADATA +2 -2
  10. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/qt_wheel_main.py +15 -1
  11. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/LICENSE +0 -0
  12. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/MANIFEST.in +0 -0
  13. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/PyQt_builder.egg-info/SOURCES.txt +0 -0
  14. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/PyQt_builder.egg-info/dependency_links.txt +0 -0
  15. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/PyQt_builder.egg-info/entry_points.txt +0 -0
  16. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/PyQt_builder.egg-info/requires.txt +0 -0
  17. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/PyQt_builder.egg-info/top_level.txt +0 -0
  18. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/README.md +0 -0
  19. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyproject.toml +0 -0
  20. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/__init__.py +0 -0
  21. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bindings.py +0 -0
  22. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/builder.py +0 -0
  23. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/__init__.py +0 -0
  24. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/bundle.py +0 -0
  25. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/bundle_main.py +0 -0
  26. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-32/concrt140.dll +0 -0
  27. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-32/msvcp140.dll +0 -0
  28. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-32/msvcp140_1.dll +0 -0
  29. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-32/msvcp140_2.dll +0 -0
  30. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-32/vcruntime140.dll +0 -0
  31. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-64/concrt140.dll +0 -0
  32. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-64/msvcp140.dll +0 -0
  33. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-64/msvcp140_1.dll +0 -0
  34. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-64/msvcp140_2.dll +0 -0
  35. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-64/vcruntime140.dll +0 -0
  36. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/msvc-64/vcruntime140_1.dll +0 -0
  37. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/openssl-32/libcrypto-1_1.dll +0 -0
  38. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/openssl-32/libssl-1_1.dll +0 -0
  39. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/openssl-64/libcrypto-1_1-x64.dll +0 -0
  40. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/dlls/openssl-64/libssl-1_1-x64.dll +0 -0
  41. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/__init__.py +0 -0
  42. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt.py +0 -0
  43. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt3d.py +0 -0
  44. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt5.py +0 -0
  45. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt6_3d.py +0 -0
  46. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt6_charts.py +0 -0
  47. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt6_datavisualization.py +0 -0
  48. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqt6_networkauth.py +0 -0
  49. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqtchart.py +0 -0
  50. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqtdatavisualization.py +0 -0
  51. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqtnetworkauth.py +0 -0
  52. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqtpurchasing.py +0 -0
  53. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/packages/pyqtwebengine.py +0 -0
  54. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/qt_wheel_distinfo/LICENSE +0 -0
  55. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/qt_wheel_distinfo/WHEEL +0 -0
  56. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/verbose.py +0 -0
  57. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/bundle/wheel.py +0 -0
  58. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/installable.py +0 -0
  59. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/project.py +0 -0
  60. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/pyqtbuild/version.py +0 -0
  61. {pyqt_builder-1.16.2 → pyqt_builder-1.16.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyQt-builder
3
- Version: 1.16.2
3
+ Version: 1.16.4
4
4
  Summary: The PyQt build system
5
5
  Author-email: Phil Thompson <phil@riverbankcomputing.com>
6
6
  License: Copyright 2024 Phil Thompson <phil@riverbankcomputing.com>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyQt-builder
3
- Version: 1.16.2
3
+ Version: 1.16.4
4
4
  Summary: The PyQt build system
5
5
  Author-email: Phil Thompson <phil@riverbankcomputing.com>
6
6
  License: Copyright 2024 Phil Thompson <phil@riverbankcomputing.com>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.16.2'
16
- __version_tuple__ = version_tuple = (1, 16, 2)
15
+ __version__ = version = '1.16.4'
16
+ __version_tuple__ = version_tuple = (1, 16, 4)
@@ -58,7 +58,7 @@ class AbstractPackage(ABC):
58
58
  # This default implementation does nothing.
59
59
 
60
60
  def bundle_qt(self, target_qt_dir, platform_tag, exclude, ignore_missing,
61
- bindings=True):
61
+ bindings=True, subwheel=None):
62
62
  """ Bundle the relevant parts of the Qt installation. Returns True if
63
63
  the LGPL applies to all bundled parts.
64
64
  """
@@ -113,7 +113,7 @@ class AbstractPackage(ABC):
113
113
  lgpl = lgpl and metadata.lgpl
114
114
 
115
115
  metadata.bundle(name, target_qt_dir, self._qt_dir, platform_tag,
116
- self.qt_version, ignore_missing)
116
+ self.qt_version, ignore_missing, subwheel)
117
117
 
118
118
  return lgpl
119
119
 
@@ -65,10 +65,27 @@ _QT_METADATA = {
65
65
  #'QtLocation':
66
66
  # VersionedMetadata(qml=True),
67
67
 
68
- 'QtMultimedia':
69
- VersionedMetadata(version=(6, 2, 0),
68
+ 'QtMultimedia': (
69
+ VersionedMetadata(version=(6, 7, 1),
70
70
  lib_deps={'': ('QtMultimediaQuick', )},
71
+ other_lib_deps={
72
+ 'macos': ('libavcodec.60.dylib', 'libavformat.60.dylib',
73
+ 'libavutil.58.dylib', 'libswresample.4.dylib',
74
+ 'libswscale.7.dylib'),
75
+ 'win': ('avcodec-60.dll', 'avformat-60.dll',
76
+ 'avutil-58.dll', 'swresample-4.dll',
77
+ 'swscale-7.dll')},
71
78
  qml=True),
79
+ VersionedMetadata(version=(6, 7, 0),
80
+ lib_deps={'': ('QtMultimediaQuick', )},
81
+ other_lib_deps={
82
+ 'win': ('avcodec-60.dll', 'avformat-60.dll',
83
+ 'avutil-58.dll', 'swresample-4.dll',
84
+ 'swscale-7.dll')},
85
+ qml=True),
86
+ VersionedMetadata(version=(6, 2, 0),
87
+ lib_deps={'': ('QtMultimediaQuick', )},
88
+ qml=True)),
72
89
 
73
90
  'QtMultimediaWidgets':
74
91
  VersionedMetadata(version=(6, 2, 0)),
@@ -23,7 +23,9 @@ _QT_METADATA = {
23
23
  "Enable QtWebEngineProcess to find it's resources.\n"), )},
24
24
  others={
25
25
  'linux': ('resources', 'translations/qtwebengine_locales'),
26
- 'win': ('resources', 'translations\\qtwebengine_locales')}),
26
+ 'win': ('resources', 'translations\\qtwebengine_locales')},
27
+ subwheel_files={
28
+ '': (('qtlib', 'QtWebEngineCore'), )}),
27
29
 
28
30
  'QtWebEngineQuick':
29
31
  VersionedMetadata(version=(6, 2, 0),
@@ -21,7 +21,8 @@ class VersionedMetadata:
21
21
  def __init__(self, *, version=None, name=None, lib_deps=None,
22
22
  other_lib_deps=None, exes=None, files=None, others=None, dll=True,
23
23
  qml=False, qml_names=None, translations=None,
24
- excluded_plugins=None, lgpl=True, legacy=False):
24
+ excluded_plugins=None, lgpl=True, legacy=False,
25
+ subwheel_files=None):
25
26
  """ Initialise the versioned bindings. """
26
27
 
27
28
  self._version = version
@@ -36,15 +37,16 @@ class VersionedMetadata:
36
37
  self._qml_names = qml_names
37
38
  self._translations = () if translations is None else translations
38
39
  self._excluded_plugins = excluded_plugins
40
+ self._subwheel_files = {} if subwheel_files is None else subwheel_files
39
41
 
40
42
  self.lgpl = lgpl
41
43
  self.legacy = legacy
42
44
 
43
45
  def bundle(self, name, target_qt_dir, qt_dir, platform_tag, qt_version,
44
- ignore_missing):
46
+ ignore_missing, subwheel):
45
47
  """ Bundle part of Qt as defined by the meta-data. """
46
48
 
47
- verbose("Bundling {0}".format(name))
49
+ verbose(f"Bundling {name}")
48
50
 
49
51
  if self._name is None:
50
52
  self._name = name
@@ -65,11 +67,55 @@ class VersionedMetadata:
65
67
  if macos_thin_arch == 'arm64' and AbstractPackage.missing_executable('codesign'):
66
68
  raise UserException(
67
69
  "'codesign' from Xcode must be installed on your system")
70
+ # Bundle any sub-wheel files.
71
+ if subwheel is True:
72
+ for metadata_arch, subwheel_files in self._subwheel_files.items():
73
+ if self._is_platform(metadata_arch, platform_tag):
74
+ # Bundle each file in the sub-wheel according to its type
75
+ # (either 'data', 'exe', 'lib' or 'qtlib').
76
+ for file_type, file_name in subwheel_files:
77
+ if file_type == 'data':
78
+ self._bundle_file(file_name, target_qt_dir, qt_dir,
79
+ platform_tag, macos_thin_arch,
80
+ ignore_missing, might_be_code=False)
81
+
82
+ elif file_type == 'exe':
83
+ self._bundle_exe(file_name, target_qt_dir, qt_dir,
84
+ qt_version, platform_tag, macos_thin_arch,
85
+ ignore_missing)
86
+
87
+ elif file_type == 'lib':
88
+ self._bundle_library(file_name, target_qt_dir,
89
+ qt_dir, platform_tag, macos_thin_arch,
90
+ ignore_missing)
91
+
92
+ elif file_type == 'qtlib':
93
+ self._bundle_qt_library(file_name, target_qt_dir,
94
+ qt_dir, qt_version, platform_tag,
95
+ macos_thin_arch, ignore_missing,
96
+ bundle_resources=False)
97
+
98
+ # There is nothing else to do.
99
+ return
100
+
101
+ skip_files = []
102
+
103
+ # Build the list of files to skip as they will be in the sub-wheel.
104
+ if subwheel is False:
105
+ for metadata_arch, subwheel_files in self._subwheel_files.items():
106
+ if self._is_platform(metadata_arch, platform_tag):
107
+ for file_type, file_name in subwheel_files:
108
+ if file_type == 'qtlib':
109
+ file_name = self._impl_from_library(file_name,
110
+ platform_tag, qt_version)
111
+
112
+ skip_files.append(file_name)
68
113
 
69
114
  # Bundle the Qt library that has been wrapped (if there is one).
70
115
  if self._dll:
71
116
  self._bundle_qt_library(self._name, target_qt_dir, qt_dir,
72
- qt_version, platform_tag, macos_thin_arch, ignore_missing)
117
+ qt_version, platform_tag, macos_thin_arch, ignore_missing,
118
+ skip_files=skip_files)
73
119
 
74
120
  # Bundle any other dependent Qt libraries.
75
121
  for metadata_arch, libs in self._lib_deps.items():
@@ -77,7 +123,7 @@ class VersionedMetadata:
77
123
  for lib in libs:
78
124
  self._bundle_qt_library(lib, target_qt_dir, qt_dir,
79
125
  qt_version, platform_tag, macos_thin_arch,
80
- ignore_missing)
126
+ ignore_missing, skip_files=skip_files)
81
127
 
82
128
  # Bundle any other libraries.
83
129
  lib_contents = None
@@ -97,26 +143,19 @@ class VersionedMetadata:
97
143
  if fnmatch.fnmatch(qt_lib, lib):
98
144
  self._bundle_library(qt_lib, target_qt_dir,
99
145
  qt_dir, platform_tag, macos_thin_arch,
100
- ignore_missing)
146
+ ignore_missing, skip_files=skip_files)
101
147
  else:
102
148
  self._bundle_library(lib, target_qt_dir, qt_dir,
103
- platform_tag, macos_thin_arch, ignore_missing)
149
+ platform_tag, macos_thin_arch, ignore_missing,
150
+ skip_files=skip_files)
104
151
 
105
152
  # Bundle any executables.
106
153
  for metadata_arch, exes in self._exes.items():
107
154
  if self._is_platform(metadata_arch, platform_tag):
108
155
  for exe in exes:
109
- bundled_exe = self._bundle_file(exe, target_qt_dir, qt_dir,
110
- platform_tag, macos_thin_arch, ignore_missing)
111
-
112
- if bundled_exe is not None:
113
- if self._is_platform('linux', platform_tag):
114
- self._fix_linux_executable(bundled_exe, qt_version)
115
- elif self._is_platform('macos', platform_tag):
116
- self._fix_macos_executable(bundled_exe, qt_version,
117
- macos_thin_arch)
118
- elif self._is_platform('win', platform_tag):
119
- self._fix_win_executable(bundled_exe)
156
+ self._bundle_exe(exe, target_qt_dir, qt_dir, qt_version,
157
+ platform_tag, macos_thin_arch, ignore_missing,
158
+ skip_files=skip_files)
120
159
 
121
160
  # Bundle any QML files.
122
161
  if self._qml:
@@ -127,7 +166,7 @@ class VersionedMetadata:
127
166
  for qml_subdir in qml_names:
128
167
  self._bundle_nondebug(os.path.join('qml', qml_subdir),
129
168
  target_qt_dir, qt_dir, platform_tag, macos_thin_arch,
130
- ignore_missing)
169
+ ignore_missing, skip_files=skip_files)
131
170
 
132
171
  # Bundle any plugins. We haven't done the analysis of which plugins
133
172
  # belong to which package so we assume that only the QtCore package
@@ -135,7 +174,7 @@ class VersionedMetadata:
135
174
  if self._excluded_plugins is not None:
136
175
  self._bundle_nondebug('plugins', target_qt_dir, qt_dir,
137
176
  platform_tag, macos_thin_arch, ignore_missing,
138
- exclude=self._excluded_plugins)
177
+ skip_files=skip_files, exclude=self._excluded_plugins)
139
178
 
140
179
  # Bundle any translations:
141
180
  if self._translations:
@@ -148,7 +187,7 @@ class VersionedMetadata:
148
187
  if qm.startswith(prefix):
149
188
  self._bundle_file(qm, target_tr_dir, tr_dir,
150
189
  platform_tag, macos_thin_arch,
151
- ignore_missing,
190
+ ignore_missing, skip_files=skip_files,
152
191
  might_be_code=False)
153
192
 
154
193
  # Bundle any dynamically created files.
@@ -167,7 +206,7 @@ class VersionedMetadata:
167
206
  for oth in others:
168
207
  self._bundle_file(oth, target_qt_dir, qt_dir,
169
208
  platform_tag, macos_thin_arch, ignore_missing,
170
- might_be_code=False)
209
+ skip_files=skip_files, might_be_code=False)
171
210
 
172
211
  def is_applicable(self, qt_version):
173
212
  """ Returns True if this meta-data is applicable for a particular Qt
@@ -178,7 +217,7 @@ class VersionedMetadata:
178
217
 
179
218
  @classmethod
180
219
  def _bundle_nondebug(cls, src_dir, target_qt_dir, qt_dir, platform_tag,
181
- macos_thin_arch, ignore_missing, exclude=None):
220
+ macos_thin_arch, ignore_missing, skip_files=None, exclude=None):
182
221
  """ Bundle the non-debug contents of a directory. """
183
222
 
184
223
  if exclude is None:
@@ -202,15 +241,34 @@ class VersionedMetadata:
202
241
  cls._bundle_file(
203
242
  os.path.relpath(os.path.join(dirpath, name), qt_dir),
204
243
  target_qt_dir, qt_dir, platform_tag, macos_thin_arch,
205
- ignore_missing)
244
+ ignore_missing, skip_files=skip_files)
245
+
246
+ @classmethod
247
+ def _bundle_exe(cls, name, target_qt_dir, qt_dir, qt_version, platform_tag,
248
+ macos_thin_arch, ignore_missing, skip_files=None):
249
+ """ Bundle an executable. """
250
+
251
+ exe = cls._bundle_file(name, target_qt_dir, qt_dir, platform_tag,
252
+ macos_thin_arch, ignore_missing, skip_files=skip_files)
253
+
254
+ if exe is not None:
255
+ if cls._is_platform('linux', platform_tag):
256
+ cls._fix_linux_executable(exe, qt_version)
257
+ elif cls._is_platform('macos', platform_tag):
258
+ cls._fix_macos_executable(exe, qt_version, macos_thin_arch)
259
+ elif cls._is_platform('win', platform_tag):
260
+ cls._fix_win_executable(exe)
206
261
 
207
262
  @staticmethod
208
263
  def _bundle_file(name, target_dir, src_dir, platform_tag, macos_thin_arch,
209
- ignore_missing, ignore=None, might_be_code=True):
264
+ ignore_missing, skip_files=None, ignore=None, might_be_code=True):
210
265
  """ Bundle a file (or directory) and return the name of the installed
211
266
  file (or directory) or None if it was missing.
212
267
  """
213
268
 
269
+ if skip_files is not None and name in skip_files:
270
+ return None
271
+
214
272
  src = os.path.join(src_dir, name)
215
273
  dst = os.path.join(target_dir, name)
216
274
 
@@ -243,30 +301,32 @@ class VersionedMetadata:
243
301
 
244
302
  @classmethod
245
303
  def _bundle_library(cls, name, target_qt_dir, qt_dir, platform_tag,
246
- macos_thin_arch, ignore_missing, ignore=None):
304
+ macos_thin_arch, ignore_missing, skip_files=None, ignore=None):
247
305
  """ Bundle a library. """
248
306
 
249
307
  cls._bundle_file(name,
250
308
  os.path.join(target_qt_dir,
251
309
  cls._get_qt_library_subdir(platform_tag)),
252
310
  cls._get_qt_library_dir(qt_dir, platform_tag), platform_tag,
253
- macos_thin_arch, ignore_missing, ignore=ignore)
311
+ macos_thin_arch, ignore_missing, skip_files=skip_files,
312
+ ignore=ignore)
254
313
 
255
314
  @classmethod
256
315
  def _bundle_qt_library(cls, name, target_qt_dir, qt_dir, qt_version,
257
- platform_tag, macos_thin_arch, ignore_missing):
316
+ platform_tag, macos_thin_arch, ignore_missing, skip_files=None,
317
+ bundle_resources=True):
258
318
  """ Bundle a Qt library. """
259
319
 
260
320
  cls._bundle_library(
261
321
  cls._impl_from_library(name, platform_tag, qt_version),
262
322
  target_qt_dir, qt_dir, platform_tag, macos_thin_arch,
263
- ignore_missing)
323
+ ignore_missing, skip_files=skip_files)
264
324
 
265
- if cls._is_platform('macos', platform_tag):
325
+ if bundle_resources and cls._is_platform('macos', platform_tag):
266
326
  # Copy the Resources directory without the unnecessary .prl files.
267
327
  cls._bundle_library('{}.framework/Resources'.format(name),
268
328
  target_qt_dir, qt_dir, platform_tag, macos_thin_arch,
269
- ignore_missing,
329
+ ignore_missing, skip_files=skip_files,
270
330
  ignore=lambda d, c: [f for f in c if f.endswith('.prl')])
271
331
 
272
332
  @staticmethod
@@ -14,7 +14,7 @@ from .wheel import create_wheel, write_record_file
14
14
 
15
15
 
16
16
  def qt_wheel(package, qt_dir, build_tag, suffix, msvc_runtime, openssl,
17
- openssl_dir, exclude, arch):
17
+ openssl_dir, exclude, arch, subwheel):
18
18
  """ Create a wheel containing the subset of a Qt installation required for
19
19
  a particular PyQt package.
20
20
  """
@@ -24,14 +24,12 @@ def qt_wheel(package, qt_dir, build_tag, suffix, msvc_runtime, openssl,
24
24
 
25
25
  # Normalise the name of the package.
26
26
  package_name = package.replace('-', '_')
27
- package_title = package_name.replace('_', '-')
28
27
 
29
28
  # Get the package object.
30
29
  package_factory = packages.__dict__.get(package_name)
31
30
 
32
31
  if package_factory is None:
33
- raise UserException(
34
- "'{0}' is not a supported package".format(package_title))
32
+ raise UserException(f"'{package}' is not a supported package")
35
33
 
36
34
  package = package_factory(qt_dir)
37
35
 
@@ -41,9 +39,12 @@ def qt_wheel(package, qt_dir, build_tag, suffix, msvc_runtime, openssl,
41
39
 
42
40
  # Construct the tag.
43
41
  qt_arch = os.path.basename(qt_dir)
44
- if qt_arch == 'gcc_64':
45
- platform_tag = 'manylinux{}_x86_64'.format(
46
- '_2_28' if package.qt_version[0] == 6 else '2014')
42
+
43
+ if qt_arch in ('gcc_64', 'gcc_arm64'):
44
+ manylinux = '_2_28' if package.qt_version[0] == 6 else '2014'
45
+ wheel_arch = 'x86_64' if qt_arch == 'gcc_64' else 'aarch64'
46
+ platform_tag = f'manylinux{manylinux}_{wheel_arch}'
47
+
47
48
  elif qt_arch in ('macos', 'clang_64'):
48
49
  if package.qt_version < (5, 15, 10) or (6, 0, 0) <= package.qt_version < (6, 2, 0):
49
50
  if arch is not None:
@@ -64,8 +65,15 @@ def qt_wheel(package, qt_dir, build_tag, suffix, msvc_runtime, openssl,
64
65
  sdk_version = '10_14'
65
66
 
66
67
  platform_tag = 'macosx_{}_{}'.format(sdk_version, subarch)
68
+
67
69
  elif qt_arch.startswith('msvc'):
68
- platform_tag = 'win_amd64' if qt_arch.endswith('_64') else 'win32'
70
+ if qt_arch.endswith('_64'):
71
+ platform_tag = 'win_amd64'
72
+ elif qt_arch.endswith('_arm64'):
73
+ platform_tag = 'win_arm64'
74
+ else:
75
+ platform_tag = 'win32'
76
+
69
77
  else:
70
78
  raise UserException(
71
79
  "Qt architecture '{0}' is unsupported".format(qt_arch))
@@ -73,8 +81,24 @@ def qt_wheel(package, qt_dir, build_tag, suffix, msvc_runtime, openssl,
73
81
  tag_parts = ['py3', 'none', platform_tag]
74
82
  tag = '-'.join(tag_parts)
75
83
 
84
+ package_title = package_name.replace('_', '-')
85
+ qt_version_suffix = '-Qt' + version_str[0]
86
+
87
+ # Determine sub-wheel dependent values'
88
+ subwheel_full_name = f'{package_title}Subwheel{qt_version_suffix}'
89
+
90
+ if subwheel is True:
91
+ package_full_name = subwheel_full_name
92
+ package_requires = ''
93
+ elif subwheel is False:
94
+ package_full_name = package_title + qt_version_suffix
95
+ package_requires = f'Requires-Dist: {subwheel_full_name} (=={version_str})\n'
96
+ else:
97
+ package_full_name = package_title + qt_version_suffix
98
+ package_requires = ''
99
+
76
100
  # Construct the name of the wheel.
77
- name_parts = [package_name + '_Qt' + version_str[0]]
101
+ name_parts = [package_full_name.replace('-', '_')]
78
102
  name_parts.append(version_str)
79
103
 
80
104
  distinfo_dir = '-'.join(name_parts) + '.dist-info'
@@ -97,7 +121,7 @@ def qt_wheel(package, qt_dir, build_tag, suffix, msvc_runtime, openssl,
97
121
  # Bundle the relevant parts of the Qt installation.
98
122
  target_qt_dir = package.get_target_qt_dir()
99
123
  lgpl = package.bundle_qt(target_qt_dir, platform_tag, exclude,
100
- ignore_missing=True, bindings=False)
124
+ ignore_missing=True, bindings=False, subwheel=subwheel)
101
125
 
102
126
  if platform_tag in ('win32', 'win_amd64'):
103
127
  # Bundle the MSVC runtime if required.
@@ -121,7 +145,9 @@ def qt_wheel(package, qt_dir, build_tag, suffix, msvc_runtime, openssl,
121
145
  metadata = s.read()
122
146
 
123
147
  metadata = metadata.replace('@RB_PACKAGE@', package_title)
124
- metadata = metadata.replace('@RB_MAJOR_VERSION@', version_str[0])
148
+ metadata = metadata.replace('@RB_PACKAGE_NAME@', package_full_name)
149
+ metadata = metadata.replace('@RB_PACKAGE_REQUIRES@',
150
+ package_requires)
125
151
  metadata = metadata.replace('@RB_VERSION@', version_str)
126
152
  metadata = metadata.replace('@RB_LICENSE@',
127
153
  "LGPL v3" if lgpl else "GPL v3")
@@ -1,5 +1,5 @@
1
1
  Metadata-Version: 2.1
2
- Name: @RB_PACKAGE@-Qt@RB_MAJOR_VERSION@
2
+ Name: @RB_PACKAGE_NAME@
3
3
  Version: @RB_VERSION@
4
4
  Summary: The subset of a Qt installation needed by @RB_PACKAGE@.
5
5
  Home-page: https://www.riverbankcomputing.com/software/pyqt/
@@ -9,7 +9,7 @@ License: @RB_LICENSE@
9
9
  Platform: Linux
10
10
  Platform: macOS
11
11
  Platform: Windows
12
-
12
+ @RB_PACKAGE_REQUIRES@
13
13
  This package contains the subset of a Qt installation that is required by
14
14
  @RB_PACKAGE@. It would normally be installed automatically by pip when
15
15
  you install @RB_PACKAGE@.
@@ -58,6 +58,12 @@ def main():
58
58
  parser.add_argument(dest='packages', nargs=1, help="the PyQt package",
59
59
  metavar="PACKAGE")
60
60
 
61
+ parser.add_argument('--subwheel', choices=('generate', 'exclude'),
62
+ default=None,
63
+ help="generate the package's sub-wheel or exclude the sub-wheel "
64
+ "contents from the main wheel [default: generate a full "
65
+ "wheel]")
66
+
61
67
  args = parser.parse_args()
62
68
 
63
69
  try:
@@ -68,10 +74,18 @@ def main():
68
74
  except AttributeError:
69
75
  arch = None
70
76
 
77
+ subwheel = args.subwheel
78
+
79
+ if subwheel == 'generate':
80
+ subwheel = True
81
+ elif subwheel == 'exclude':
82
+ subwheel = False
83
+
71
84
  qt_wheel(package=args.packages[0], qt_dir=args.qt_dir,
72
85
  build_tag=args.build_tag, suffix=args.suffix,
73
86
  msvc_runtime=args.msvc_runtime, openssl=args.openssl,
74
- openssl_dir=args.openssl_dir, exclude=args.exclude, arch=arch)
87
+ openssl_dir=args.openssl_dir, exclude=args.exclude, arch=arch,
88
+ subwheel=subwheel)
75
89
  except Exception as e:
76
90
  handle_exception(e)
77
91
 
File without changes
File without changes
File without changes
File without changes