-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
56 lines (47 loc) · 1.63 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
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs
import os
import re
import sys
from setuptools import setup, find_packages
def read(*parts):
filename = os.path.join(os.path.dirname(__file__), *parts)
with codecs.open(filename, encoding='utf-8') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
install_requires = ['six>=1.10.0']
if sys.version_info[0:2] < (3, 4):
# required for python < 3.4
install_requires.append('singledispatch>=3.4.0.3')
setup(
name='json-encoder',
version=find_version('json_encoder', '__init__.py'),
author='NZME',
author_email='sysadmin@grabone.co.nz',
description='json encoder uses singledispatch pattern instead of '
'JSONEncoder class overwrites',
long_description=read('README.rst'),
setup_requires=['pytest-runner'],
install_requires=install_requires,
packages=find_packages(exclude=["tests"]),
include_package_data=True,
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
],
extras_require={
'simplejson': ['simplejson>=3.8.2'],
},
tests_require=['pytest']
)