-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
36 lines (31 loc) · 822 Bytes
/
setup.py
File metadata and controls
36 lines (31 loc) · 822 Bytes
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
import os
import sys
from Cython.Build import cythonize
from setuptools import Extension, setup
vi = sys.version_info
if vi < (3, 9):
raise RuntimeError('picows requires Python 3.9 or greater')
if os.name == 'nt':
libraries = ["Ws2_32"]
else:
libraries = None
extensions = [
Extension("wsbench.client_picows_cyt", ["wsbench/client_picows_cyt.pyx"], libraries=libraries),
]
setup(
ext_modules=cythonize(
extensions,
compiler_directives={
'language_level': vi[0],
'profile': False,
'nonecheck': False,
'boundscheck': False,
'wraparound': False,
'initializedcheck': False,
'optimize.use_switch': False,
'cdivision': True
},
annotate=True,
gdb_debug=False,
)
)