-
Notifications
You must be signed in to change notification settings - Fork 23
/
setup.py
71 lines (59 loc) · 1.97 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
try:
from imp import load_source
except ImportError:
import importlib.util
import importlib.machinery
def load_source(modname, filename):
loader = importlib.machinery.SourceFileLoader(modname, filename)
spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
module = importlib.util.module_from_spec(spec)
# The module is always executed and not cached in sys.modules.
# Uncomment the following line to cache the module.
# sys.modules[module.__name__] = module
loader.exec_module(module)
return module
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.md')).read()
except Exception:
README = ''
CHANGES = ''
# Use imp/importlib to avoid sift/__init__.py
version_mod = load_source('__tmp', os.path.join(here, 'sift/version.py'))
setup(
name='Sift',
description='Python bindings for Sift Science\'s API',
version=version_mod.VERSION,
url='https://siftscience.com',
python_requires=">=2.7",
author='Sift Science',
author_email='[email protected]',
long_description_content_type="text/markdown",
long_description=README + '\n\n' + CHANGES,
packages=['sift'],
install_requires=[
"requests >= 0.14.1",
"six >= 1.16.0",
],
extras_require={
'test': [
'mock >= 1.0.1',
'unittest2 >= 1, < 2',
],
},
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)