Ok, I have built a preliminary package. I changed the build depends to
depend on librabbitmq-dev >= 0.4.0, and it uses the pristine upstream
source with the changes to setup.py.

If I install this package and start a celery process, it works.

If I downgrade python-librabbitmq to the version in unstable, it breaks
again. So I think the new version may have fixed the problem.


Oddly enough though, python-kombu still appears to require python-amqp to
be installed even when using python-librabbitmq, as kombu/exceptions.py
contains:

from amqp import ChannelError, ConnectionError, ResourceError

This cannot be satisfied by python-librabbitmq


I also opened this bug report about librabbitmq-dev being an old version in
Debian, note though I didn't have to update this to solve this segmentation
fault.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757553


I have attached the current diff against svn. Will wait a bit for answers
on my previous questions before committing this. I probably should update
the changelog to close this bug report too.
-- 
Brian May <br...@microcomaustralia.com.au>
Index: debian/patches/fix_setup.patch
===================================================================
--- debian/patches/fix_setup.patch	(revision 29974)
+++ debian/patches/fix_setup.patch	(working copy)
@@ -9,8 +9,10 @@
 Last-Update: 2013-06-07
 Forwarded: no
 
---- a/setup.cfg
-+++ b/setup.cfg
+Index: python-librabbitmq/setup.cfg
+===================================================================
+--- python-librabbitmq.orig/setup.cfg	2014-05-29 02:39:17.000000000 +1000
++++ python-librabbitmq/setup.cfg	2014-08-09 18:30:00.158622835 +1000
 @@ -1,8 +1,5 @@
  [nosetests]
  where = librabbitmq/tests
@@ -20,9 +22,11 @@
  
  [build_sphinx]
  source-dir = docs/
---- a/setup.py
-+++ b/setup.py
-@@ -1,209 +1,13 @@
+Index: python-librabbitmq/setup.py
+===================================================================
+--- python-librabbitmq.orig/setup.py	2014-05-29 02:24:49.000000000 +1000
++++ python-librabbitmq/setup.py	2014-08-09 18:34:59.991774479 +1000
+@@ -1,178 +1,7 @@
 -import os
 -import platform
 -import sys
@@ -71,7 +75,7 @@
 -    from distutils.command.build import build as _build
 -    cmd = None
 -    pkgdirs = []  # incdirs and libdirs get these
--    libs = []#'rabbitmq']
+-    libs = []
 -    defs = []
 -    incdirs = []
 -    libdirs = []
@@ -115,6 +119,9 @@
 -
 -    incdirs.append(LRMQDIST())  # for config.h
 -
+-    if is_linux:  # Issue #42
+-        libs.append('rt')  # -lrt for clock_gettime
+-
 -    librabbitmq_ext = Extension('_librabbitmq',
 -                            sources=PyC_files + librabbit_files,
 -                            libraries=libs, include_dirs=incdirs,
@@ -156,8 +163,10 @@
 -                    vars[key] = vars[key].replace(
 -                        '-isysroot /Developer/SDKs/MacOSX10.6.sdk', '')
 -                    vars[key] = vars[key].replace('-Wall', '')
--                restore = senv(('CFLAGS', vars['c']),
--                    ('LDFLAGS', vars['ld']))
+-                restore = senv(
+-                    ('CFLAGS', vars['c']),
+-                    ('LDFLAGS', vars['ld']),
+-                )
 -                try:
 -                    os.chdir(LRMQDIST())
 -                    if not os.path.isfile('config.h'):
@@ -198,20 +207,20 @@
  distmeta = [item.split('\"')[1] for item in distmeta]
  version = distmeta[0].strip()
  author = distmeta[1].strip()
- contact = distmeta[2].strip()
+@@ -180,35 +9,6 @@
  homepage = distmeta[3].strip()
  
+ 
 -
--
 -ext_modules = []
 -cmdclass = {}
 -packages = []
--install_requires = []
 -goahead = False
 -is_jython = sys.platform.startswith('java')
 -is_pypy = hasattr(sys, 'pypy_version_info')
 -is_py3k = sys.version_info[0] == 3
 -is_win = platform.system() == 'Windows'
+-is_linux = platform.system() == 'Linux'
 -if is_jython or is_pypy or is_py3k or is_win:
 -    pass
 -elif find_make():
@@ -234,21 +243,24 @@
  setup(
      name='librabbitmq',
      version=version,
-@@ -215,10 +19,14 @@
+@@ -220,12 +20,18 @@
      long_description=long_description,
      test_suite='nose.collector',
      zip_safe=False,
 -    packages=packages,
 -    cmdclass=cmdclass,
--    install_requires=install_requires,
--    ext_modules=ext_modules,
 +    packages=find_packages(exclude=['ez_setup', 'funtests', 'funtests.*']),
 +    package_dir={'librabbitmq.funtests': 'funtests'},
+     install_requires=[
+         'amqp>=1.2.1',
+     ],
+-    ext_modules=ext_modules,
 +    ext_modules=[
-+        Extension('_librabbitmq', ['Modules/_librabbitmq/connection.c'],
-+                  libraries=['rabbitmq'],
-+                  include_dirs=['/usr/include'],
-+                  library_dirs=['/usr/lib'])
++        Extension(
++            '_librabbitmq', ['Modules/_librabbitmq/connection.c'],
++            libraries=['rabbitmq'],
++            include_dirs=['/usr/include'],
++            library_dirs=['/usr/lib'])
 +    ],
      classifiers=[
          'Development Status :: 5 - Production/Stable',
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 29974)
+++ debian/changelog	(working copy)
@@ -1,3 +1,9 @@
+python-librabbitmq (1.5.2-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Brian May <b...@debian.org>  Mon, 28 Jul 2014 15:33:43 +1000
+
 python-librabbitmq (1.5.0+dfsg-1) unstable; urgency=low
 
   * New upstream release.
Index: debian/copyright
===================================================================
--- debian/copyright	(revision 29974)
+++ debian/copyright	(working copy)
@@ -2,13 +2,14 @@
 Upstream-Name: librabbitmq
 Upstream-Contact: Ask Solem <a...@celeryproject.org>
 Source: http://github.com/celery/librabbitmq
-Files-Excluded: clib/*
 
 Files: debian/*
 Copyright: 2013, Fladischer Michael <fladischermich...@fladi.at>
 License: MPL-1.1
 
-Files: rabbitmq-codegen/amqp-rabbitmq-*.json rabbitmq-codegen/demo_extension.json
+Files:
+ clib/*
+ rabbitmq-codegen/amqp-rabbitmq-*.json rabbitmq-codegen/demo_extension.json
 Copyright: 2008-2012, VM Ware Inc.
 License: Expat
 
Index: debian/control
===================================================================
--- debian/control	(revision 29974)
+++ debian/control	(working copy)
@@ -2,9 +2,10 @@
 Section: python
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-t...@lists.alioth.debian.org>
-Uploaders: Michael Fladischer <fladischermich...@fladi.at>
+Uploaders: Michael Fladischer <fladischermich...@fladi.at>,
+    Brian May <b...@debian.org>
 Build-Depends: debhelper (>= 9),
-               librabbitmq-dev (>= 0.5.0),
+               librabbitmq-dev (>= 0.4.0),
                python-all-dev (>= 2.6.6-3~),
                python-nose,
                python-setuptools,

Reply via email to