|
1 | 1 | #!/usr/bin/env python |
2 | 2 | from setuptools import setup, find_packages |
3 | 3 |
|
4 | | -__VERSION__ = [line for line in file('datatables/__init__.py', 'rb') \ |
5 | | - if line.startswith('__VERSION__')][0].split(\ |
6 | | - '=')[1].strip().lstrip('\'').rstrip('\'') |
| 4 | +import sys |
| 5 | + |
| 6 | +if sys.version_info >= (3,0): |
| 7 | + def my_open(path, mode): |
| 8 | + return open(path, mode, newline='') |
| 9 | +else: |
| 10 | + def my_open(path, mode): |
| 11 | + return open(path, mode+'b') |
| 12 | + |
| 13 | + |
| 14 | +__VERSION__ = [line for line in my_open('datatables/__init__.py', 'r') \ |
| 15 | + if line.startswith('__VERSION__')][0].split(\ |
| 16 | + '=')[1].strip().lstrip('\'').rstrip('\'') |
| 17 | + |
7 | 18 |
|
8 | 19 | setup( |
9 | 20 | name='sqlalchemy-datatables', |
|
21 | 32 | install_requires=['sqlalchemy'], |
22 | 33 | py_modules=['datatables'], |
23 | 34 | classifiers=[ |
24 | | - 'Development Status :: 4 - Beta', |
| 35 | + 'Development Status :: 5 - Production/Stable', |
25 | 36 | 'Environment :: Web Environment', |
26 | 37 | 'Framework :: Pyramid', |
| 38 | + 'Framework :: Flask', |
27 | 39 | 'Intended Audience :: Developers', |
28 | 40 | 'License :: OSI Approved :: MIT License', |
| 41 | + 'Natural Language :: English', |
29 | 42 | 'Operating System :: OS Independent', |
30 | 43 | 'Programming Language :: Python', |
| 44 | + 'Programming Language :: Python :: 2', |
| 45 | + 'Programming Language :: Python :: 2.6', |
31 | 46 | 'Programming Language :: Python :: 2.7', |
| 47 | + 'Programming Language :: Python :: 3', |
| 48 | + 'Programming Language :: Python :: 3.2', |
| 49 | + 'Programming Language :: Python :: 3.3', |
32 | 50 | 'Topic :: Internet :: WWW/HTTP', |
33 | 51 | 'Topic :: Software Development :: Libraries', |
34 | 52 | 'Topic :: Software Development :: Libraries :: Python Modules', |
|
0 commit comments