[Python-checkins] python/dist/src/Misc/RPM python-2.3.spec, 1.2.12.6, 1.2.12.7

loewis at users.sourceforge.net loewis at users.sourceforge.net
Sun Feb 15 16:26:46 EST 2004


Update of /cvsroot/python/python/dist/src/Misc/RPM
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27648

Modified Files:
      Tag: release23-maint
	python-2.3.spec 
Log Message:
Patch #892673: Replace /usr/local/bin/python with 
/usr/bin/env python'%{binsuffix}


Index: python-2.3.spec
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/RPM/python-2.3.spec,v
retrieving revision 1.2.12.6
retrieving revision 1.2.12.7
diff -C2 -d -r1.2.12.6 -r1.2.12.7
*** python-2.3.spec	19 Dec 2003 02:02:30 -0000	1.2.12.6
--- python-2.3.spec	15 Feb 2004 21:26:44 -0000	1.2.12.7
***************
*** 128,131 ****
--- 128,136 ----
  
  %changelog
+ * Sat Feb 07 2004 Sean Reifschneider <jafo-rpms at tummy.com> [2.3.3-2pydotorg]
+ - Adding code to remove "#!/usr/local/bin/python" from particular files and
+   causing the RPM build to terminate if there are any unexpected files
+   which have that line in them.
+ 
  * Mon Oct 13 2003 Sean Reifschneider <jafo-rpms at tummy.com> [2.3.2-1pydotorg]
  - Adding code to detect wether documentation is available to build.
***************
*** 262,265 ****
--- 267,302 ----
  %endif
  
+ #  fix the #! line in installed files
+ for file in \
+       usr/lib/python2.3/Tools/scripts/parseentities.py \
+       usr/lib/python2.3/cgi.py \
+       usr/lib/python2.3/Tools/faqwiz/faqw.py
+ do
+    sed 's|^#!.*python|#!/usr/bin/env python'"%{binsuffix}"'|' \
+          "$RPM_BUILD_ROOT"/"$file" >/tmp/fix-python-path.$$
+    cat /tmp/fix-python-path.$$ >"$RPM_BUILD_ROOT"/"$file"
+    rm -f /tmp/fix-python-path.$$
+ done
+ 
+ #  check to see if there are any straggling #! lines
+ find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
+       | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
+ if [ -s /tmp/python-rpm-files.$$ ]
+ then
+    echo '*****************************************************'
+    cat /tmp/python-rpm-files.$$
+    cat <<@EOF
+    *****************************************************
+      There are still files referencing /usr/local/bin/python in the
+      install directory.  They are listed above.  Please fix the .spec
+      file and try again.  If you are an end-user, you probably want
+      to report this to jafo-rpms at tummy.com as well.
+    *****************************************************
+ @EOF
+    rm -f /tmp/python-rpm-files.$$
+    exit 1
+ fi
+ rm -f /tmp/python-rpm-files.$$
+ 
  ########
  #  CLEAN




More information about the Python-checkins mailing list