70 lines
2.2 KiB
Diff
70 lines
2.2 KiB
Diff
|
--- libffado-2.4.7/admin/pyuic.py.orig 2023-07-13 15:54:22.683633139 +0900
|
||
|
+++ libffado-2.4.7/admin/pyuic.py 2023-07-13 15:59:32.832327567 +0900
|
||
|
@@ -21,7 +21,7 @@
|
||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
#
|
||
|
|
||
|
-import imp
|
||
|
+import importlib.util
|
||
|
|
||
|
def pyuic_action( target, source, env ):
|
||
|
env.Execute( "pyuic " + str( source[0] ) + " > " + str( target[0] ) )
|
||
|
@@ -34,8 +34,9 @@
|
||
|
context.Message( "Checking for pyuic (by checking for the python module pyqtconfig) " )
|
||
|
ret = True
|
||
|
try:
|
||
|
- imp.find_module( "pyqtconfig" )
|
||
|
- except ImportError:
|
||
|
+ spec = importlib.util.find_spec( "pyqtconfig" )
|
||
|
+ module = importlib.util.module_from_spec(spec)
|
||
|
+ except AttributeError:
|
||
|
ret = False
|
||
|
context.Result( ret )
|
||
|
return ret
|
||
|
--- libffado-2.4.7/admin/pyuic4.py.orig 2023-07-13 15:54:22.683633139 +0900
|
||
|
+++ libffado-2.4.7/admin/pyuic4.py 2023-07-13 15:58:59.688360220 +0900
|
||
|
@@ -21,7 +21,7 @@
|
||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
#
|
||
|
|
||
|
-import imp
|
||
|
+import importlib.util
|
||
|
|
||
|
def pyuic4_action( target, source, env ):
|
||
|
env.Execute( "pyuic4 " + str( source[0] ) + " > " + str( target[0] ) )
|
||
|
@@ -34,8 +34,9 @@
|
||
|
context.Message( "Checking for pyuic4 (by checking for the python module pyqtconfig) " )
|
||
|
ret = True
|
||
|
try:
|
||
|
- imp.find_module( "pyqtconfig" )
|
||
|
- except ImportError:
|
||
|
+ spec = importlib.util.find_spec( "pyqtconfig" )
|
||
|
+ module = importlib.util.module_from_spec(spec)
|
||
|
+ except AttributeError:
|
||
|
ret = False
|
||
|
context.Result( ret )
|
||
|
return ret
|
||
|
--- libffado-2.4.7/admin/pyuic5.py.orig 2023-07-13 15:54:22.683633139 +0900
|
||
|
+++ libffado-2.4.7/admin/pyuic5.py 2023-07-13 15:59:27.754332570 +0900
|
||
|
@@ -22,7 +22,7 @@
|
||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
#
|
||
|
|
||
|
-import imp
|
||
|
+import importlib.util
|
||
|
|
||
|
def pyuic5_action( target, source, env ):
|
||
|
env.Execute( "pyuic5 " + str( source[0] ) + " > " + str( target[0] ) )
|
||
|
@@ -35,8 +35,9 @@
|
||
|
context.Message( "Checking for pyuic5 (by checking for the python module pyqtconfig) " )
|
||
|
ret = True
|
||
|
try:
|
||
|
- imp.find_module( "pyqtconfig" )
|
||
|
- except ImportError:
|
||
|
+ spec = importlib.util.find_spec( "pyqtconfig" )
|
||
|
+ module = importlib.util.module_from_spec(spec)
|
||
|
+ except AttributeError:
|
||
|
ret = False
|
||
|
context.Result( ret )
|
||
|
return ret
|