root/livinglogic.python.orasql/setup.py @ 210:efce03513e48

Revision 210:efce03513e48, 2.3 KB (checked in by Walter Doerwald <walter@…>, 12 years ago)

Add ReST version of the documentation.

Line 
1#!/usr/bin/env python
2# -*- coding: iso-8859-1 -*-
3
4# Setup script for ll-orasql
5
6
7try:
8    import setuptools as tools
9except ImportError:
10    from distutils import core as tools
11
12import textwrap
13
14
15DESCRIPTION = """
16ll-orasql contains utilities for working with ``cx_Oracle``: It allows
17calling Oracle procedures via keyword arguments, it wraps the result of
18fetch calls in a custom dictionary and it contains some utilitiy functions
19and scripts for accessing and copying database metadata.
20"""
21
22CLASSIFIERS="""
23Development Status :: 4 - Beta
24Intended Audience :: Developers
25License :: OSI Approved :: Python License (CNRI Python License)
26Operating System :: OS Independent
27Programming Language :: Python
28Topic :: Database
29"""
30
31KEYWORDS = """
32database
33Oracle
34cx_Oracle
35record
36procedure
37schema
38"""
39
40
41try:
42    news = list(open("NEWS.rst", "r"))
43except IOError:
44    description = DESCRIPTION.strip()
45else:
46    underlines = [i for (i, line) in enumerate(news) if line.startswith("---")]
47    news = news[underlines[0]-1:underlines[1]-1]
48    news = "".join(news)
49    description = "%s\n\n\n%s" % (DESCRIPTION.strip(), news)
50
51
52args=dict(
53    name="ll-orasql",
54    version="1.18",
55    description="Utilities for working with cx_Oracle",
56    long_description=description,
57    author=u"Walter Doerwald",
58    author_email="walter@livinglogic.de",
59    url="http://www.livinglogic.de/Python/orasql/",
60    download_url="http://www.livinglogic.de/Python/orasql/Download.html",
61    license="Python",
62    classifiers=CLASSIFIERS.strip().splitlines(),
63    keywords=",".join(KEYWORDS.strip().splitlines()),
64    packages=["ll", "ll.orasql", "ll.orasql.scripts"],
65    package_dir={"": "src"},
66    entry_points=dict(
67        console_scripts=[
68            "oracreate = ll.orasql.scripts.oracreate:main",
69            "oradrop = ll.orasql.scripts.oradrop:main",
70            "oradiff = ll.orasql.scripts.oradiff:main",
71            "oramerge = ll.orasql.scripts.oramerge:main",
72            "oragrant = ll.orasql.scripts.oragrant:main",
73        ]
74    ),
75    scripts=[
76        "scripts/oracreate.py",
77        "scripts/oradrop.py",
78        "scripts/oradiff.py",
79        "scripts/oramerge.py",
80        "scripts/oragrant.py",
81    ],
82    install_requires=[
83        "ll-core >= 1.7.3",
84        "cx_Oracle >= 4.2.1",
85    ],
86    namespace_packages=["ll"],
87    zip_safe=False,
88    dependency_links=[
89        "http://sourceforge.net/project/showfiles.php?group_id=84168", # cx_Oracle
90    ]
91)
92
93
94if __name__ == "__main__":
95    tools.setup(**args)
Note: See TracBrowser for help on using the browser.