Skip to content

Commit 73e522f

Browse files
Fix package version lookup on Python 3.13
1 parent 12628d0 commit 73e522f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ def write_version_py():
7474

7575

7676
def get_version():
77+
version_namespace = {}
7778
with open(version_file, 'r') as f:
78-
exec(compile(f.read(), version_file, 'exec'))
79-
return locals()['__version__']
79+
exec(compile(f.read(), version_file, 'exec'), version_namespace)
80+
return version_namespace['__version__']
8081

8182

8283
def make_cuda_ext(name, module, sources, sources_cuda=None):

0 commit comments

Comments
 (0)