From f8b1599bdbe7adb986384308afb62b1f2d040be8 Mon Sep 17 00:00:00 2001 From: Liam Murphy Date: Wed, 14 Aug 2024 15:58:22 +1000 Subject: [PATCH] Remove usage of `distutils` `distutils` was removed in Python 3.12, causing litepcie to crash when trying to use it. --- litepcie/software/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litepcie/software/__init__.py b/litepcie/software/__init__.py index c2e76172..6ad78a88 100644 --- a/litepcie/software/__init__.py +++ b/litepcie/software/__init__.py @@ -1,5 +1,5 @@ import os -from distutils.dir_util import copy_tree +from shutil import copytree from litex.build import tools @@ -8,7 +8,7 @@ def copy_litepcie_software(dst): src = os.path.abspath(os.path.dirname(__file__)) - copy_tree(src, dst) + copytree(src, dst, dirs_exist_ok=True) def generate_litepcie_software_headers(soc, dst): csr_header = get_csr_header(soc.csr_regions, soc.constants, with_access_functions=False)