root/livinglogic.python.orasql/setup.py @ 234:62c163941626

Revision 234:62c163941626, 2.4 KB (checked in by Walter Doerwald <walter@…>, 12 years ago)

The fancy fetch methods have been renamed to :meth:xfetchone,
:meth:xfetchmany, :meth:xfetchall and :meth:xfetch. :meth:__iter__
no longer gets overwritten. New methods :meth:xexecute and
:meth:xexecutemany have been added, that support passing unicode
parameters.

Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
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, re
13
14
15DESCRIPTION = """
16ll-orasql contains utilities for working with :mod:`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    # Extract the first section (which are the changes for the current version)
47    underlines = [i for (i, line) in enumerate(news) if line.startswith("---")]
48    news = news[underlines[0]-1:underlines[1]-1]
49    news = "".join(news)
50    descr = "%s\n\n\n%s" % (DESCRIPTION.strip(), news)
51
52    # Get rid of text roles PyPI doesn't know about
53    descr = re.subn(":[a-z]+:`([a-zA-Z0-9_.]+)`", "``\\1``", descr)[0]
54
55
56args=dict(
57    name="ll-orasql",
58    version="1.20",
59    description="Utilities for working with cx_Oracle",
60    long_description=descr,
61    author=u"Walter Doerwald",
62    author_email="walter@livinglogic.de",
63    url="http://www.livinglogic.de/Python/orasql/",
64    download_url="http://www.livinglogic.de/Python/Download.html#orasql",
65    license="Python",
66    classifiers=CLASSIFIERS.strip().splitlines(),
67    keywords=",".join(KEYWORDS.strip().splitlines()),
68    packages=["ll", "ll.orasql", "ll.orasql.scripts"],
69    package_dir={"": "src"},
70    entry_points=dict(
71        console_scripts=[
72            "oracreate = ll.orasql.scripts.oracreate:main",
73            "oradrop = ll.orasql.scripts.oradrop:main",
74            "oradiff = ll.orasql.scripts.oradiff:main",
75            "oramerge = ll.orasql.scripts.oramerge:main",
76            "oragrant = ll.orasql.scripts.oragrant:main",
77        ]
78    ),
79    scripts=[
80        "scripts/oracreate.py",
81        "scripts/oradrop.py",
82        "scripts/oradiff.py",
83        "scripts/oramerge.py",
84        "scripts/oragrant.py",
85    ],
86    install_requires=[
87        "ll-xist >= 3.2",
88        "cx_Oracle >= 4.2.1",
89    ],
90    namespace_packages=["ll"],
91    zip_safe=False,
92    dependency_links=[
93        "http://sourceforge.net/project/showfiles.php?group_id=84168", # cx_Oracle
94    ]
95)
96
97
98if __name__ == "__main__":
99    tools.setup(**args)
Note: See TracBrowser for help on using the browser.