From cd7dde91f0906c33e33423693679024c78e35580 Mon Sep 17 00:00:00 2001
From: Patrick Gartung <gartung@fnal.gov>
Date: Mon, 14 Sep 2020 16:19:33 -0500
Subject: [PATCH] use sys.platform

---
 lib/spack/spack/binary_distribution.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index 82be72497d..f48b908a40 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -6,6 +6,7 @@
 import codecs
 import os
 import re
+import sys
 import tarfile
 import shutil
 import tempfile
@@ -181,9 +182,9 @@ def write_buildinfo_file(spec, workdir, rel=False):
 
             if relocate.needs_binary_relocation(m_type, m_subtype):
                 if ((m_subtype in ('x-executable', 'x-sharedlib')
-                    and platform.sys != 'Darwin') or
+                    and sys.platform != 'Darwin') or
                    (m_subtype in ('x-mach-binary')
-                    and platform.sys == 'Darwin') or
+                    and sys.platform == 'Darwin') or
                    (not filename.endswith('.o'))):
                     rel_path_name = os.path.relpath(path_name, prefix)
                     binary_to_relocate.append(rel_path_name)
-- 
GitLab