rpms/python3/devel python-3.1.2-more-configuration-flags.patch, NONE, 1.1 python3.spec, 1.22, 1.23

dmalcolm dmalcolm at fedoraproject.org
Tue May 25 17:16:12 UTC 2010


Author: dmalcolm

Update of /cvs/pkgs/rpms/python3/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv30941

Modified Files:
	python3.spec 
Added Files:
	python-3.1.2-more-configuration-flags.patch 
Log Message:
* Tue May 25 2010 David Malcolm <dmalcolm at redhat.com> - 3.1.2-7
- add configure-time support for COUNT_ALLOCS and CALL_PROFILE debug options
(patch 104); enable them and the WITH_TSC option within the debug build


python-3.1.2-more-configuration-flags.patch:
 configure.in  |   24 ++++++++++++++++++++++++
 pyconfig.h.in |    6 ++++++
 2 files changed, 30 insertions(+)

--- NEW FILE python-3.1.2-more-configuration-flags.patch ---
diff -up Python-3.1.2/configure.in.more-configuration-flags Python-3.1.2/configure.in
--- Python-3.1.2/configure.in.more-configuration-flags	2010-05-25 12:16:48.602875960 -0400
+++ Python-3.1.2/configure.in	2010-05-25 12:16:48.609879553 -0400
@@ -2443,6 +2443,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-3.1.2/pyconfig.h.in.more-configuration-flags Python-3.1.2/pyconfig.h.in
--- Python-3.1.2/pyconfig.h.in.more-configuration-flags	2010-05-25 12:16:48.000000000 -0400
+++ Python-3.1.2/pyconfig.h.in	2010-05-25 12:17:54.428126399 -0400
@@ -18,6 +18,12 @@
 /* Define if you have the Mach cthreads package */
 #undef C_THREADS
 
+/* Define to keep records on function call invocation */
+#undef CALL_PROFILE
+
+/* Define to keep records of the number of instances of each type */
+#undef COUNT_ALLOCS
+
 /* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM
    mixed-endian order (byte order 45670123) */
 #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754


Index: python3.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python3/devel/python3.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- python3.spec	24 May 2010 23:45:40 -0000	1.22
+++ python3.spec	25 May 2010 17:16:11 -0000	1.23
@@ -40,7 +40,7 @@
 Summary: Version 3 of the Python programming language aka Python 3000
 Name: python3
 Version: %{pybasever}.2
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: Python
 Group: Development/Languages
 Source: http://python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
@@ -194,6 +194,13 @@ Patch102: python-3.1.1-lib64.patch
 
 Patch103: python-3.1.2-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
+Patch104: python-3.1.2-more-configuration-flags.patch
+
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: readline-devel, openssl-devel, gmp-devel
 BuildRequires: ncurses-devel, gdbm-devel, zlib-devel, expat-devel
@@ -343,6 +350,7 @@ rm -r Modules/zlib || exit 1
 %endif
 
 %patch103 -p1 -b .debug-build
+%patch104 -p1 -b .more-configuration-flags
 
 
 
@@ -415,7 +423,7 @@ make OPT="$CFLAGS" %{?_smp_mflags}
 BuildPython debug \
   python-debug \
   python%{pybasever}-debug \
-  "--with-pydebug" \
+  "--with-pydebug --with-tsc --with-count-allocs --with-call-profile" \
   false
 
 BuildPython optimized \
@@ -1022,6 +1030,10 @@ rm -fr %{buildroot}
 
 
 %changelog
+* Tue May 25 2010 David Malcolm <dmalcolm at redhat.com> - 3.1.2-7
+- add configure-time support for COUNT_ALLOCS and CALL_PROFILE debug options
+(patch 104); enable them and the WITH_TSC option within the debug build
+
 * Mon May 24 2010 David Malcolm <dmalcolm at redhat.com> - 3.1.2-6
 - build and install two different configurations of Python 3: debug and
 standard, packaging the debug build in a new "python3-debug" subpackage



More information about the scm-commits mailing list