diff --git a/setup.py b/setup.py index 93d7e5f6..01d40ae4 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +from os import walk +from os.path import join, relpath, dirname + from setuptools import setup requires = ['feedgenerator >= 1.6', 'jinja2 >= 2.7', 'pygments', 'docutils', @@ -14,11 +17,9 @@ entry_points = { ] } - README = open('README.rst').read() CHANGELOG = open('docs/changelog.rst').read() - setup( name="pelican", version="3.6.1.dev", @@ -29,7 +30,19 @@ setup( "Markdown input files.", long_description=README + '\n' + CHANGELOG, packages=['pelican', 'pelican.tools'], - include_package_data=True, + package_data={ + # we manually collect the package data, as opposed to using include_package_data=True + # because we don't want the tests to be included automatically as package data + # (MANIFEST.in is too greedy) + 'pelican': [ + relpath(join(root, name), 'pelican') + for root, _, names in walk(join('pelican', 'themes')) for name in names + ], + 'pelican.tools': [ + relpath(join(root, name), join('pelican', 'tools')) + for root, _, names in walk(join('pelican', 'tools', 'templates')) for name in names + ], + }, install_requires=requires, entry_points=entry_points, classifiers=[