-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Linux distribution by removing unwanted stuff from PyQt5 (#135) +…
… fontconfig/freetype * Deleted other workflows * Removed unwanted stuff from PyQt5 * Remove libfontconfig and libfreetype also * Revert "Deleted other workflows" This reverts commit 3ff9939.
- Loading branch information
1 parent
2f6eebc
commit f5214ec
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import shutil | ||
import sys | ||
|
||
from PyQt5.QtCore import QLibraryInfo | ||
|
||
|
||
def main(): | ||
# This is mainly to avoid bundling libraries that can cause issues, | ||
# such as GTK (and dependencies) being included if GTK platform | ||
# integration is included. | ||
print("Fixing PyQt5 installation before running pyinstaller") | ||
print("(Removing unnecessary stuff") | ||
|
||
# librariesPath = QLibraryInfo.location(QLibraryInfo.LibrariesPath) | ||
# print(librariesPath) | ||
|
||
def removePath(path): | ||
print(path) | ||
if os.path.exists(path): | ||
print("Removing", path) | ||
shutil.rmtree(path) | ||
|
||
qmlPath = QLibraryInfo.location(QLibraryInfo.Qml2ImportsPath) | ||
removePath(qmlPath) | ||
|
||
translationsPath = QLibraryInfo.location(QLibraryInfo.TranslationsPath) | ||
removePath(translationsPath) | ||
|
||
pluginsPath = QLibraryInfo.location(QLibraryInfo.PluginsPath) | ||
print(pluginsPath) | ||
|
||
def removePlugins(type): | ||
pluginTypePath = os.path.join(pluginsPath, type) | ||
print(pluginTypePath) | ||
if os.path.exists(pluginTypePath): | ||
print("Removing", pluginTypePath) | ||
shutil.rmtree(pluginTypePath) | ||
|
||
if sys.platform == "linux": | ||
removePlugins("platformthemes") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |