-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
87 lines (78 loc) · 2.43 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
79
80
81
82
83
84
85
86
87
import os
import platform
from importlib.machinery import SourceFileLoader
from setuptools import Extension, setup
module_name = "caio"
module = SourceFileLoader(
"version", os.path.join(module_name, "version.py"),
).load_module()
OS_NAME = platform.system().lower()
extensions = []
if "darwin" in OS_NAME or "linux" in OS_NAME:
extensions.append(
Extension(
"{}.thread_aio".format(module_name),
[
"{}/thread_aio.c".format(module_name),
"{}/src/threadpool/threadpool.c".format(module_name),
],
extra_compile_args=["-g"],
),
)
if "linux" in OS_NAME:
extensions.append(
Extension(
"{}.linux_aio".format(module_name),
["{}/linux_aio.c".format(module_name)],
extra_compile_args=["-g"],
),
)
setup(
name=module_name,
version=module.__version__,
ext_modules=extensions,
include_package_data=True,
description=module.package_info,
long_description=open("README.rst").read(),
license=module.package_license,
author=module.__author__,
author_email=module.team_email,
package_data={
module_name: [
"{}/linux_aio.pyi".format(module_name),
"{}/thread_aio.pyi".format(module_name),
"py.typed",
],
},
project_urls={
"Documentation": "https://github.com/mosquito/caio/",
"Source": "https://github.com/mosquito/caio",
},
packages=[module_name],
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: POSIX",
"Operating System :: Microsoft",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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 :: Implementation :: CPython",
],
python_requires=">=3.7, <4",
extras_require={
"develop": [
"aiomisc-pytest",
"pytest",
"pytest-cov",
],
},
)