Skip to content

Commit 8155822

Browse files
mindwgsnedders
authored andcommitted
use find_packages for simplicity in setup.py
1 parent cfa3ba8 commit 8155822

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

setup.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import codecs
44

5-
from setuptools import setup
5+
from setuptools import setup, find_packages
66

77

88
classifiers = [
@@ -22,11 +22,6 @@
2222
'Topic :: Text Processing :: Markup :: HTML'
2323
]
2424

25-
packages = ['html5lib'] + ['html5lib.' + name
26-
for name in os.listdir(os.path.join('html5lib'))
27-
if os.path.isdir(os.path.join('html5lib', name)) and
28-
not name.startswith('.') and name != 'tests']
29-
3025
current_dir = os.path.dirname(__file__)
3126
with codecs.open(os.path.join(current_dir, 'README.rst'), 'r', 'utf8') as readme_file:
3227
with codecs.open(os.path.join(current_dir, 'CHANGES.rst'), 'r', 'utf8') as changes_file:
@@ -53,7 +48,7 @@
5348
classifiers=classifiers,
5449
maintainer='James Graham',
5550
maintainer_email='[email protected]',
56-
packages=packages,
51+
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
5752
install_requires=[
5853
'six',
5954
'webencodings',

0 commit comments

Comments
 (0)