- work around bug 562906 by supplying a fixed version of pythondeps.sh
- set %%{_python_bytecompile_errors_terminate_build} to 0 to prevent the broken test files from killing the build on buildroots where python is installed
This commit is contained in:
parent
b25d6022fc
commit
4bb3fe1878
27
python.spec
27
python.spec
|
@ -24,10 +24,24 @@
|
||||||
|
|
||||||
%global with_gdb_hooks 1
|
%global with_gdb_hooks 1
|
||||||
|
|
||||||
|
|
||||||
|
# Some of the files below /usr/lib/pythonMAJOR.MINOR/test (e.g. bad_coding.py)
|
||||||
|
# are deliberately invalid, leading to SyntaxError exceptions if they get
|
||||||
|
# byte-compiled.
|
||||||
|
#
|
||||||
|
# These errors are ignored by the normal python build, and aren't normally a
|
||||||
|
# problem in the buildroots since /usr/bin/python isn't present.
|
||||||
|
#
|
||||||
|
# However, for the case where we're rebuilding the python srpm on a machine
|
||||||
|
# that does have python installed we need to set this to avoid
|
||||||
|
# brp-python-bytecompile treating these as fatal errors:
|
||||||
|
#
|
||||||
|
%global _python_bytecompile_errors_terminate_build 0
|
||||||
|
|
||||||
Summary: An interpreted, interactive, object-oriented programming language
|
Summary: An interpreted, interactive, object-oriented programming language
|
||||||
Name: %{python}
|
Name: %{python}
|
||||||
Version: 2.6.4
|
Version: 2.6.4
|
||||||
Release: 14%{?dist}
|
Release: 15%{?dist}
|
||||||
License: Python
|
License: Python
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Provides: python-abi = %{pybasever}
|
Provides: python-abi = %{pybasever}
|
||||||
|
@ -56,6 +70,12 @@ Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
|
||||||
Source1: libpython-36a517ef7848cbd0b3dcc7371f32e47ac4c87eba.tar.gz
|
Source1: libpython-36a517ef7848cbd0b3dcc7371f32e47ac4c87eba.tar.gz
|
||||||
|
|
||||||
|
|
||||||
|
# Work around bug 562906 until it's fixed in rpm-build by providing a fixed
|
||||||
|
# version of pythondeps.sh:
|
||||||
|
Source2: pythondeps.sh
|
||||||
|
%global __python_requires %{SOURCE2}
|
||||||
|
|
||||||
|
|
||||||
# Modules/Setup.dist is ultimately used by the "makesetup" script to construct
|
# Modules/Setup.dist is ultimately used by the "makesetup" script to construct
|
||||||
# the Makefile and config.c
|
# the Makefile and config.c
|
||||||
#
|
#
|
||||||
|
@ -832,6 +852,11 @@ rm -fr %{buildroot}
|
||||||
%{dynload_dir}/_testcapimodule.so
|
%{dynload_dir}/_testcapimodule.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 8 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.4-15
|
||||||
|
- work around bug 562906 by supplying a fixed version of pythondeps.sh
|
||||||
|
- set %%{_python_bytecompile_errors_terminate_build} to 0 to prevent the broken
|
||||||
|
test files from killing the build on buildroots where python is installed
|
||||||
|
|
||||||
* Fri Feb 5 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.4-14
|
* Fri Feb 5 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.4-14
|
||||||
- add gdb hooks for easier debugging
|
- add gdb hooks for easier debugging
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[ $# -ge 1 ] || {
|
||||||
|
cat > /dev/null
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
-P|--provides)
|
||||||
|
shift
|
||||||
|
# Match buildroot/payload paths of the form
|
||||||
|
# /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR
|
||||||
|
# generating a line of the form
|
||||||
|
# python(abi) = MAJOR.MINOR
|
||||||
|
# (Don't match against -config tools e.g. /usr/bin/python2.6-config)
|
||||||
|
grep "/usr/bin/python.\..$" \
|
||||||
|
| sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
|
||||||
|
;;
|
||||||
|
-R|--requires)
|
||||||
|
shift
|
||||||
|
# Match buildroot paths of the form
|
||||||
|
# /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and
|
||||||
|
# /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
|
||||||
|
# generating (uniqely) lines of the form:
|
||||||
|
# python(abi) = MAJOR.MINOR
|
||||||
|
grep "/usr/lib[^/]*/python.\../.*" \
|
||||||
|
| sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
|
||||||
|
| sort | uniq
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue