Skip to content

Commit

Permalink
Exclude tests from dist package.
Browse files Browse the repository at this point in the history
Learned a lot about setup.py and MANIFEST.in by reading the files used by
[pip](https://github.com/pypa/pip) and experimenting. This version of the
control files should be a lot better at keeping cruft from getting in the
sdist package.
  • Loading branch information
bd808 committed Apr 8, 2013
1 parent 16210da commit 4da5ef9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ include INSTALL
include LICENSE
include MANIFEST.in
include README.md
recursive-include docs Makefile *.rst *.py
recursive-include docs *.rst
prune docs/_build
21 changes: 16 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
if 'nosetests' in sys.argv[1:]:
setup_requires.append('nose>=1.0')

tests_require=['nose>=1.0']

setup(
name='iptools',
version=__version__,
Expand All @@ -18,9 +20,10 @@
download_url='http://pypi.python.org/packages/source/i/iptools/',
license='BSD',
platforms=['any', ],
packages=find_packages(),
packages=find_packages(exclude=['docs', 'tests', 'tests.*']),
include_package_data=True,
test_suite='tests',
test_suite='nose.collector',
tests_require=tests_require,
setup_requires=setup_requires,
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand All @@ -37,10 +40,18 @@
'Topic :: Utilities',
'Topic :: Internet',
],
long_description="""Utilities for manipulating IPv4 and IPv6 addresses
including a class that can be used to include CIDR network blocks
in Django's INTERNAL_IPS setting.""",
keywords="ip2long long2ip django cidr ipv4 ipv6",
long_description="""
Utilities for manipulating IPv4 and IPv6 addresses including a
class that can be used to include CIDR network blocks in Django's
INTERNAL_IPS setting.
Full documentation at http://python-iptools.readthedocs.org/
""",
zip_safe=False,
extras_require={
'testing':tests_require,
},
)

# vim: set sw=4 ts=4 sts=4 et :

0 comments on commit 4da5ef9

Please sign in to comment.