root/livinglogic.python.xist/setup.py @ 3150:7d8c73cdf41e

Revision 3150:7d8c73cdf41e, 2.6 KB (checked in by Walter Doerwald <walter@…>, 12 years ago)

Change project description

Line 
1#! /usr/bin/env python
2# -*- coding: utf-8 -*-
3
4# Setup script for XIST
5
6
7try:
8    import setuptools as tools
9except ImportError:
10    from distutils import core as tools
11
12import textwrap
13
14
15DESCRIPTION = """
16XIST is an extensible HTML and XML generator. XIST is also a XML parser with a
17very simple and pythonesque tree API. Every XML element type corresponds to a
18Python class and these Python classes provide a conversion method to transform
19the XML tree (e.g. into HTML). XIST can be considered 'object oriented XSLT'.
20"""
21
22CLASSIFIERS="""
23Development Status :: 5 - Production/Stable
24Environment :: Web Environment
25Intended Audience :: Developers
26License :: OSI Approved :: MIT License
27Operating System :: OS Independent
28Programming Language :: Python
29Topic :: Internet :: WWW/HTTP :: Dynamic Content
30Topic :: Internet :: WWW/HTTP :: Site Management
31Topic :: Software Development :: Libraries :: Python Modules
32Topic :: Text Processing :: Markup :: HTML
33Topic :: Text Processing :: Markup :: XML
34"""
35
36KEYWORDS = """
37XML
38HTML
39XHTML
40XSLT
41HSC
42XSL-FO
43SVG
44WML
45iHTML
46Relax NG
47"""
48
49try:
50    news = list(open("NEWS.rst", "r"))
51except IOError:
52    description = DESCRIPTION.strip()
53else:
54    underlines = [i for (i, line) in enumerate(news) if line.startswith("---")]
55    news = news[underlines[0]-1:underlines[1]-1]
56    news = "".join(news)
57    description = "%s\n\n\n%s" % (DESCRIPTION.strip(), news)
58
59
60args = dict(
61    name="ll-xist",
62    version="3.1",
63    description="Extensible HTML/XML generator",
64    long_description=description,
65    author="Walter Doerwald",
66    author_email="walter@livinglogic.de",
67    url="http://www.livinglogic.de/Python/xist/",
68    download_url="http://www.livinglogic.de/Python/xist/Download.html",
69    license="MIT",
70    classifiers=CLASSIFIERS.strip().splitlines(),
71    keywords=",".join(KEYWORDS.strip().splitlines()),
72    package_dir={"": "src"},
73    packages=["ll", "ll.xist", "ll.xist.ns", "ll.xist.scripts"],
74    ext_modules=[
75        tools.Extension("ll.xist.helpers", ["src/ll/xist/helpers.c", "src/ll/xist/helpers_include.c"]),
76        tools.Extension("ll.xist.sgmlop", ["src/ll/xist/sgmlop.c"], define_macros=[("SGMLOP_UNICODE_SUPPORT", None)]),
77    ],
78    entry_points=dict(
79        console_scripts=[
80            "dtd2xsc = ll.xist.scripts.dtd2xsc:main",
81            "tld2xsc = ll.xist.scripts.tld2xsc:main",
82            "doc2txt = ll.xist.scripts.doc2txt:main",
83            "xml2xsc = ll.xist.scripts.xml2xsc:main",
84        ]
85    ),
86    scripts=[
87        "scripts/dtd2xsc.py",
88        "scripts/tld2xsc.py",
89        "scripts/doc2txt.py",
90        "scripts/xml2xsc.py",
91    ],
92    install_requires=[
93        "ll-core >= 1.11",
94        "cssutils == 0.9.4b1",
95    ],
96    namespace_packages=["ll"],
97    zip_safe=False,
98)
99
100
101if __name__ == "__main__":
102    tools.setup(**args)
Note: See TracBrowser for help on using the browser.