-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
58 lines (49 loc) · 1.67 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup, find_packages
try:
import multiprocessing
except ImportError:
pass
def get_version():
with open(os.path.join('aserializer', '__init__.py')) as f:
for line in f:
if line.startswith('__version__ ='):
return line.split('=')[1].strip().strip('"\'')
long_description = (open('README.rst').read())
CLASSIFIERS = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
'Topic :: Software Development :: Libraries :: Python Modules',
]
extra_opts = {}
if "test" in sys.argv or "nosetests" in sys.argv:
extra_opts['tests_require'] = ['nose', 'coverage']
basic_setup = dict(
name='aserializer',
version=get_version(),
author='Ronald Martins',
author_email='[email protected]',
license='MIT',
description='An object serializer inspired by the django forms.',
long_description=long_description,
url='https://github.com/onyg/aserializer',
packages=find_packages(exclude=('tests', 'tests.*')),
platforms=['any'],
classifiers=CLASSIFIERS,
test_suite='nose.collector',
**extra_opts
)
setup(**basic_setup)