summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorSean Reifschneider <jafo@tummy.com>2004-12-21 02:22:29 (GMT)
committerSean Reifschneider <jafo@tummy.com>2004-12-21 02:22:29 (GMT)
commit7caafe7018ddfdc68572f4d4ef3b09aab81b05a6 (patch)
treee2867c17cad4b993f4db3b5616a1f474bbe71bf4 /Misc
parent6065d3232520b52f5196c31738dcbfb355ee9a4c (diff)
downloadcpython-7caafe7018ddfdc68572f4d4ef3b09aab81b05a6.zip
cpython-7caafe7018ddfdc68572f4d4ef3b09aab81b05a6.tar.gz
cpython-7caafe7018ddfdc68572f4d4ef3b09aab81b05a6.tar.bz2
Changing the idle wrapper to use Python and execvp() to pass arguments to
idle.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/RPM/python-2.4.spec12
1 files changed, 9 insertions, 3 deletions
diff --git a/Misc/RPM/python-2.4.spec b/Misc/RPM/python-2.4.spec
index af2053e..bd4c7f7 100644
--- a/Misc/RPM/python-2.4.spec
+++ b/Misc/RPM/python-2.4.spec
@@ -35,7 +35,7 @@
%define name python
%define version 2.4
%define libvers 2.4
-%define release 1pydotorg
+%define release 2pydotorg
%define __prefix /usr
# kludge to get around rpm <percent>define weirdness
@@ -131,6 +131,9 @@ formats.
%endif
%changelog
+* Mon Dec 20 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.4-2pydotorg]
+- Changing the idle wrapper so that it passes arguments to idle.
+
* Tue Oct 19 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.4b1-1pydotorg]
- Updating to 2.4.
@@ -257,8 +260,11 @@ fi
########
# Tools
-echo '#!/bin/bash' >${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
-echo 'exec %{__prefix}/bin/python%{binsuffix} %{__prefix}/%{libdirname}/python%{libvers}/idlelib/idle.py' >>$RPM_BUILD_ROOT%{__prefix}/bin/idle%{binsuffix}
+echo '#!%{__prefix}/bin/env python%{binsuffix}' >${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
+echo 'import os, sys' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
+echo 'os.execvp("%{__prefix}/bin/python%{binsuffix}", ["%{__prefix}/bin/python%{binsuffix}", "%{__prefix}/lib/python%{libvers}/idlelib/idle.py"] + sys.argv[1:])' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
+echo 'print "Failed to exec Idle"' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
+echo 'sys.exit(1)' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
chmod 755 $RPM_BUILD_ROOT%{__prefix}/bin/idle%{binsuffix}
cp -a Tools $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}