mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-31 22:23:12 +08:00
27 lines
580 B
Python
27 lines
580 B
Python
__all__ = ["get_extensions"]
|
|
|
|
from setuptools import Extension
|
|
import sys
|
|
|
|
|
|
def get_extensions():
|
|
libraries = []
|
|
if sys.platform == "win32":
|
|
libraries.append("ws2_32")
|
|
|
|
macros = []
|
|
if sys.byteorder == "big":
|
|
macros = [("__BIG_ENDIAN__", "1")]
|
|
else:
|
|
macros = [("__LITTLE_ENDIAN__", "1")]
|
|
|
|
ext = Extension(
|
|
"ddtrace.vendor.msgpack._cmsgpack",
|
|
sources=["ddtrace/vendor/msgpack/_cmsgpack.cpp"],
|
|
libraries=libraries,
|
|
include_dirs=["ddtrace/vendor/"],
|
|
define_macros=macros,
|
|
)
|
|
|
|
return [ext]
|