[printrun] Updated desktop files to no longer want .py files in bindir Changed the approach of previous commit
Miro Hrončok
churchyard at fedoraproject.org
Sun Aug 11 21:46:55 UTC 2013
commit 9bf7b1835eaa0715e8a8b405c928bab2e8152a31
Author: Miro Hrončok <miro at hroncok.cz>
Date: Sun Aug 11 17:46:06 2013 -0400
Updated desktop files to no longer want .py files in bindir
Changed the approach of previous commit a bit
plater.desktop | 2 +-
printrun.spec | 28 ++++++++++++----------------
pronsole.desktop | 2 +-
pronterface.desktop | 2 +-
4 files changed, 15 insertions(+), 19 deletions(-)
---
diff --git a/plater.desktop b/plater.desktop
index 5b3251c..146a708 100644
--- a/plater.desktop
+++ b/plater.desktop
@@ -2,7 +2,7 @@
[Desktop Entry]
Name=Plater
GenericName=Plate building tool
-Exec=plater.py
+Exec=plater
Icon=/usr/share/pixmaps/plater.ico
Terminal=false
Type=Application
diff --git a/printrun.spec b/printrun.spec
index 95a365d..15979c3 100644
--- a/printrun.spec
+++ b/printrun.spec
@@ -7,7 +7,7 @@
%global prontserve 0
Name: printrun
Version: 0.0
-Release: 30.%{snapshot}%{?dist}
+Release: 31.%{snapshot}%{?dist}
Summary: RepRap printer interface and tools
License: GPLv3+
Group: Applications/Engineering
@@ -124,22 +124,15 @@ cd ..
%{__python} setup.py install --skip-build --prefix %{buildroot}%{_prefix}
# Move the programs to python_sitelib because they are imported by other programs
+# Add symlinks to them into bindir
mkdir -p %{buildroot}%{python_sitelib}
-for i in %{buildroot}%{_bindir}/*.py ; do
- name=$(basename $i)
- progname=$(basename $i .py)
- if [ x"$name" = x"prontserve.py" -o x"$name" = x"pronterface.py" ] ; then
- # These two scripts aren't imported so just rename
- pushd %{buildroot}%{_bindir}
- mv %{buildroot}%{_bindir}/$name $progname
- popd
- continue
- fi
- # The rest need to go into sitelib so the other scripts can import them
- mv %{buildroot}%{_bindir}/$name %{buildroot}%{python_sitelib}
- pushd %{buildroot}%{_bindir}
- ln -sf %{python_sitelib}/$name $progname
- popd
+for SCRIPT in printcore pronsole plater; do
+ mv %{buildroot}%{_bindir}/${SCRIPT}.py %{buildroot}%{python_sitelib}
+ ln -sf %{python_sitelib}/${SCRIPT}.py %{buildroot}%{_bindir}/${SCRIPT}
+done
+# Rename those programs
+for SCRIPT in prontserve pronterface; do
+ mv %{buildroot}%{_bindir}/${SCRIPT}{.py,}
done
# desktop files
@@ -203,6 +196,9 @@ rm -f %{buildroot}%{_bindir}/prontserve
%doc README* COPYING
%changelog
+* Sun Aug 11 2013 Miro Hrončok <mhroncok at redhat.com> - 0.0-31.20130711gitb8f549b
+- No longer have .py named scripts in bindir
+
* Sat Aug 10 2013 Miro Hrončok <mhroncok at redhat.com> - 0.0-30.20130711gitb8f549b
- Fix bad patch
diff --git a/pronsole.desktop b/pronsole.desktop
index 4b3bc3e..7c82942 100644
--- a/pronsole.desktop
+++ b/pronsole.desktop
@@ -2,7 +2,7 @@
[Desktop Entry]
Name=Pronsole
GenericName=Printer console
-Exec=pronsole.py
+Exec=pronsole
Icon=/usr/share/pixmaps/pronsole.ico
Terminal=true
Type=Application
diff --git a/pronterface.desktop b/pronterface.desktop
index bc462b5..4fe719f 100644
--- a/pronterface.desktop
+++ b/pronterface.desktop
@@ -2,7 +2,7 @@
[Desktop Entry]
Name=Pronterface
GenericName=Printer Interface
-Exec=pronterface.py
+Exec=pronterface
Icon=/usr/share/pixmaps/P-face.ico
Terminal=false
Type=Application
More information about the scm-commits
mailing list