Skip to content

Commit

Permalink
Merge pull request #140 from vowstar/fix-sip
Browse files Browse the repository at this point in the history
setup.py: fix pyqt_sip_dir on modern Linux distributions
  • Loading branch information
Simsys authored Oct 23, 2022
2 parents 9f4706a + bdb22d3 commit f40a4f2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

cfg = sipconfig.Configuration()
pyqt_sip_dir = cfg.default_sip_dir
for p in (os.path.join(pyqt_sip_dir, "PyQt5"),
os.path.join(pyqt_sip_dir, "PyQt5-3"),
os.path.join(pyqt_sip_dir, "PyQt4"),
pyqt_sip_dir,
os.path.join(cfg.default_mod_dir, "PyQt5", "bindings")):
if os.path.exists(os.path.join(p, "QtCore", "QtCoremod.sip")):
pyqt_sip_dir = p
break

try:
import PyQt5
Expand Down

0 comments on commit f40a4f2

Please sign in to comment.