add wrappers for pyrcc5, pylupdate5
This commit is contained in:
parent
de1e844bc0
commit
3124e3a806
8
pylupdate5.sh
Normal file
8
pylupdate5.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
@PYTHON3@ -c "import PyQt5.pylupdate_main" &> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
exec @PYTHON3@ -m PyQt5.pylupdate_main ${1+"$@"}
|
||||
else
|
||||
exec @PYTHON2@ -m PyQt5.pylupdate_main ${1+"$@"}
|
||||
|
||||
fi
|
7
pyrcc5.sh
Normal file
7
pyrcc5.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
@PYTHON3@ -c "import PyQt5.PyQt5.pyrcc_main" &> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
exec @PYTHON3@ -m PyQt5.pyrcc_main ${1+"$@"}
|
||||
else
|
||||
exec @PYTHON2@ -m PyQt5.pyrcc_main ${1+"$@"}
|
||||
fi
|
@ -32,7 +32,9 @@ Source0: http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-%{version}/PyQ
|
||||
%endif
|
||||
Source1: macros.pyqt5
|
||||
# wrapper, see https://bugzilla.redhat.com/show_bug.cgi?id=1193107#c9
|
||||
Source2: pyuic5.sh
|
||||
Source2: pylupdate5.sh
|
||||
Source3: pyrcc5.sh
|
||||
Source4: pyuic5.sh
|
||||
|
||||
## upstream patches
|
||||
|
||||
@ -265,14 +267,16 @@ sed -i \
|
||||
%{buildroot}%{rpm_macros_dir}/macros.pyqt5
|
||||
|
||||
%if 0%{?with_python3}
|
||||
# install pyuic5 wrapper to handle both/either python2/python3
|
||||
rm -fv %{buildroot}%{_bindir}/pyuic5
|
||||
install -p -m755 -D %{SOURCE2} \
|
||||
%{buildroot}%{_bindir}/pyuic5
|
||||
# install wrappers to handle both/either python2/python3
|
||||
# TODO: consider alternatives? -- rex
|
||||
rm -fv %{buildroot}%{_bindir}/{pyrcc5,pylupdate5,pyuic5}
|
||||
install -p -m755 -D %{SOURCE2} %{buildroot}%{_bindir}/pylupdate5
|
||||
install -p -m755 -D %{SOURCE3} %{buildroot}%{_bindir}/pyrcc5
|
||||
install -p -m755 -D %{SOURCE4} %{buildroot}%{_bindir}/pyuic5
|
||||
sed -i \
|
||||
-e "s|@PYTHON3@|%{__python3}|g" \
|
||||
-e "s|@PYTHON2@|%{__python2}|g" \
|
||||
%{buildroot}%{_bindir}/pyuic5
|
||||
%{buildroot}%{_bindir}/{pyrcc5,pylupdate5,pyuic5}
|
||||
%endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user