我有一个非常简单的python包,我使用setuptools,cdbs和pycentral构建到debian包中:
setup.py:
from setuptools import setup
setup(name='PHPSerialize',
version='1.0',
py_modules=['PHPSerialize'],
test_suite = 'nose.collector'
)
的Debian /规则:
#!/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
现在,是否有一种简单的方法可以让dpkg-buildpackage执行单元测试,如果测试套件出现故障,则拒绝创建.deb?
答案 0 :(得分:2)
尝试
build/yourpackage::
nosetests