forked from mkdocs/mkdocs-bootswatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·69 lines (58 loc) · 2.02 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
from setuptools import setup, find_packages
from distutils.core import Command
import os
VERSION = '0.4.0'
class generate_themes(Command):
""" Generate complete themes from respective parts. """
description = 'generate complete themes from respective parts'
user_options = [
('force', 'f', 'forcibly build everything (ignore file timestamps)')
]
boolean_options = ['force']
def initialize_options(self):
self.force = None
def finalize_options(self):
self.set_undefined_options(
'build',
('force', 'force')
)
def run(self):
""" Copy respective parts of themes to destination. """
base = os.path.join('src', '_base')
for theme in os.listdir('src'):
srcdir = os.path.join('src', theme)
if os.path.isdir(srcdir) and srcdir != base:
outdir = os.path.join('mkdocs_bootswatch', theme)
self.copy_tree(base, outdir)
self.copy_tree(srcdir, outdir)
setup(
name="mkdocs-bootswatch",
version=VERSION,
url='http://www.mkdocs.org',
license='BSD',
description='Bootswatch themes for MkDocs',
author='Dougal Matthews',
author_email='dougal@dougalmatthews.com',
packages=find_packages(),
include_package_data=True,
cmdclass={
'gen_themes': generate_themes,
},
entry_points={
'mkdocs.themes': [
'amelia = mkdocs_bootswatch.amelia',
'cerulean = mkdocs_bootswatch.cerulean',
'cosmo = mkdocs_bootswatch.cosmo',
'cyborg = mkdocs_bootswatch.cyborg',
'flatly = mkdocs_bootswatch.flatly',
'journal = mkdocs_bootswatch.journal',
'readable = mkdocs_bootswatch.readable',
'simplex = mkdocs_bootswatch.simplex',
'slate = mkdocs_bootswatch.slate',
'spacelab = mkdocs_bootswatch.spacelab',
'united = mkdocs_bootswatch.united',
'yeti = mkdocs_bootswatch.yeti',
]
},
zip_safe=False
)