forked from ponyorm/pony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
74 lines (61 loc) · 2.53 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
from distutils.core import setup
import sys
name = "pony"
version = "0.5-beta"
description = "Pony Object-Relational Mapper"
long_description = """Pony is an object-relational mapper. The most interesting feature of Pony is its ability to write queries to the database using generator expressions. Pony works with entities which are mapped to a SQL database. Using generator syntax for writing queries allows the user to formulate very eloquent queries. It increases the level of abstraction and allows a programmer to concentrate on the business logic of the application. For this purpose Pony analyzes the abstract syntax tree of a generator and translates it to its SQL equivalent.
Following is an example of a query in Pony:
select(p for p in Product if p.name.startswith('A') and p.cost <= 1000)
Pony translates queries to SQL using a specific database dialect. Currently Pony works with SQLite, MySQL, PostgreSQL and Oracle databases.
The package pony.orm.examples contains several examples.
Documenation is available at http://ponyorm.com"""
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: Free for non-commercial use",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries",
"Topic :: Database"
]
author = "Alexander Kozlovsky, Alexey Malashkevich"
author_email = "[email protected]"
url = "http://ponyorm.com"
lic = "AGPL"
modules = [
"pony.__init__",
"pony.converting",
"pony.options",
"pony.utils"
]
packages = [
"pony.orm",
"pony.orm.dbproviders",
"pony.orm.examples",
"pony.orm.tests",
"pony.thirdparty"
]
download_url = "http://pypi.python.org/pypi/pony/"
def main():
python_version = sys.version_info
if python_version < (2, 5) or python_version >= (2, 8):
s = "Sorry, but %s %s requires Python version 2.5, 2.6 or 2.7. You have version %s"
print s % (name, version, python_version.split(' ', 1)[0])
sys.exit(1)
setup(
name=name,
version=version,
description=description,
long_description=long_description,
classifiers=classifiers,
author=author,
author_email=author_email,
url=url,
license=lic,
packages=packages,
download_url=download_url,
py_modules=modules
)
if __name__ == "__main__":
main()