[Eric] [PyQt] ANN: eric 18.05 released

Hans-Peter Jansen hpj at urpla.net
Tue May 1 20:42:38 BST 2018


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,
here's my suggested fix:

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 + os.sep, '')
+        
+    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


Cheers,
Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric6-fix-bindir.patch
Type: text/x-patch
Size: 1802 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20180501/fd2fa6c0/attachment.bin>


More information about the Eric mailing list