File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 50
50
raise RuntimeError (error_msg )
51
51
52
52
with_setuptools = False
53
+ is_windows = sys .platform == "win32"
53
54
54
55
try :
55
56
from setuptools import setup
@@ -89,7 +90,7 @@ def newrelic_agent_next_version(version):
89
90
with readme_file .open () as f :
90
91
readme_file_contents = f .read ()
91
92
92
- if sys . platform == "win32" and python_version > ( 2 , 6 ) :
93
+ if is_windows :
93
94
build_ext_errors = (CCompilerError , DistutilsExecError , DistutilsPlatformError , IOError )
94
95
else :
95
96
build_ext_errors = (CCompilerError , DistutilsExecError , DistutilsPlatformError )
@@ -201,8 +202,13 @@ def _run_setup():
201
202
if with_extensions :
202
203
kwargs_tmp ["ext_modules" ] = [
203
204
Extension ("newrelic.packages.wrapt._wrappers" , ["newrelic/packages/wrapt/_wrappers.c" ]),
204
- Extension ("newrelic.core._thread_utilization" , ["newrelic/core/_thread_utilization.c" ]),
205
205
]
206
+ if not is_windows :
207
+ # This extension is only supported on POSIX platforms.
208
+ kwargs_tmp ["ext_modules" ].append (
209
+ Extension ("newrelic.core._thread_utilization" , ["newrelic/core/_thread_utilization.c" ])
210
+ )
211
+
206
212
kwargs_tmp ["cmdclass" ] = dict (build_ext = optional_build_ext )
207
213
208
214
setup (** kwargs_tmp )
You can’t perform that action at this time.
0 commit comments