[PyQt] ANN: eric 18.05 released
Hans-Peter Jansen
hpj at urpla.net
Tue May 1 21:33:29 BST 2018
On Dienstag, 1. Mai 2018 21:42:38 Hans-Peter Jansen wrote:
> Hi Detlev,
>
> On Dienstag, 1. Mai 2018 09:38:51 Rex Dieter wrote:
> > Detlev Offenbach wrote:
> > > I just uploaded eric 18.05. It fixes some bugs and adds these new
> > > features.
> >
> > One buglet, wrt to packaging, I use
> >
> > install.py \
> >
> > -i %{buildroot}/ \
> > -b %{_bindir}
> >
> > when building an eric rpm in fedora, but the installed
> > /usr/share/applications/eric6.desktop
> > ends up including the %{buildroot} macro contents in Exec=, like:
> >
> > Exec=/builddir/build/BUILDROOT/eric-18.05-1.fc29.noarch/usr/bin/eric6
>
> Because I really want executables defined with a path in the desktop files,
That way, you really get, what you asked for, and not some stray installation
from the home dir, for example...
> here's my suggested fix:
and here's a fixed and _tested_ version (hrmpf):
Index: b/install.py
===================================================================
--- a/install.py
+++ b/install.py
@@ -302,7 +302,7 @@ def copyDesktopFile(src, dst, marker):
@param dst destination file name (string)
@param marker marker to be used (string)
"""
- global cfg
+ global cfg, distDir
if sys.version_info[0] == 2:
f = codecs.open(src, "r", "utf-8")
@@ -310,8 +310,12 @@ def copyDesktopFile(src, dst, marker):
f = open(src, "r", encoding="utf-8")
text = f.read()
f.close()
-
- text = text.replace("@BINDIR@", cfg['bindir'])
+
+ bindir = cfg['bindir']
+ if distDir:
+ bindir = bindir.replace(distDir, '')
+
+ text = text.replace("@BINDIR@", bindir)
text = text.replace("@MARKER@", marker)
if marker:
t_marker = " ({0})".format(PythonTextMarkers[marker])
Index: b/eric/eric6_browser.desktop
===================================================================
--- a/eric/eric6_browser.desktop
+++ b/eric/eric6_browser.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Version=1.0
Type=Application
-Exec=eric6_browser at MARKER@
+Exec=@BINDIR@/eric6_browser at MARKER@
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-mimearchive;
Icon=ericWeb at MARKER@
Terminal=false
Index: b/eric/eric6_webbrowser.desktop
===================================================================
--- a/eric/eric6_webbrowser.desktop
+++ b/eric/eric6_webbrowser.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Version=1.0
Type=Application
-Exec=eric6_webbrowser at MARKER@
+Exec=@BINDIR@/eric6_webbrowser at MARKER@
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
Icon=ericWeb at MARKER@
Terminal=false
You can find my openSUSE builds here, as usual:
https://build.opensuse.org/project/monitor/home:frispete:PyQt5
Cheers,
Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric6-fix-bindir.patch
Type: text/x-patch
Size: 1793 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180501/4d6b933d/attachment.bin>
More information about the PyQt
mailing list