Skip to content

Commit

Permalink
deps: require importlib-resources for < 3.9 (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent authored Dec 4, 2023
1 parent 21d01d7 commit ebc5f3e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/python-rom-package/roms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import sys
import pathlib

if sys.version_info < (3, 8):
import importlib_resources as resources
else:
if sys.version_info >= (3, 9):
import importlib.resources as resources
else:
import importlib_resources as resources

from typing import List

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ classifiers = [
dependencies = [
"numpy",
"importlib-metadata>=4.10.0; python_version < '3.10'",
"importlib-resources",
"importlib-resources; python_version < '3.9'",
"typing-extensions; python_version < '3.11'"
]
dynamic = ["version"]
Expand Down
6 changes: 5 additions & 1 deletion src/python/scripts/import_roms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
from typing import Optional

import ale_py
import importlib_resources as resources

if sys.version_info >= (3, 9):
import importlib.resources as resources
else:
import importlib_resources as resources


def import_roms(
Expand Down

0 comments on commit ebc5f3e

Please sign in to comment.