mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-28 20:27:37 +00:00
Fix py3 compatibility
sip.setapi is no longer needed with PyQt5 and py3. Thus it was removed.
This commit is contained in:
11
setup.py
11
setup.py
@@ -8,10 +8,7 @@ import os
|
||||
import re
|
||||
import sys
|
||||
import subprocess
|
||||
import sip
|
||||
|
||||
sip.setapi("QString", 2)
|
||||
sip.setapi("QVariant", 2)
|
||||
from io import StringIO
|
||||
|
||||
from picard import __version__
|
||||
|
||||
@@ -328,7 +325,7 @@ class picard_build_ui(Command):
|
||||
|
||||
def compile_ui(uifile, pyfile):
|
||||
log.info("compiling %s -> %s", uifile, pyfile)
|
||||
tmp = compat.StringIO()
|
||||
tmp = StringIO()
|
||||
uic.compileUi(uifile, tmp)
|
||||
source = tmp.getvalue()
|
||||
rc = re.compile(r'\n\n#.*?(?=\n\n)', re.MULTILINE|re.DOTALL)
|
||||
@@ -453,7 +450,7 @@ except ImportError:
|
||||
|
||||
def _get_option_name(obj):
|
||||
"""Returns the name of the option for specified Command object"""
|
||||
for name, klass in obj.distribution.cmdclass.iteritems():
|
||||
for name, klass in obj.distribution.cmdclass.items():
|
||||
if obj.__class__ == klass:
|
||||
return name
|
||||
raise Exception("No such command class")
|
||||
@@ -685,7 +682,7 @@ def contrib_plugin_files():
|
||||
plugin_files[file_root].append(os.path.join(root, file))
|
||||
else:
|
||||
plugin_files[file_root] = [os.path.join(root, file)]
|
||||
data_files = [(x, sorted(y)) for x, y in plugin_files.iteritems()]
|
||||
data_files = [(x, sorted(y)) for x, y in plugin_files.items()]
|
||||
return sorted(data_files, key=lambda x: x[0])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user