From 1c30d3330d9d9eec7d8cf134498a6d8cba0359af Mon Sep 17 00:00:00 2001 From: Alex Tyler Chapman Date: Wed, 8 Nov 2023 17:25:02 -0800 Subject: [PATCH] Remove usage of distutils --- uberenv.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/uberenv.py b/uberenv.py index 03578d5..b003681 100755 --- a/uberenv.py +++ b/uberenv.py @@ -59,12 +59,10 @@ import socket import platform import json -import datetime import glob import re import argparse -from distutils.version import LooseVersion from functools import partial from os import environ as env @@ -529,12 +527,10 @@ def clone_repo(self): def patch(self): """ hot-copy our ports into vcpkg """ - import distutils.dir_util - dest_vcpkg_ports = pjoin(self.dest_vcpkg, "ports") print("[info: copying from {0} to {1}]".format(self.vcpkg_ports_path, dest_vcpkg_ports)) - distutils.dir_util.copy_tree(self.vcpkg_ports_path, dest_vcpkg_ports) + shutil.copytree(self.vcpkg_ports_path, dest_vcpkg_ports) def clean_build(self): @@ -666,7 +662,7 @@ def spack_exe(self, use_spack_env = True): # Returns version of Spack being used def spack_version(self): res, out = sexe('{0} --version'.format(self.spack_exe(use_spack_env=False)), ret_output=True) - return LooseVersion(out[:-1]) + return out def check_concretizer_args(self): cmd = "{0} help install".format(self.spack_exe(use_spack_env=False))