Skip to content

Commit

Permalink
fix issue with importlib.resources not working on python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLydike committed Oct 11, 2023
1 parent f799916 commit b9c469d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 2.2.3

- Feature: Adding support for 64 bit floating point operations
- BugFix: Fix a bug where `-o libc` would fail with packaged versions of riscemu
- BugFix: Fix `__all__` to now properly work (use name strings instead of values)

## 2.2.2
Expand Down
4 changes: 2 additions & 2 deletions riscemu/riscemu_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from io import IOBase, RawIOBase, TextIOBase
from typing import Type, Dict, List, Optional, Union
import importlib.resources
import importlib_resources

from . import __version__, __copyright__
from .core import CPU, ProgramLoader, Program, UserModeCPU
Expand Down Expand Up @@ -206,7 +206,7 @@ def add_libc_to_input_files(self):
"""
This adds the provided riscemu libc to the programs runtime.
"""
for file in importlib.resources.files("riscemu.libc").iterdir():
for file in importlib_resources.files("riscemu.libc").iterdir():
if file.name.lower().endswith(".s"):
source = RiscemuSource(file.name, file.open("r"))
self.input_files.append(source)
Expand Down

0 comments on commit b9c469d

Please sign in to comment.