views:

218

answers:

1

I have a very simple python package that I build into debian packages using setuptools, cdbs and pycentral:

setup.py:

from setuptools import setup
setup(name='PHPSerialize',
  version='1.0',
  py_modules=['PHPSerialize'],
  test_suite = 'nose.collector'
 )

debian/rules:

#!/usr/bin/make -f
DEB_PYTHON_SYSTEM = pycentral

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

Now, is there an easy way to make dpkg-buildpackage execute the unit tests and refuse to create the .deb if the test suite fails?

+1  A: 

Try

build/yourpackage::
         nosetests
Peter Eisentraut
works very well, thank you!
Chris089