Skip to content

Commit 80b6174

Browse files
committed
MAINT: Restore reading version from info.py
1 parent a89c536 commit 80b6174

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

nibabel/info.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,5 @@ def cmp_pkg_version(version_str, pkg_version_str=__version__):
173173
.. _zenodo: https://zenodo.org
174174
.. _Digital Object Identifier: https://en.wikipedia.org/wiki/Digital_object_identifier
175175
"""
176+
177+
VERSION = __version__

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[metadata]
22
name = nibabel
3-
version = attr: nibabel.__version__
43
url = https://nipy.org/nibabel
54
download_url = https://github.com/nipy/nibabel
65
author = nibabel developers

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
from setuptools import setup
2020

2121
# Commit hash writing
22-
from nisext.sexts import get_comrec_build
22+
from nisext.sexts import get_comrec_build, read_vars_from
23+
24+
INFO = read_vars_from(os.path.join('nibabel', 'info.py'))
2325

2426
if __name__ == "__main__":
25-
setup(cmdclass={'build_py': get_comrec_build('nibabel')})
27+
setup(name='nibabel',
28+
version=INFO.VERSION,
29+
cmdclass={'build_py': get_comrec_build('nibabel')})

0 commit comments

Comments
 (0)