comparison setup.py @ 500:0742f421caba experimental-inline

Merged revisions 487-603 via svnmerge from http://svn.edgewall.org/repos/genshi/trunk
author cmlenz
date Fri, 01 Jun 2007 17:21:47 +0000
parents 55cf81951686
children 1837f39efd6f
comparison
equal deleted inserted replaced
499:869b7885a516 500:0742f421caba
18 import os 18 import os
19 try: 19 try:
20 from setuptools import setup 20 from setuptools import setup
21 except ImportError: 21 except ImportError:
22 from distutils.core import setup 22 from distutils.core import setup
23 import sys
23 24
24 25
25 class build_doc(Command): 26 class build_doc(Command):
26 description = 'Builds the documentation' 27 description = 'Builds the documentation'
27 user_options = [] 28 user_options = []
32 def finalize_options(self): 33 def finalize_options(self):
33 pass 34 pass
34 35
35 def run(self): 36 def run(self):
36 from docutils.core import publish_cmdline 37 from docutils.core import publish_cmdline
37 conf = os.path.join('doc', 'docutils.conf') 38 docutils_conf = os.path.join('doc', 'docutils.conf')
39 epydoc_conf = os.path.join('doc', 'epydoc.conf')
38 40
39 for source in glob('doc/*.txt'): 41 for source in glob('doc/*.txt'):
40 dest = os.path.splitext(source)[0] + '.html' 42 dest = os.path.splitext(source)[0] + '.html'
41 if not os.path.exists(dest) or \ 43 if not os.path.exists(dest) or \
42 os.path.getmtime(dest) < os.path.getmtime(source): 44 os.path.getmtime(dest) < os.path.getmtime(source):
43 print 'building documentation file %s' % dest 45 print 'building documentation file %s' % dest
44 publish_cmdline(writer_name='html', 46 publish_cmdline(writer_name='html',
45 argv=['--config=%s' % conf, source, dest]) 47 argv=['--config=%s' % docutils_conf, source,
48 dest])
49
50 try:
51 from epydoc import cli
52 old_argv = sys.argv[1:]
53 sys.argv[1:] = [
54 '--config=%s' % epydoc_conf,
55 '--no-private', # epydoc bug, not read from config
56 '--simple-term',
57 '--verbose'
58 ]
59 cli.cli()
60 sys.argv[1:] = old_argv
61
62 except ImportError:
63 print 'epydoc not installed, skipping API documentation.'
46 64
47 65
48 class test_doc(Command): 66 class test_doc(Command):
49 description = 'Tests the code examples in the documentation' 67 description = 'Tests the code examples in the documentation'
50 user_options = [] 68 user_options = []
61 doctest.testfile(filename, False, optionflags=doctest.ELLIPSIS) 79 doctest.testfile(filename, False, optionflags=doctest.ELLIPSIS)
62 80
63 81
64 setup( 82 setup(
65 name = 'Genshi', 83 name = 'Genshi',
66 version = '0.4', 84 version = '0.5',
67 description = 'A toolkit for stream-based generation of output for the web', 85 description = 'A toolkit for stream-based generation of output for the web',
68 long_description = \ 86 long_description = \
69 """Genshi is a Python library that provides an integrated set of components 87 """Genshi is a Python library that provides an integrated set of
70 for parsing, generating, and processing HTML, XML or other textual content for 88 components for parsing, generating, and processing HTML, XML or
71 output generation on the web. The major feature is a template language, which 89 other textual content for output generation on the web. The major
72 is heavily inspired by Kid.""", 90 feature is a template language, which is heavily inspired by Kid.""",
73 author = 'Edgewall Software', 91 author = 'Edgewall Software',
74 author_email = 'info@edgewall.org', 92 author_email = 'info@edgewall.org',
75 license = 'BSD', 93 license = 'BSD',
76 url = 'http://genshi.edgewall.org/', 94 url = 'http://genshi.edgewall.org/',
77 download_url = 'http://genshi.edgewall.org/wiki/Download', 95 download_url = 'http://genshi.edgewall.org/wiki/Download',
88 'Topic :: Software Development :: Libraries :: Python Modules', 106 'Topic :: Software Development :: Libraries :: Python Modules',
89 'Topic :: Text Processing :: Markup :: HTML', 107 'Topic :: Text Processing :: Markup :: HTML',
90 'Topic :: Text Processing :: Markup :: XML' 108 'Topic :: Text Processing :: Markup :: XML'
91 ], 109 ],
92 keywords = ['python.templating.engines'], 110 keywords = ['python.templating.engines'],
93 packages = ['genshi', 'genshi.template'], 111 packages = ['genshi', 'genshi.filters', 'genshi.template'],
94 test_suite = 'genshi.tests.suite', 112 test_suite = 'genshi.tests.suite',
95 113
96 extras_require = {'plugin': ['setuptools>=0.6a2']}, 114 extras_require = {'plugin': ['setuptools>=0.6a2']},
97 entry_points = """ 115 entry_points = """
98 [python.templating.engines] 116 [python.templating.engines]
99 genshi = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin] 117 genshi = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin]
100 genshi-markup = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin] 118 genshi-markup = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin]
101 genshi-text = genshi.template.plugin:TextTemplateEnginePlugin[plugin] 119 genshi-text = genshi.template.plugin:TextTemplateEnginePlugin[plugin]
102 """, 120 """,
103 121
104 cmdclass={'build_doc': build_doc, 'test_doc': test_doc} 122 cmdclass = {'build_doc': build_doc, 'test_doc': test_doc}
105 ) 123 )
Copyright (C) 2012-2017 Edgewall Software