forked from mosquito/aiofile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
90 lines (79 loc) · 2.48 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
88
89
90
from setuptools import setup, Extension
from sys import platform
from os import path
from importlib.machinery import SourceFileLoader
module = SourceFileLoader(
"version", path.join("aiofile", "version.py")
).load_module()
libraries = []
if platform == 'linux':
libraries.append('rt')
if platform in ('linux', 'darwin'):
try:
from Cython.Build import cythonize
extensions = cythonize([
Extension(
"aiofile.posix_aio",
["aiofile/posix_aio.pyx"],
libraries=libraries,
),
], force=True, emit_linenums=False, quiet=True)
except ImportError:
extensions = [
Extension(
"aiofile.posix_aio",
["aiofile/posix_aio.c"],
libraries=libraries,
),
]
else:
extensions = []
setup(
name='aiofile',
ext_modules=extensions,
version=module.__version__,
packages=[
'aiofile',
],
license=module.package_license,
description=module.package_info,
long_description=open("README.rst").read(),
platforms=["POSIX"],
url=module.project_home,
author=module.__author__,
author_email=module.team_email,
provides=["aiofile"],
build_requires=['cython'],
keywords=["aio", "python", "asyncio", "cython", "fileio", "io"],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Natural Language :: Russian',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Cython',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development :: Libraries',
'Topic :: System',
'Topic :: System :: Operating System',
],
python_requires=">3.4.*, <4",
extras_require={
'develop': [
'Cython',
'pytest',
'pytest-asyncio',
'pytest-cov',
],
':python_version < "3.5"': 'typing >= 3.5.3',
},
)