rpms/python/devel python.spec,1.191,1.192
dmalcolm
dmalcolm at fedoraproject.org
Tue Jun 8 15:25:02 UTC 2010
Author: dmalcolm
Update of /cvs/pkgs/rpms/python/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv5485
Modified Files:
python.spec
Log Message:
* Tue Jun 8 2010 David Malcolm <dmalcolm at redhat.com> - 2.6.5-15
- add a flag to make it easy to turn off the debug build when troubleshooting
the rpm build
Index: python.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python/devel/python.spec,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -p -r1.191 -r1.192
--- python.spec 5 Jun 2010 08:11:11 -0000 1.191
+++ python.spec 8 Jun 2010 15:25:02 -0000 1.192
@@ -33,6 +33,8 @@
%global py_INSTSONAME_optimized libpython%{pybasever}.so.%{py_SOVERSION}
%global py_INSTSONAME_debug libpython%{pybasever}_d.so.%{py_SOVERSION}
+%global with_debug_build 1
+
%global with_gdb_hooks 1
%global with_systemtap 1
@@ -61,7 +63,7 @@ Summary: An interpreted, interactive, ob
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.6.5
-Release: 14%{?dist}
+Release: 15%{?dist}
License: Python
Group: Development/Languages
Provides: python-abi = %{pybasever}
@@ -530,6 +532,7 @@ never used in production.
You might want to install the python-test package if you're developing python
code that uses more than just unittest and/or test_support.py.
+%if 0%{?with_debug_build}
%package debug
Summary: Debug version of the Python runtime
Group: Applications/System
@@ -560,6 +563,7 @@ It shares installation directories with
.py and .pyc files can be shared. All compiled extension modules gain a "_d"
suffix ("foo_d.so" rather than "foo.so") so that each Python implementation can
load its own extensions.
+%endif # with_debug_build
%prep
%setup -q -n Python-%{version}
@@ -723,6 +727,7 @@ LD_LIBRARY_PATH="$topdir/$ConfDir" PATH=
# Use "BuildPython" to support building with different configurations:
+%if 0%{?with_debug_build}
BuildPython debug \
python-debug \
python%{pybasever}-debug \
@@ -732,6 +737,7 @@ BuildPython debug \
"--with-pydebug --with-count-allocs --with-call-profile" \
%endif
false
+%endif # with_debug_build
BuildPython optimized \
python \
@@ -799,9 +805,11 @@ LD_LIBRARY_PATH="$topdir/$ConfDir" $topd
# Use "InstallPython" to support building with different configurations:
# Install the "debug" build first, so that we can move some files aside
+%if 0%{?with_debug_build}
InstallPython debug \
python%{pybasever}-debug \
%{py_INSTSONAME_debug}
+%endif # with_debug_build
# Now the optimized build:
InstallPython optimized \
@@ -835,10 +843,14 @@ fi
%if %{main_python}
ln -s python %{buildroot}%{_bindir}/python2
+%if 0%{?with_debug_build}
ln -s python-debug %{buildroot}%{_bindir}/python2-debug
+%endif # with_debug_build
%else
mv %{buildroot}%{_bindir}/python %{buildroot}%{_bindir}/%{python}
+%if 0%{?with_debug_build}
mv %{buildroot}%{_bindir}/python-debug %{buildroot}%{_bindir}/%{python}-debug
+%endif # with_debug_build
mv %{buildroot}/%{_mandir}/man1/python.1 %{buildroot}/%{_mandir}/man1/python%{pybasever}.1
%endif
@@ -927,7 +939,14 @@ install -d %{buildroot}/usr/lib/python%{
%else
%global _pyconfig_h %{_pyconfig32_h}
%endif
-for PyIncludeDir in python%{pybasever} python%{pybasever}-debug ; do
+
+%if 0%{?with_debug_build}
+%global PyIncludeDirs python%{pybasever} python%{pybasever}-debug
+%else
+%global PyIncludeDirs python%{pybasever}
+%endif
+
+for PyIncludeDir in %{PyIncludeDirs} ; do
mv %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h \
%{buildroot}%{_includedir}/$PyIncludeDir/%{_pyconfig_h}
cat > %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h << EOF
@@ -989,10 +1008,12 @@ sed \
%{SOURCE3} \
> %{buildroot}%{tapsetdir}/%{libpython_stp_optimized}
+%if 0%{?with_debug_build}
sed \
-e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \
%{SOURCE3} \
> %{buildroot}%{tapsetdir}/%{libpython_stp_debug}
+%endif # with_debug_build
%endif # with_systemtap
%clean
@@ -1205,6 +1226,7 @@ rm -fr %{buildroot}
# Hence the manifest is the combination of analogous files in the manifests of
# all of the other subpackages
+%if 0%{?with_debug_build}
%files debug
%defattr(-,root,root,-)
@@ -1320,6 +1342,9 @@ rm -fr %{buildroot}
%{dynload_dir}/_ctypes_test_d.so
%{dynload_dir}/_testcapimodule_d.so
+%endif # with_debug_build
+
+
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from
# ldconfig (rhbz:562980).
#
@@ -1334,6 +1359,10 @@ rm -fr %{buildroot}
# payload file would be unpackaged)
%changelog
+* Tue Jun 8 2010 David Malcolm <dmalcolm at redhat.com> - 2.6.5-15
+- add a flag to make it easy to turn off the debug build when troubleshooting
+the rpm build
+
* Sat Jun 5 2010 Dan Horák <dan[at]danny.cz> - 2.6.5-14
- reading the timestamp counter is available only on some arches (see Python/ceval.c)
- disable --with-valgrind on s390(x) arches
More information about the scm-commits
mailing list