forked from handroll/handroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
121 lines (107 loc) · 4.12 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Copyright (c) 2017, Matt Layman
"""
Learn more about handroll at the `project home page
<http://handroll.github.io>`_. handroll development is done on `GitHub
<https://github.com/handroll/handroll>`_. Announcements and discussions happen
on `Google Groups <https://groups.google.com/forum/#!forum/handroll>`_.
handroll is a static website generator that uses markup languages like
Markdown, ReStructuredText, and Textile.
"""
from setuptools import find_packages, setup
from setuptools.command.build_py import build_py
from setuptools.command.sdist import sdist
import sys
import handroll
class BuildPy(build_py):
"""Custom ``build_py`` command to always build mo files for wheels."""
def run(self):
# Babel fails hard on Python 3. Let Python 2 make the mo files.
if sys.version_info < (3, 0, 0):
self.run_command('compile_catalog')
# build_py is an old style class so super cannot be used.
build_py.run(self)
class Sdist(sdist):
"""Custom ``sdist`` command to ensure that mo files are always created."""
def run(self):
self.run_command('compile_catalog')
# sdist is an old style class so super cannot be used.
sdist.run(self)
if __name__ == '__main__':
with open('docs/releases.rst', 'r') as f:
releases = f.read()
long_description = __doc__ + '\n\n' + releases
install_requires = [
'blinker',
'docutils',
'Jinja2',
'Markdown',
'mock',
'Pygments',
'PyYAML',
'smartypants',
'textile',
'watchdog',
'werkzeug',
]
setup(
name='handroll',
version=handroll.__version__,
url='http://handroll.github.io',
license='BSD',
author='Matt Layman',
author_email='matthewlayman@gmail.com',
description='A website generator for software artisans',
long_description=long_description,
packages=find_packages(),
entry_points={
'console_scripts': ['handroll = handroll.entry:main'],
'handroll.composers': [
'.atom = handroll.composers.atom:AtomComposer',
'.j2 = handroll.composers.j2:Jinja2Composer',
'.md = handroll.composers.md:MarkdownComposer',
'.rst = handroll.composers.rst:ReStructuredTextComposer',
'.sass = handroll.composers.sass:SassComposer',
'.scss = handroll.composers.sass:SassComposer',
'.textile = handroll.composers.txt:TextileComposer',
],
'handroll.extensions': [
'blog = handroll.extensions.blog:BlogExtension',
'open_graph = handroll.extensions.og:OpenGraphExtension',
'sitemap = handroll.extensions.sitemap:SitemapExtension',
'twitter = handroll.extensions.twitter:TwitterExtension',
]
},
include_package_data=True,
zip_safe=False,
platforms='any',
install_requires=install_requires,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Artistic Software',
'Topic :: Documentation',
'Topic :: Internet :: WWW/HTTP :: Site Management',
'Topic :: Office/Business :: News/Diary',
'Topic :: Software Development :: Documentation',
'Topic :: Text Processing :: Markup :: HTML',
],
keywords=[
'generator',
'Markdown',
'ReStructuredText',
'Textile',
],
cmdclass={
'build_py': BuildPy,
'sdist': Sdist,
},
)