Skip to content

Commit

Permalink
The qt5 and qt6 recipes used dodge logic to check if Qt itself is in …
Browse files Browse the repository at this point in the history
…the python package

The new logic at least avoids a duplicate copy of Qt with
the PyPI copy of PyQt5 and PyQt6.
  • Loading branch information
ronaldoussoren committed Apr 3, 2022
1 parent 7cd6518 commit 172439b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Release history
py2app 0.28
-----------

* The qt5 and qt6 recipes used dodge logic to detect
if the Qt library itself is inside the python package,
resulting in duplicate copies of Qt.

* #406: Fix incompatibility with python 2.7

py2app 0.24 accidently broke compatibility with Python 2.7, and
Expand Down
2 changes: 1 addition & 1 deletion py2app/recipes/qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def check(cmd, mf):


qtdir = QLibraryInfo.location(QLibraryInfo.LibrariesPath)
if qtdir != os.path.dirname(PyQt5.__file__):
if os.path.relpath(qtdir, os.path.dirname(PyQt5.__file__)).startswith("../"):
# Qt5's prefix is not the PyQt5 package, which means
# the "packages" directive below won't include everything
# needed, and in particular won't include the plugins
Expand Down
2 changes: 1 addition & 1 deletion py2app/recipes/qt6.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def check(cmd, mf):
return None

qtdir = QLibraryInfo.path(QLibraryInfo.LibraryPath.LibrariesPath)
if qtdir != os.path.dirname(PyQt6.__file__):
if os.path.relpath(qtdir, os.path.dirname(PyQt6.__file__)).startswith("../"):
# Qt6's prefix is not the PyQt6 package, which means
# the "packages" directive below won't include everything
# needed, and in particular won't include the plugins
Expand Down

0 comments on commit 172439b

Please sign in to comment.