[bzr] BuildRequires Cython so that the C extensions are built from their original sources.

Toshio くらとみ toshio at fedoraproject.org
Tue May 28 23:05:48 UTC 2013


commit c08da13437fdb26f2b706a6c3e33e53eef5f0d65
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Tue May 28 16:05:32 2013 -0700

    BuildRequires Cython so that the C extensions are built from their original sources.

 bzr.spec |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/bzr.spec b/bzr.spec
index 0738148..69108fd 100644
--- a/bzr.spec
+++ b/bzr.spec
@@ -1,6 +1,6 @@
 # It's not strictly necessary to conditionalize this but it's a reminder of
 # when it can go away
-%if 0%{?fedora} < 13 && 0%{?rhel} < 6
+%if 0%{?rhel} && 0%{?rhel} < 6
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 %endif
 
@@ -13,7 +13,7 @@
 %global bzrmajor 2.5
 %global bzrminor .1
 #global bzrrc b6
-%global release 10
+%global release 11
 
 Name:           bzr
 Version:        %{bzrmajor}%{?bzrminor}
@@ -30,13 +30,11 @@ Source2:        bzr-icon-64.png
 Patch0:         bzr-cve2013-2099.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires:  python-devel zlib-devel
+BuildRequires:  python2-devel zlib-devel
 # For building documents
 BuildRequires:  python-sphinx
 BuildRequires:  gettext
-# We're using an old version of Pyrex, use the pregenerated C files instead
-# of rebuilding
-#BuildRequires: Pyrex
+BuildRequires: Cython
 %if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} <= 6)
 Requires:   python-paramiko
 %endif
@@ -72,6 +70,9 @@ This package contains the documentation for the Bazaar version control system.
 sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' bzrlib/_patiencediff_py.py
 sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' bzrlib/weave.py
 
+# Remove Cython generated .c files
+find . -name '*_pyx.c' -exec rm \{\} \;
+
 %build
 # RHEL and Fedora < 19 have a distutils bug that doesn't add this
 # automatically: https://bugzilla.redhat.com/show_bug.cgi?id=849994
@@ -146,6 +147,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{_defaultdocdir}/%{name}-doc-%{version}/*
 
 %changelog
+* Tue May 28 2013 Toshio Kuratomi <toshio at fedoraproject.org> - 2.5.1-11
+- BuildRequires Cython so that the C extensions are built from their original sources.
+
 * Tue May 28 2013 Ondrej Oprala <ooprala at redhat.com 2.5.1-10
 - Conditionally add -fno-strict-aliasing to CFLAGS
 


More information about the scm-commits mailing list