Skip to content

Commit

Permalink
Fix compatibility with Cython 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Nov 13, 2024
1 parent b361233 commit c60ff0b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion brian2/codegen/runtime/cython_rt/extension_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
import Cython
import Cython.Build as Cython_Build
import Cython.Compiler as Cython_Compiler
from Cython.Utils import get_cython_cache_dir as base_cython_cache_dir

try:
from Cython.Utils import get_cython_cache_dir as base_cython_cache_dir
except ImportError:
from Cython.Build.Cache import (
get_cython_cache_dir as base_cython_cache_dir, # Cython 3.1, see cython/cython#6090
)
except ImportError:
Cython = None

Expand Down

0 comments on commit c60ff0b

Please sign in to comment.