Remove workarounds that are not needed with the current versions of sip-build

This commit is contained in:
Kovid Goyal 2020-12-03 22:03:05 +05:30
parent b9077e7579
commit 04ad7bc901
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -487,7 +487,6 @@ project-factory = "pyqtbuild:PyQtProject"
[tool.sip.project]
sip-files-dir = "."
sip-module = "PyQt5.sip"
[tool.sip.bindings.pictureflow]
headers = {ext.headers}
@ -524,15 +523,6 @@ sip-file = "{os.path.basename(sipf)}"
cwd = os.getcwd()
try:
os.chdir(os.path.join(src_dir, 'build'))
if ext.needs_exceptions:
# bug in sip-build
for q in walk('.'):
if os.path.basename(q) in ('Makefile',):
with open(q, 'r+') as f:
raw = f.read()
raw = raw.replace('-fno-exceptions', '-fexceptions')
f.seek(0), f.truncate()
f.write(raw)
self.check_call([self.env.make] + ([] if iswindows else ['-j%d'%(os.cpu_count() or 1)]))
e = 'pyd' if iswindows else 'so'
m = glob.glob(f'{ext.name}/{ext.name}.*{e}')