rpms/python/devel python-2.6.5-more-configuration-flags.patch, NONE, 1.1 python.spec, 1.185, 1.186
dmalcolm
dmalcolm at fedoraproject.org
Tue May 25 16:13:30 UTC 2010
Author: dmalcolm
Update of /cvs/pkgs/rpms/python/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv26675
Modified Files:
python.spec
Added Files:
python-2.6.5-more-configuration-flags.patch
Log Message:
* Tue May 25 2010 David Malcolm <dmalcolm at redhat.com> - 2.6.5-10
- add configure-time support for COUNT_ALLOCS and CALL_PROFILE debug options
(patch 113); enable them and the WITH_TSC option within the debug build
python-2.6.5-more-configuration-flags.patch:
configure.in | 24 ++++++++++++++++++++++++
pyconfig.h.in | 6 ++++++
2 files changed, 30 insertions(+)
--- NEW FILE python-2.6.5-more-configuration-flags.patch ---
diff -up Python-2.6.5/configure.in.more-configuration-flags Python-2.6.5/configure.in
--- Python-2.6.5/configure.in.more-configuration-flags 2010-05-24 18:51:25.410111792 -0400
+++ Python-2.6.5/configure.in 2010-05-24 18:59:23.954986388 -0400
@@ -2515,6 +2515,30 @@ else AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])
+AC_MSG_CHECKING(for --with-count-allocs)
+AC_ARG_WITH(count-allocs,
+[ --with(out)count-allocs enable/disable per-type instance accounting], [
+if test "$withval" != no
+then
+ AC_DEFINE(COUNT_ALLOCS, 1,
+ [Define to keep records of the number of instances of each type])
+ AC_MSG_RESULT(yes)
+else AC_MSG_RESULT(no)
+fi],
+[AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING(for --with-call-profile)
+AC_ARG_WITH(call-profile,
+[ --with(out)-call-profile enable/disable statistics on function call invocation], [
+if test "$withval" != no
+then
+ AC_DEFINE(CALL_PROFILE, 1,
+ [Define to keep records on function call invocation])
+ AC_MSG_RESULT(yes)
+else AC_MSG_RESULT(no)
+fi],
+[AC_MSG_RESULT(no)])
+
# Check for Python-specific malloc support
AC_MSG_CHECKING(for --with-pymalloc)
AC_ARG_WITH(pymalloc,
diff -up Python-2.6.5/pyconfig.h.in.more-configuration-flags Python-2.6.5/pyconfig.h.in
--- Python-2.6.5/pyconfig.h.in.more-configuration-flags 2010-05-24 18:51:45.677988086 -0400
+++ Python-2.6.5/pyconfig.h.in 2010-05-24 19:00:44.163987730 -0400
@@ -1019,6 +1019,12 @@
/* Define to profile with the Pentium timestamp counter */
#undef WITH_TSC
+/* Define to keep records of the number of instances of each type */
+#undef COUNT_ALLOCS
+
+/* Define to keep records on function call invocation */
+#undef CALL_PROFILE
+
/* Define if you want pymalloc to be disabled when running under valgrind */
#undef WITH_VALGRIND
Index: python.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python/devel/python.spec,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -p -r1.185 -r1.186
--- python.spec 20 May 2010 19:16:46 -0000 1.185
+++ python.spec 25 May 2010 16:13:29 -0000 1.186
@@ -61,7 +61,7 @@ Summary: An interpreted, interactive, ob
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.6.5
-Release: 9%{?dist}
+Release: 10%{?dist}
License: Python
Group: Development/Languages
Provides: python-abi = %{pybasever}
@@ -366,6 +366,13 @@ Patch111: python-2.6.4-no-static-lib.pat
Patch112: python-2.6.5-debug-build.patch
+
+# Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options
+# described at http://svn.python.org/projects/python/trunk/Misc/SpecialBuilds.txt
+# so that if they are enabled, they will be in that build's pyconfig.h, so that
+# extension modules will reliably use them
+Patch113: python-2.6.5-more-configuration-flags.patch
+
%if %{main_python}
Obsoletes: Distutils
Provides: Distutils
@@ -593,6 +600,8 @@ rm -r Modules/zlib || exit 1
%patch112 -p1 -b .debug-build
+%patch113 -p1 -b .more-configuration-flags
+
# This shouldn't be necesarry, but is right now (2.2a3)
find -name "*~" |xargs rm -f
@@ -687,7 +696,7 @@ LD_LIBRARY_PATH="$topdir/$ConfDir" PATH=
BuildPython debug \
python-debug \
python%{pybasever}-debug \
- "--with-pydebug" \
+ "--with-pydebug --with-tsc --with-count-allocs --with-call-profile" \
false
BuildPython optimized \
@@ -1291,6 +1300,10 @@ rm -fr %{buildroot}
# payload file would be unpackaged)
%changelog
+* Tue May 25 2010 David Malcolm <dmalcolm at redhat.com> - 2.6.5-10
+- add configure-time support for COUNT_ALLOCS and CALL_PROFILE debug options
+(patch 113); enable them and the WITH_TSC option within the debug build
+
* Tue May 18 2010 David Malcolm <dmalcolm at redhat.com> - 2.6.5-9
- build and install two different configurations of Python: debug and standard,
packaging the debug build in a new "python-debug" subpackage (patch 112)
More information about the scm-commits
mailing list