mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
d9cfbff954
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
--- setup.py.orig 2024-02-09 21:14:15.359607270 +0100
|
|
+++ setup.py 2024-02-09 21:15:55.391267720 +0100
|
|
@@ -15,6 +15,11 @@
|
|
import distutils.command.clean as distutils_clean
|
|
import setuptools
|
|
|
|
+try:
|
|
+ from setuptools.modified import newer
|
|
+except ImportError:
|
|
+ from distutils.dep_util import newer
|
|
+
|
|
# Add the src folder to the path
|
|
sys.path.insert(0, os.path.realpath("src"))
|
|
|
|
@@ -39,7 +44,7 @@
|
|
def compile_rc(self, qrc_file):
|
|
import PyQt5
|
|
py_file = os.path.splitext(qrc_file)[0] + "_rc.py"
|
|
- if not distutils.dep_util.newer(qrc_file, py_file):
|
|
+ if not newer(qrc_file, py_file):
|
|
return
|
|
origpath = os.getenv("PATH")
|
|
path = origpath.split(os.pathsep)
|
|
@@ -54,7 +59,7 @@
|
|
def compile_ui(self, ui_file):
|
|
from PyQt5 import uic
|
|
py_file = os.path.splitext(ui_file)[0] + "_ui.py"
|
|
- if not distutils.dep_util.newer(ui_file, py_file):
|
|
+ if not newer(ui_file, py_file):
|
|
return
|
|
with open(py_file, "w") as a_file:
|
|
uic.compileUi(ui_file, a_file, from_imports=True)
|