annotate setup.py @ 586:5413c9d95db1

Fixes for nonlocal variable access in code blocks, as well as nested function and class definitions.
author cmlenz
date Wed, 08 Aug 2007 22:21:21 +0000
parents e0d57ab9b0be
children f436c7db99f5
rev   line source
1
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
1 #!/usr/bin/env python
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
2 # -*- coding: utf-8 -*-
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
3 #
66
822089ae65ce Switch copyright to Edgewall and URLs to markup.edgewall.org.
cmlenz
parents: 27
diff changeset
4 # Copyright (C) 2006 Edgewall Software
1
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
5 # All rights reserved.
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
6 #
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
7 # This software is licensed as described in the file COPYING, which
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
8 # you should have received as part of this distribution. The terms
230
24757b771651 Renamed Markup to Genshi in repository.
cmlenz
parents: 215
diff changeset
9 # are also available at http://genshi.edgewall.org/wiki/License.
1
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
10 #
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
11 # This software consists of voluntary contributions made by many
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
12 # individuals. For the exact contribution history, see the revision
230
24757b771651 Renamed Markup to Genshi in repository.
cmlenz
parents: 215
diff changeset
13 # history and logs, available at http://genshi.edgewall.org/log/.
1
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
14
382
d7da3fba7faf * Added documentation for the various stream event kinds.
cmlenz
parents: 336
diff changeset
15 from distutils.cmd import Command
541
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
16 from distutils.command.build_ext import build_ext
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
17 from distutils.errors import CCompilerError
382
d7da3fba7faf * Added documentation for the various stream event kinds.
cmlenz
parents: 336
diff changeset
18 import doctest
d7da3fba7faf * Added documentation for the various stream event kinds.
cmlenz
parents: 336
diff changeset
19 from glob import glob
d7da3fba7faf * Added documentation for the various stream event kinds.
cmlenz
parents: 336
diff changeset
20 import os
84
894576e2b813 Make dependency of the setup script on setuptools optional.
cmlenz
parents: 66
diff changeset
21 try:
541
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
22 from setuptools import setup, Extension, Feature
84
894576e2b813 Make dependency of the setup script on setuptools optional.
cmlenz
parents: 66
diff changeset
23 except ImportError:
541
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
24 from distutils.core import setup, Extension
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
25 Feature = None
426
a0711da164ac Add epydoc-based API doc generation to the build.
cmlenz
parents: 394
diff changeset
26 import sys
1
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
27
585
e0d57ab9b0be Documentation stuff moved to a common shared repository.
cmlenz
parents: 541
diff changeset
28 sys.path.append(os.path.join('doc', 'common'))
e0d57ab9b0be Documentation stuff moved to a common shared repository.
cmlenz
parents: 541
diff changeset
29 try:
e0d57ab9b0be Documentation stuff moved to a common shared repository.
cmlenz
parents: 541
diff changeset
30 from doctools import build_doc, test_doc
e0d57ab9b0be Documentation stuff moved to a common shared repository.
cmlenz
parents: 541
diff changeset
31 except ImportError:
e0d57ab9b0be Documentation stuff moved to a common shared repository.
cmlenz
parents: 541
diff changeset
32 build_doc = test_doc = None
394
ebc7c1a3bc4d Minor doc fixes.
cmlenz
parents: 382
diff changeset
33
ebc7c1a3bc4d Minor doc fixes.
cmlenz
parents: 382
diff changeset
34
541
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
35 class optional_build_ext(build_ext):
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
36 # This class allows C extension building to fail.
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
37 def build_extension(self, ext):
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
38 try:
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
39 build_ext.build_extension(self, ext)
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
40 except CCompilerError, x:
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
41 print '*' * 70
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
42 print """WARNING:
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
43 An optional C extension could not be compiled, speedups will not be
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
44 available."""
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
45 print '*' * 70
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
46
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
47
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
48 if Feature:
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
49 speedups = Feature(
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
50 "optionial C speed-enhancements",
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
51 standard = True,
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
52 ext_modules = [
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
53 Extension('genshi._speedups', ['genshi/_speedups.c']),
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
54 ],
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
55 )
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
56 else:
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
57 speedups = None
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
58
1
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
59 setup(
230
24757b771651 Renamed Markup to Genshi in repository.
cmlenz
parents: 215
diff changeset
60 name = 'Genshi',
455
e1159958d163 Bump up version number on trunk.
cmlenz
parents: 452
diff changeset
61 version = '0.5',
230
24757b771651 Renamed Markup to Genshi in repository.
cmlenz
parents: 215
diff changeset
62 description = 'A toolkit for stream-based generation of output for the web',
148
a0a52cf4e4de Added changelog file, plus some README and setup tweaks.
cmlenz
parents: 145
diff changeset
63 long_description = \
452
0ed55216e8f2 Add `filters` package in `setup.py`.
cmlenz
parents: 426
diff changeset
64 """Genshi is a Python library that provides an integrated set of
0ed55216e8f2 Add `filters` package in `setup.py`.
cmlenz
parents: 426
diff changeset
65 components for parsing, generating, and processing HTML, XML or
0ed55216e8f2 Add `filters` package in `setup.py`.
cmlenz
parents: 426
diff changeset
66 other textual content for output generation on the web. The major
0ed55216e8f2 Add `filters` package in `setup.py`.
cmlenz
parents: 426
diff changeset
67 feature is a template language, which is heavily inspired by Kid.""",
148
a0a52cf4e4de Added changelog file, plus some README and setup tweaks.
cmlenz
parents: 145
diff changeset
68 author = 'Edgewall Software',
a0a52cf4e4de Added changelog file, plus some README and setup tweaks.
cmlenz
parents: 145
diff changeset
69 author_email = 'info@edgewall.org',
a0a52cf4e4de Added changelog file, plus some README and setup tweaks.
cmlenz
parents: 145
diff changeset
70 license = 'BSD',
230
24757b771651 Renamed Markup to Genshi in repository.
cmlenz
parents: 215
diff changeset
71 url = 'http://genshi.edgewall.org/',
256
3ea3977c8c4d Fix download URL.
cmlenz
parents: 255
diff changeset
72 download_url = 'http://genshi.edgewall.org/wiki/Download',
148
a0a52cf4e4de Added changelog file, plus some README and setup tweaks.
cmlenz
parents: 145
diff changeset
73 zip_safe = True,
a0a52cf4e4de Added changelog file, plus some README and setup tweaks.
cmlenz
parents: 145
diff changeset
74
124
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
75 classifiers = [
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
76 'Development Status :: 4 - Beta',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
77 'Environment :: Web Environment',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
78 'Intended Audience :: Developers',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
79 'License :: OSI Approved :: BSD License',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
80 'Operating System :: OS Independent',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
81 'Programming Language :: Python',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
82 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
83 'Topic :: Software Development :: Libraries :: Python Modules',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
84 'Topic :: Text Processing :: Markup :: HTML',
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
85 'Topic :: Text Processing :: Markup :: XML'
9a2acebe84f7 Add Trove classifiers and download URL to `setup.py`.
cmlenz
parents: 84
diff changeset
86 ],
215
e92135672812 A couple of minor XPath fixes.
cmlenz
parents: 189
diff changeset
87 keywords = ['python.templating.engines'],
452
0ed55216e8f2 Add `filters` package in `setup.py`.
cmlenz
parents: 426
diff changeset
88 packages = ['genshi', 'genshi.filters', 'genshi.template'],
230
24757b771651 Renamed Markup to Genshi in repository.
cmlenz
parents: 215
diff changeset
89 test_suite = 'genshi.tests.suite',
84
894576e2b813 Make dependency of the setup script on setuptools optional.
cmlenz
parents: 66
diff changeset
90
530
588ba862c0f7 Add extra for I18n.
cmlenz
parents: 528
diff changeset
91 extras_require = {
588ba862c0f7 Add extra for I18n.
cmlenz
parents: 528
diff changeset
92 'i18n': ['Babel>=0.8'],
588ba862c0f7 Add extra for I18n.
cmlenz
parents: 528
diff changeset
93 'plugin': ['setuptools>=0.6a2']
588ba862c0f7 Add extra for I18n.
cmlenz
parents: 528
diff changeset
94 },
4
f8612f05af99 Added first stab of an implementation of the !TurboGears [http://www.turbogears.org/docs/plugins/template.html plugin API for template engines], and also a !TurboGears-based example using this plugin. Both written by Matt Good.
cmlenz
parents: 1
diff changeset
95 entry_points = """
528
f38ce008ab0a Integrated [http://babel.edgewall.org/ Babel] message extraction plugin, and added I18n doc page.
cmlenz
parents: 508
diff changeset
96 [babel.extractors]
530
588ba862c0f7 Add extra for I18n.
cmlenz
parents: 528
diff changeset
97 genshi = genshi.filters.i18n:extract[i18n]
528
f38ce008ab0a Integrated [http://babel.edgewall.org/ Babel] message extraction plugin, and added I18n doc page.
cmlenz
parents: 508
diff changeset
98
4
f8612f05af99 Added first stab of an implementation of the !TurboGears [http://www.turbogears.org/docs/plugins/template.html plugin API for template engines], and also a !TurboGears-based example using this plugin. Both written by Matt Good.
cmlenz
parents: 1
diff changeset
99 [python.templating.engines]
336
5f2c7782cd8a Refactoring: `genshi.template` is now a package, it was getting way to crowded in that file.
cmlenz
parents: 265
diff changeset
100 genshi = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin]
5f2c7782cd8a Refactoring: `genshi.template` is now a package, it was getting way to crowded in that file.
cmlenz
parents: 265
diff changeset
101 genshi-markup = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin]
5f2c7782cd8a Refactoring: `genshi.template` is now a package, it was getting way to crowded in that file.
cmlenz
parents: 265
diff changeset
102 genshi-text = genshi.template.plugin:TextTemplateEnginePlugin[plugin]
4
f8612f05af99 Added first stab of an implementation of the !TurboGears [http://www.turbogears.org/docs/plugins/template.html plugin API for template engines], and also a !TurboGears-based example using this plugin. Both written by Matt Good.
cmlenz
parents: 1
diff changeset
103 """,
382
d7da3fba7faf * Added documentation for the various stream event kinds.
cmlenz
parents: 336
diff changeset
104
541
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
105 features = {'speedups': speedups},
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
106 cmdclass = {'build_doc': build_doc, 'test_doc': test_doc,
4a53763b3948 Merged cspeedups branch into trunk.
cmlenz
parents: 530
diff changeset
107 'build_ext': optional_build_ext}
1
821114ec4f69 Initial import.
cmlenz
parents:
diff changeset
108 )
Copyright (C) 2012-2017 Edgewall Software