|
30 | 30 | ################################# |
31 | 31 |
|
32 | 32 | %define name python |
33 | | -%define version 2.3.2 |
| 33 | +%define version 2.3.3 |
34 | 34 | %define libvers 2.3 |
35 | 35 | %define release 1pydotorg |
36 | 36 | %define __prefix /usr |
@@ -127,6 +127,11 @@ formats. |
127 | 127 | %endif |
128 | 128 |
|
129 | 129 | %changelog |
| 130 | +* Sat Feb 07 2004 Sean Reifschneider <[email protected]> [2.3.3-2pydotorg] |
| 131 | +- Adding code to remove "#!/usr/local/bin/python" from particular files and |
| 132 | + causing the RPM build to terminate if there are any unexpected files |
| 133 | + which have that line in them. |
| 134 | + |
130 | 135 | * Mon Oct 13 2003 Sean Reifschneider <[email protected]> [2.3.2-1pydotorg] |
131 | 136 | - Adding code to detect wether documentation is available to build. |
132 | 137 |
|
@@ -261,6 +266,38 @@ mkdir -p "$RPM_BUILD_ROOT"/var/www/html/python |
261 | 266 | ) |
262 | 267 | %endif |
263 | 268 |
|
| 269 | +# 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 | +do |
| 275 | + sed 's|^#!.*python|#!/usr/bin/env python'"%{binsuffix}"'|' \ |
| 276 | + "$RPM_BUILD_ROOT"/"$file" >/tmp/fix-python-path.$$ |
| 277 | + cat /tmp/fix-python-path.$$ >"$RPM_BUILD_ROOT"/"$file" |
| 278 | + rm -f /tmp/fix-python-path.$$ |
| 279 | +done |
| 280 | + |
| 281 | +# check to see if there are any straggling #! lines |
| 282 | +find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \ |
| 283 | + | grep ':1:#!' >/tmp/python-rpm-files.$$ || true |
| 284 | +if [ -s /tmp/python-rpm-files.$$ ] |
| 285 | +then |
| 286 | + echo '*****************************************************' |
| 287 | + cat /tmp/python-rpm-files.$$ |
| 288 | + cat <<@EOF |
| 289 | + ***************************************************** |
| 290 | + There are still files referencing /usr/local/bin/python in the |
| 291 | + install directory. They are listed above. Please fix the .spec |
| 292 | + file and try again. If you are an end-user, you probably want |
| 293 | + to report this to [email protected] as well. |
| 294 | + ***************************************************** |
| 295 | +@EOF |
| 296 | + rm -f /tmp/python-rpm-files.$$ |
| 297 | + exit 1 |
| 298 | +fi |
| 299 | +rm -f /tmp/python-rpm-files.$$ |
| 300 | + |
264 | 301 | ######## |
265 | 302 | # CLEAN |
266 | 303 | ######## |
|
0 commit comments