Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb66cd2

Browse files
committed
Patch #924497: find(1) all files with /usr/local/bin/python in them.
Backported to 2.3.
1 parent 59db96f commit fb66cd2

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Misc/RPM/python-2.3.spec

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
%define name python
3333
%define version 2.3.3
3434
%define libvers 2.3
35-
%define release 1pydotorg
35+
%define release 3pydotorg
3636
%define __prefix /usr
3737

3838
# kludge to get around rpm <percent>define weirdness
@@ -127,6 +127,10 @@ formats.
127127
%endif
128128

129129
%changelog
130+
* Sat Mar 27 2003 Sean Reifschneider <[email protected]> [2.3.2-3pydotorg]
131+
- Being more agressive about finding the paths to fix for
132+
#!/usr/local/bin/python.
133+
130134
* Sat Feb 07 2004 Sean Reifschneider <[email protected]> [2.3.3-2pydotorg]
131135
- Adding code to remove "#!/usr/local/bin/python" from particular files and
132136
causing the RPM build to terminate if there are any unexpected files
@@ -267,10 +271,8 @@ mkdir -p "$RPM_BUILD_ROOT"/var/www/html/python
267271
%endif
268272

269273
# fix the #! line in installed files
270-
for file in \
271-
usr/lib/python2.3/Tools/scripts/parseentities.py \
272-
usr/lib/python2.3/cgi.py \
273-
usr/lib/python2.3/Tools/faqwiz/faqw.py
274+
find . -type f -print0 | xargs -0 grep -l /usr/local/bin/python |
275+
while read file
274276
do
275277
sed 's|^#!.*python|#!/usr/bin/env python'"%{binsuffix}"'|' \
276278
"$RPM_BUILD_ROOT"/"$file" >/tmp/fix-python-path.$$

0 commit comments

Comments
 (0)