Rev 3762: (jam) blacklist pyrex-0.9.4.1 from compiling _dirstate_helpers_c.pyx in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Oct 2 17:39:37 BST 2008


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3762
revision-id: pqm at pqm.ubuntu.com-20081002163934-wr8i2p311nimbszm
parent: pqm at pqm.ubuntu.com-20081002160145-vrwbzkinptlkk5az
parent: john at arbash-meinel.com-20081002153612-nmrpqm17n8bunfrv
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-10-02 17:39:34 +0100
message:
  (jam) blacklist pyrex-0.9.4.1 from compiling _dirstate_helpers_c.pyx
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  setup.py                       setup.py-20050314065409-02f8a0a6e3f9bc70
    ------------------------------------------------------------
    revno: 3757.2.2
    revision-id: john at arbash-meinel.com-20081002153612-nmrpqm17n8bunfrv
    parent: john at arbash-meinel.com-20081001221115-loptk3y40vt7e0uv
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: block_pyrex_0.9.4.1
    timestamp: Thu 2008-10-02 10:36:12 -0500
    message:
      Request from Martin, clearly comment the problem.
      Request from Robert, only blacklist the one known-bad version of pyrex.
    modified:
      setup.py                       setup.py-20050314065409-02f8a0a6e3f9bc70
    ------------------------------------------------------------
    revno: 3757.2.1
    revision-id: john at arbash-meinel.com-20081001221115-loptk3y40vt7e0uv
    parent: pqm at pqm.ubuntu.com-20081001123103-9powbklax4nmw09j
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: block_pyrex_0.9.4.1
    timestamp: Wed 2008-10-01 17:11:15 -0500
    message:
      Work around bug #276868 by blacklisting pyrex 0.9.4.1 for that extension
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      setup.py                       setup.py-20050314065409-02f8a0a6e3f9bc70
=== modified file 'NEWS'
--- a/NEWS	2008-10-01 23:17:47 +0000
+++ b/NEWS	2008-10-02 16:39:34 +0000
@@ -18,6 +18,13 @@
     * ``bzr+http//`` will now optionally load plugins and write logs on the
       server. (Marius Kruger)
 
+    * ``bzrlib._dirstate_helpers_c.pyx`` does not compile correctly with
+      Pyrex 0.9.4.1 (it generates C code which causes segfaults). We
+      explicitly blacklist that version of the compiler for that
+      extension. Packaged versions will include .c files created with
+      pyrex >= 0.9.6 so it doesn't effect releases, only users running
+      from the source tree. (John Arbash Meinel, #276868)
+
   FEATURES
 
     * bzr is now compatible with python-2.6. python-2.6 is not yet officially

=== modified file 'setup.py'
--- a/setup.py	2008-09-26 05:14:51 +0000
+++ b/setup.py	2008-10-02 15:36:12 +0000
@@ -175,6 +175,7 @@
     from distutils.command.build_ext import build_ext
 else:
     have_pyrex = True
+    from Pyrex.Compiler.Version import version as pyrex_version
 
 
 class build_ext_if_possible(build_ext):
@@ -237,7 +238,18 @@
     add_pyrex_extension('bzrlib._walkdirs_win32',
                         define_macros=[('WIN32', None)])
 else:
-    add_pyrex_extension('bzrlib._dirstate_helpers_c')
+    if have_pyrex and pyrex_version == '0.9.4.1':
+        # Pyrex 0.9.4.1 fails to compile this extension correctly
+        # The code it generates re-uses a "local" pointer and
+        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
+        # which is NULL safe with PY_DECREF which is not.)
+        print 'Cannot build extension "bzrlib._dirstate_helpers_c" using'
+        print 'your version of pyrex "%s". Please upgrade your pyrex' % (
+            pyrex_version,)
+        print 'install. For now, the non-compiled (python) version will'
+        print 'be used instead.'
+    else:
+        add_pyrex_extension('bzrlib._dirstate_helpers_c')
     add_pyrex_extension('bzrlib._readdir_pyx')
 ext_modules.append(Extension('bzrlib._patiencediff_c', ['bzrlib/_patiencediff_c.c']))
 




More information about the bazaar-commits mailing list