2

I'd like to add tests to the sdist package in my setuptools distribution, but I don't want them installed / in bdist. I already have:

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

But currently the tests/* are always included. How can I change that?

viraptor
  • 33,322
  • 10
  • 107
  • 191

2 Answers2

3

in MANIFEST.in put

include tests/*
Stephen Paulger
  • 5,204
  • 3
  • 28
  • 46
0

In setup.py :

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

Notice the [] around 'tests'.

In MANIFEST.in :

recursive-include tests *
Philippe
  • 1,206
  • 3
  • 13
  • 19