Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test
  • Loading branch information
methane committed May 4, 2024
commit 6177331ac34cccfbd62abb4debb01dba06a07dc1
31 changes: 17 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
#!/usr/bin/env python
import os
import sys


libraries = []
macros = []

if sys.platform == "win32":
libraries.append("ws2_32")
macros = [("__LITTLE_ENDIAN__", "1")]
cflags = os.environ.get("CFLAGS")
cxx20flag = "/std:c++20"
if cflags is None:
cflags = cxx20flag
elif cxx20flag not in cflags:
cflags += " " + cxx20flag
os.environ["CFLAGS"] = cflags


from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from setuptools.command.sdist import sdist
Expand Down Expand Up @@ -49,20 +66,6 @@ def __init__(self, *args, **kwargs):
sdist.__init__(self, *args, **kwargs)


libraries = []
macros = []

if sys.platform == "win32":
libraries.append("ws2_32")
macros = [("__LITTLE_ENDIAN__", "1")]
cflags = os.environ.get("CFLAGS")
cxx20flag = "/std:c++20"
if cflags is None:
cflags = cxx20flag
elif cxx20flag not in cflags:
cflags += " " + cxx20flag
os.environ["CFLAGS"] = cflags

ext_modules = []
if not PYPY and not os.environ.get("MSGPACK_PUREPYTHON"):
ext_modules.append(
Expand Down