We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bdc6c2 commit efba7deCopy full SHA for efba7de
2 files changed
PyQt5/__init__.py
@@ -34,4 +34,26 @@
34
35
qt_version_info = (5, 4, 0)
36
qt_version = "%s.%s.%s" % qt_version_info
37
-__qt_version__ = qt_version
+__qt_version__ = qt_version
38
+
39
40
+def __createqtconf():
41
+ """Create a qt.conf file next to the current executable"""
42
43
+ template = """[Paths]
44
+Prefix = {path}
45
+Binaries = {path}
46
+"""
47
48
+ exedir = os.path.dirname(sys.executable)
49
+ qtpath = os.path.join(exedir, "qt.conf")
50
+ binpath = os.path.dirname(__file__).replace("\\", "/")
51
52
+ if not os.path.exists(qtpath):
53
+ try:
54
+ with open(qtpath, "w") as f:
55
+ f.write(template.format(path=binpath))
56
+ except Exception as e:
57
+ sys.stderr.write("Could not write qt.conf: %s" % e)
58
59
+__createqtconf()
PyQt5/pyrcc5.exe
55.5 KB
0 commit comments