[MySQL-python/f20] added --without-debug option

Jakub Dorňák jdornak at fedoraproject.org
Mon Nov 11 15:52:38 UTC 2013


commit 7d2c8bd8404416c8b3e19213257e9e9c7f713d4c
Author: Jakub Dorňák <jdornak at redhat.com>
Date:   Mon Nov 11 16:48:48 2013 +0100

    added --without-debug option
    
    Related: #669835

 MySQL-python.spec |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/MySQL-python.spec b/MySQL-python.spec
index 3feda2b..952ce68 100644
--- a/MySQL-python.spec
+++ b/MySQL-python.spec
@@ -1,9 +1,9 @@
-%global with_python_debug 1
+%bcond_without debug
 
 Summary: An interface to MySQL
 Name: MySQL-python
 Version: 1.2.3
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: GPLv2+
 Group: Development/Libraries
 URL: http://sourceforge.net/projects/mysql-python/
@@ -14,14 +14,10 @@ Patch1: MySQL-python-no-openssl.patch
 
 BuildRequires: python2-devel python-setuptools
 BuildRequires: mysql-devel zlib-devel
-
-%if 0%{?with_python_debug}
+%if %{with debug}
 BuildRequires: python-debug
 %endif
 
-# is this still needed?
-# Requires: mx
-
 %description
 Python interface to MySQL
 
@@ -38,7 +34,7 @@ written by Joe Skinner and others. However, the older version is
 a) not thread-friendly, b) written for MySQL 3.21, c) apparently
 not actively maintained. No code from that version is used in MySQLdb.
 
-%if 0%{?with_python_debug}
+%if %{with debug}
 %package debug
 Summary:  An interface to MySQL, built for the CPython debug runtime
 Group:    Applications/System
@@ -47,7 +43,7 @@ Requires: MySQL-python%{_isa} = %{version}-%{release}
 
 %description debug
 Python interface to MySQL, built for the CPython debug runtime
-%endif # with_python_debug
+%endif # with debug
 
 %prep
 %setup -q -n %{name}-%{version}
@@ -58,12 +54,16 @@ Python interface to MySQL, built for the CPython debug runtime
 rm -f doc/*~
 export libdirname=%{_lib}
 CFLAGS="$RPM_OPT_FLAGS" python setup.py build
+%if %{with debug}
 CFLAGS="$RPM_OPT_FLAGS" python-debug setup.py build
+%endif
 
 %install
 export libdirname=%{_lib}
 python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
+%if %{with debug}
 python-debug setup.py install --root=$RPM_BUILD_ROOT
+%endif
 
 %files -f INSTALLED_FILES
 %doc README doc/*
@@ -73,10 +73,16 @@ python-debug setup.py install --root=$RPM_BUILD_ROOT
 %{python_sitearch}/*.pyo
 %dir %{python_sitearch}/MySQLdb/constants
 
+%if %{with debug}
 %files debug
 %{python_sitearch}/_mysql_d.so
+%endif
 
 %changelog
+* Mon Nov 11 2013 Jakub Dorňák <jdornak at redhat.com> - 1.2.3-10
+- added --without-debug option
+Related: #669835
+
 * Mon Nov 11 2013 Jakub Dorňák <jdornak at redhat.com> - 1.2.3-9
 - added debug subpackage
 Related: #669835


More information about the scm-commits mailing list