[Distutils] How to exclude a directory from a module that has tests?

Nagy László Zsolt gandalf at shopzeus.com
Fri Nov 13 06:50:34 EST 2015


  Hello,

My source distribution contains a single module. It is **not** a
package. I have used this:


setup(name='yubistorm',
      version=__version__,
      description='Asnychronous two factor authentication client for
YubiCloud with Tornado',
      long_description="""Provides a simple module that can be used from
a Tornado server to authenticate users """ +
                       """ with YubiCloud
(https://www.yubico.com/products/services-software/yubicloud/)""",
      author='László Zsolt Nagy',
      author_email='nagylzs at gmail.com',
      license="LGPL v3",
      py_modules=['yubistorm'],
      requires=['tornado (>=4.3)'],
      url="https://bitbucket.org/nagylzs/yubistorm",
      classifiers=[
            'Topic :: Security', 'Topic :: Internet :: WWW/HTTP',
            "Programming Language :: Python :: 3.5",
            "Programming Language :: Python :: Implementation :: CPython",
            ],
      )

The problem is that there is a "test" directory and it is added to the
source distribution. I want to exclude that. I know that there is an
"exclude" parameter for find_packages(). But this is not a package. This
is a single module. How do I exclude a directory then?

Thanks,

   Laszlo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20151113/7b38cc20/attachment.html>


More information about the Distutils-SIG mailing list