File tree 2 files changed +26
-25
lines changed
2 files changed +26
-25
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import sys
3
+ import util
3
4
4
5
from setuptools import setup , find_packages
5
6
@@ -46,27 +47,6 @@ def get_readme():
46
47
return readme
47
48
48
49
49
- def createqtconf ():
50
- """Create a qt.conf file next to the current executable"""
51
-
52
- template = """[Paths]
53
- Prefix = {path}
54
- Binaries = {path}
55
- """
56
-
57
- import PyQt5
58
-
59
- exedir = os .path .dirname (sys .executable )
60
- qtpath = os .path .join (exedir , "qt.conf" )
61
- binpath = os .path .dirname (PyQt5 .__file__ ).replace ("\\ " , "/" )
62
-
63
- try :
64
- with open (qtpath , "w" ) as f :
65
- f .write (template .format (path = binpath ))
66
- except :
67
- pass
68
-
69
-
70
50
classifiers = [
71
51
'Development Status :: 4 - Beta' ,
72
52
'Intended Audience :: Developers' ,
@@ -93,7 +73,4 @@ def createqtconf():
93
73
classifiers = classifiers ,
94
74
package_data = get_package_data (),
95
75
data_files = get_data_files ()
96
- )
97
-
98
- # Attempt to automatically create a qt.conf
99
- createqtconf ()
76
+ )
Original file line number Diff line number Diff line change
1
+ import os
2
+ import sys
3
+
4
+
5
+ def createqtconf ():
6
+ """Create a qt.conf file next to the current executable"""
7
+
8
+ template = """[Paths]
9
+ Prefix = {path}
10
+ Binaries = {path}
11
+ """
12
+
13
+ import PyQt5
14
+
15
+ exedir = os .path .dirname (sys .executable )
16
+ qtpath = os .path .join (exedir , "qt.conf" )
17
+ pyqt5path = os .path .abspath (PyQt5 .__file__ )
18
+ binpath = os .path .dirname (pyqt5path ).replace ("\\ " , "/" )
19
+
20
+ try :
21
+ with open (qtpath , "w" ) as f :
22
+ f .write (template .format (path = binpath ))
23
+ except :
24
+ pass
You can’t perform that action at this time.
0 commit comments