Skip to content

Commit

Permalink
Remove usage of distutils
Browse files Browse the repository at this point in the history
`distutils` was removed in Python 3.12, causing litepcie to crash when
trying to use it.

This makes use of the `dirs_exist_ok` option to `copytree`, which was
added in Python 3.8, so the minimum Python version had to be bumped.
  • Loading branch information
Liamolucko committed Dec 27, 2024
1 parent 21da327 commit 28758e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ enjoy-digital.fr.

[> Getting started
------------------
1. Install Python 3.6+ and FPGA vendor's development tools.
1. Install Python 3.8+ and FPGA vendor's development tools.
2. Install LiteX and the cores by following the LiteX's wiki [installation guide](https://github.com/enjoy-digital/litex/wiki/Installation).
3. You can find examples of integration of the core with LiteX in LiteX-Boards and in the examples directory.

Expand Down
4 changes: 2 additions & 2 deletions litepcie/software/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from distutils.dir_util import copy_tree
from shutil import copytree

from litex.build import tools

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
download_url = "https://github.com/enjoy-digital/litepcie",
test_suite = "test",
license = "BSD",
python_requires = "~=3.7",
python_requires = "~=3.8",
install_requires = ["pyyaml", "litex"],
extras_require = {
"develop": [
Expand Down

0 comments on commit 28758e4

Please sign in to comment.