-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
83 lines (71 loc) · 2.96 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
#!/usr/bin/env python
# Python imports.
import re
import sys
# Distutils imports.
from distutils.core import setup
# pyxslt imports.
import pyxslt
# Get the metadata from the pyxslt package.
VERSION = str(pyxslt.__version__)
(AUTHOR, EMAIL) = re.match('^(.*?)\s*<(.*)>$', pyxslt.__author__).groups()
URL = pyxslt.__url__
LICENSE = pyxslt.__license__
# Patch distutils if it can't cope with the 'classifiers' or
# 'download_url' keywords.
from sys import version
if version < '2.2.3':
from distutils.dist import DistributionMetadata
DistributionMetadata.classifiers = None
DistributionMetadata.download_url = None
# Set the long description.
long_description = """
pyxslt makes it easy to turn Python objects into XML documents. In
addition to basic XML serialization, pyxslt can also apply an XSL
stylesheet to the serialized XML fragments. You could, for example, use
pyxslt to convert the results of an SQLObject_ query to an XHTML file.
All Python objects given to pyxslt are converted into their string
representations. pyxslt focuses on serializing objects in such a way as
to make the construction of XSL stylesheets as easy as possible. As a
result, pyxslt's XML serialization is usually not reversible.
In other words, pyxslt is not a replacement for pickle_, marshal_,
shelve_, or any of the other true serialization modules. pyxslt is
designed with one-way XSL transformation in mind.
pyxslt makes use of libxml2_ to build its internal XML documents and
libxslt_ to perform XSL transformations. Both packages must be
installed in order for pyxslt to do its job.
.. _SQLObject: http://sqlobject.org/
.. _pickle: http://docs.python.org/lib/module-pickle.html
.. _marshal: http://docs.python.org/lib/module-marshal.html
.. _shelve: http://docs.python.org/lib/module-shelve.html
.. _libxml2: http://xmlsoft.org/
.. _libxslt: http://xmlsoft.org/XSLT/
"""
# Configure distutils.
setup(name='pyxslt',
version=VERSION,
description='Serialize Python objects to XML using an XSL stylesheet.',
long_description=long_description,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Text Processing :: Markup :: HTML',
'Topic :: Text Processing :: Markup :: XML',
],
author=AUTHOR,
author_email=EMAIL,
license=LICENSE,
url=URL,
scripts=['scripts/pyxslt'],
packages=['pyxslt'])