2010-08-21 60 views
1

我想在我的setuptools發行版中爲sdist程序包添加測試,但我不希望它們安裝在/ bdist中。我已經有:將測試添加到sdist,但未安裝

setup(
    ... 
    packages = find_packages(exclude='tests'), 
    test_suite = "tests", 
    ... 
) 

但是目前總是包含tests/*。我該如何改變它?

回答

2

在MANIFEST.in把

include tests/* 
0

在setup.py:

setup(
    ... 
    packages = find_packages(exclude=['tests']), 
    ... 
) 

通知的[]周圍'tests'

在MANIFEST.in:

recursive-include tests *