Debian Codegraph @

setup.py

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 import sys
2
3 import setuptools
4 from wheel.bdist_wheel import bdist_wheel
5
6 if sys.platform == "win32":
7 extra_compile_args = []
8 libraries = ["libcrypto", "advapi32", "crypt32", "gdi32", "user32", "ws2_32"]
9 else:
10 extra_compile_args = ["-std=c99"]
11 libraries = ["crypto"]
12
13
14 class bdist_wheel_abi3(bdist_wheel):
15 def get_tag(self):
16 python, abi, plat = super().get_tag()
17
18 if python.startswith("cp"):
19 return "cp310", "abi3", plat
20
21 return python, abi, plat
22
23
24 setuptools.setup(
25 ext_modules=[
26 setuptools.Extension(
27 "aioquic._buffer",
28 extra_compile_args=extra_compile_args,
29 sources=["src/aioquic/_buffer.c"],
30 define_macros=[("Py_LIMITED_API", "0x030A0000")],
31 py_limited_api=True,
32 ),
33 setuptools.Extension(
34 "aioquic._crypto",
35 extra_compile_args=extra_compile_args,
36 libraries=libraries,
37 sources=["src/aioquic/_crypto.c"],
38 define_macros=[("Py_LIMITED_API", "0x030A0000")],
39 py_limited_api=True,
40 ),
41 ],
42 cmdclass={"bdist_wheel": bdist_wheel_abi3},
43 )