|
2 | 2 | import os |
3 | 3 | import sys |
4 | 4 |
|
| 5 | +install_requires = ['regex'] |
5 | 6 |
|
6 | | -if __name__ == '__main__': |
7 | | - install_requires = ['regex'] |
| 7 | +try: |
| 8 | + from collections import OrderedDict |
| 9 | +except ImportError: |
| 10 | + install_requires.extend(['ordereddict>=1.1']) |
8 | 11 |
|
9 | | - try: |
10 | | - from collections import OrderedDict |
11 | | - except ImportError: |
12 | | - install_requires.extend(['ordereddict>=1.1']) |
| 12 | +if 'develop' in sys.argv: |
| 13 | + install_requires.extend([ |
| 14 | + 'tox', |
| 15 | + ]) |
13 | 16 |
|
14 | | - if 'develop' in sys.argv: |
15 | | - install_requires.extend([ |
16 | | - 'tox', |
17 | | - ]) |
| 17 | +def get_version(): |
| 18 | + basedir = os.path.dirname(__file__) |
| 19 | + with open(os.path.join(basedir, 'textile/version.py')) as f: |
| 20 | + variables = {} |
| 21 | + exec(f.read(), variables) |
| 22 | + return variables.get('VERSION') |
| 23 | + raise RuntimeError('No version info found.') |
18 | 24 |
|
19 | | - def get_version(): |
20 | | - basedir = os.path.dirname(__file__) |
21 | | - with open(os.path.join(basedir, 'textile/version.py')) as f: |
22 | | - variables = {} |
23 | | - exec(f.read(), variables) |
24 | | - return variables.get('VERSION') |
25 | | - raise RuntimeError('No version info found.') |
| 25 | +setup( |
| 26 | + name='textile', |
| 27 | + version=get_version(), |
| 28 | + description='Textile processing for python.', |
| 29 | + url='http://github.com/ikirudennis/python-textile', |
| 30 | + packages=find_packages(), |
| 31 | + classifiers=[ |
| 32 | + 'Development Status :: 5 - Production/Stable', |
| 33 | + 'Environment :: Web Environment', |
| 34 | + 'Intended Audience :: Developers', |
| 35 | + 'License :: OSI Approved :: BSD License', |
| 36 | + 'Operating System :: OS Independent', |
| 37 | + 'Programming Language :: Python', |
| 38 | + 'Topic :: Software Development :: Libraries :: Python Modules', |
| 39 | + ], |
| 40 | + keywords='textile,text', |
| 41 | + install_requires=install_requires, |
| 42 | + test_suite='nose.collector', |
| 43 | + tests_require=['nose'], |
| 44 | + include_package_data=True, |
| 45 | + zip_safe=False, |
| 46 | +) |
26 | 47 |
|
27 | | - setup( |
28 | | - name='textile', |
29 | | - version=get_version(), |
30 | | - description='Textile processing for python.', |
31 | | - url='http://github.com/ikirudennis/python-textile', |
32 | | - packages=find_packages(), |
33 | | - classifiers=[ |
34 | | - 'Development Status :: 5 - Production/Stable', |
35 | | - 'Environment :: Web Environment', |
36 | | - 'Intended Audience :: Developers', |
37 | | - 'License :: OSI Approved :: BSD License', |
38 | | - 'Operating System :: OS Independent', |
39 | | - 'Programming Language :: Python', |
40 | | - 'Topic :: Software Development :: Libraries :: Python Modules', |
41 | | - ], |
42 | | - keywords='textile,text', |
43 | | - install_requires=install_requires, |
44 | | - test_suite='nose.collector', |
45 | | - tests_require=['nose'], |
46 | | - include_package_data=True, |
47 | | - zip_safe=False, |
48 | | - ) |
0 commit comments