forked from TeskaLabs/cysimdjson
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
78 lines (74 loc) · 2.13 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
72
73
74
75
76
77
78
from setuptools import setup, Extension
from os import path
from Cython.Build import cythonize
import sys
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
extensions = [
Extension(
"cysimdjson.cysimdjson",
[
'cysimdjson/cysimdjson.pyx',
'cysimdjson/simdjson/simdjson.cpp',
'cysimdjson/pysimdjson/errors.cpp',
'cysimdjson/cysimdjsonc.cpp',
],
language="c++",
extra_compile_args=[
"-std=c++17", # for std::string_view class that became standard in C++17
"-Wno-deprecated",
] if sys.platform != "win32" else [ # NOTE Windows doesn't know how to handle "-Wno-deprecated"
"/std:c++17",
],
define_macros=[("CYTHON_EXTERN_C", 'extern "C"')], # https://cython.readthedocs.io/en/latest/src/userguide/external_C_code.html#c-public-declarations
)
]
setup(
name='cysimdjson',
version="24.12",
description='High-speed JSON parser',
long_description=long_description,
long_description_content_type='text/markdown',
author='TeskaLabs Ltd',
author_email='[email protected]',
platforms='any',
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
],
packages=[
"cysimdjson",
],
url='https://github.com/TeskaLabs/cysimdjson',
project_urls={
"Source": "https://github.com/TeskaLabs/cysimdjson",
'Tracker': 'https://github.com/TeskaLabs/cysimdjson/issues',
},
install_requires=[
],
setup_requires=[
"cython"
],
package_data={
"cysimdjson": [
"cysimdjson.pyx",
"cysimdjson.h",
"cysimdjsonc.h",
"jsoninter.h",
"pysimdjson/errors.h",
"simdjson/simdjson.h",
]
},
ext_modules=cythonize(extensions),
)