File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
22import sys
3+ import util
34
45from setuptools import setup , find_packages
56
@@ -46,27 +47,6 @@ def get_readme():
4647 return readme
4748
4849
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-
7050classifiers = [
7151 'Development Status :: 4 - Beta' ,
7252 'Intended Audience :: Developers' ,
@@ -93,7 +73,4 @@ def createqtconf():
9373 classifiers = classifiers ,
9474 package_data = get_package_data (),
9575 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