Hi all, I'm trying to package tests file in the sdist only and it doesn't really work :/ If I do:
setup( packages = find_packages(exclude=['tests']), test_suite = "tests", ...
this doesn't package tests anywhere. Using either general find_packages includes tests in both sdist and bdist. How can I resolve this? Essentially I want either tests.py, or tests/__init__.py to be distributed in sdist, but not in bdist.
Thanks, Stan
Stanisław Pitucha viraptor@gmail.com writes:
If I do:
setup( packages = find_packages(exclude=['tests']), test_suite = "tests", ...
this doesn't package tests anywhere.
[…]
Essentially I want either tests.py, or tests/__init__.py to be distributed in sdist, but not in bdist.
I am using effectively the same as you describe above, but I get the result you are seeking: the sdist contains the test suite, and the binary dist does not.
Have a look at Gracie URL:http://pypi.python.org/pypi/gracie for an example that works for me. Perhaps it can help you find what's different that causes the problem you're seeing.
On 21.08.2010 13:50, Ben Finney wrote:
I am using effectively the same as you describe above, but I get the result you are seeking: the sdist contains the test suite, and the binary dist does not.
Have a look at Gracie URL:http://pypi.python.org/pypi/gracie for an example that works for me. Perhaps it can help you find what's different that causes the problem you're seeing.
Thanks a lot. I looked through your module, but I really cannot find what's wrong with mine. I moved my tests to 'tests.suite' to match your layout, but that didn't work.
I see that when your egg_info/SOURCES.txt is generated, it includes the test module. My package doesn't do that - tests are never included in the SOURCES.txt unless I specifically remove "excludes = ['tests']".
Does anyone have other ideas for fixing this?
Thanks, Stan