Skip to content

Commit 6177331

Browse files
committed
test
1 parent 8e813d5 commit 6177331

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

setup.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
#!/usr/bin/env python
22
import os
33
import sys
4+
5+
6+
libraries = []
7+
macros = []
8+
9+
if sys.platform == "win32":
10+
libraries.append("ws2_32")
11+
macros = [("__LITTLE_ENDIAN__", "1")]
12+
cflags = os.environ.get("CFLAGS")
13+
cxx20flag = "/std:c++20"
14+
if cflags is None:
15+
cflags = cxx20flag
16+
elif cxx20flag not in cflags:
17+
cflags += " " + cxx20flag
18+
os.environ["CFLAGS"] = cflags
19+
20+
421
from setuptools import setup, Extension
522
from setuptools.command.build_ext import build_ext
623
from setuptools.command.sdist import sdist
@@ -49,20 +66,6 @@ def __init__(self, *args, **kwargs):
4966
sdist.__init__(self, *args, **kwargs)
5067

5168

52-
libraries = []
53-
macros = []
54-
55-
if sys.platform == "win32":
56-
libraries.append("ws2_32")
57-
macros = [("__LITTLE_ENDIAN__", "1")]
58-
cflags = os.environ.get("CFLAGS")
59-
cxx20flag = "/std:c++20"
60-
if cflags is None:
61-
cflags = cxx20flag
62-
elif cxx20flag not in cflags:
63-
cflags += " " + cxx20flag
64-
os.environ["CFLAGS"] = cflags
65-
6669
ext_modules = []
6770
if not PYPY and not os.environ.get("MSGPACK_PUREPYTHON"):
6871
ext_modules.append(

0 commit comments

Comments
 (0)