Skip to content

Commit c339c22

Browse files
committed
ignorer l'option strip pour win32
1 parent 6ef3686 commit c339c22

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

setuptools_rust/build.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -218,20 +218,21 @@ def build_extension(self, ext):
218218

219219
shutil.copyfile(dylib_path, ext_path)
220220

221-
if not debug_build:
222-
args = []
223-
if ext.strip == Strip.All:
224-
args.append('-x')
225-
elif ext.strip == Strip.Debug:
226-
args.append('-S')
227-
228-
if args:
229-
args.insert(0, 'strip')
230-
args.append(ext_path)
231-
try:
232-
output = subprocess.check_output(args, env=env)
233-
except subprocess.CalledProcessError as e:
234-
pass
221+
if sys.platform != "win32":
222+
if not debug_build:
223+
args = []
224+
if ext.strip == Strip.All:
225+
args.append('-x')
226+
elif ext.strip == Strip.Debug:
227+
args.append('-S')
228+
229+
if args:
230+
args.insert(0, 'strip')
231+
args.append(ext_path)
232+
try:
233+
output = subprocess.check_output(args, env=env)
234+
except subprocess.CalledProcessError as e:
235+
pass
235236

236237
if executable:
237238
mode = os.stat(ext_path).st_mode

0 commit comments

Comments
 (0)