-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
65 lines (56 loc) · 1.71 KB
/
setup.py
File metadata and controls
65 lines (56 loc) · 1.71 KB
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
# We need the following ignores because of this pylint bug: https://github.com/PyCQA/pylint/issues/73
from distutils.core import Extension, setup # pylint: disable=no-name-in-module,import-error
import os
from setuptools import find_packages
ROOT = os.path.dirname(__file__)
POSSIBLY_CYTHONIZE = [
'charon/codec.py',
'charon/codec_registry.py',
'charon/extensions/standard_registry.py',
]
try:
from Cython.Build import cythonize
EXTENSIONS = cythonize(POSSIBLY_CYTHONIZE)
except ImportError:
print('Not using Cython') # dumb_style_checker:disable = print-statement
EXTENSIONS = [
Extension(os.path.splitext(file_name)[0], [file_name.replace('.py', '.c')])
for file_name in POSSIBLY_CYTHONIZE
if os.path.isfile(file_name.replace('.py', '.c'))
]
def read(relpath: str) -> str:
with open(os.path.join(os.path.dirname(__file__), relpath)) as f:
return f.read()
setup(
name = 'ql-charon',
version = open(os.path.join(ROOT, 'version.txt')).read().strip(),
description = 'Serialization library as a replacement for pickle',
long_description = read('README.rst'),
author = 'Quantlane',
author_email = 'code@quantlane.com',
url = 'https://github.com/qntln/charon',
install_requires = [
'setuptools>=18.5',
'python-dateutil>=2.4.2,<3.0.0',
'click>=6.7,<7.0',
],
scripts = ['bin/charon_ast_hash'],
packages = list(find_packages(
include = [
'charon',
'charon.*'
],
exclude = [
'*.tests',
]
)),
ext_modules = EXTENSIONS,
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
)