File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change 99### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
1010"""Build helper."""
1111
12+ import sys
1213import os
1314
14- import setuptools
15+ from setuptools import setup
1516
16- # Commit hash writing
17+ # nisext is nipy setup extensions, which we're mostly moving away from
18+ # get_comrec_build stores the current commit in COMMIT_HASH.txt at build time
19+ # read_vars_from evaluates a python file and makes variables available
1720from nisext .sexts import get_comrec_build , read_vars_from
1821
1922INFO = read_vars_from (os .path .join ('nibabel' , 'info.py' ))
2023
24+ # Give setuptools a hint to complain if it's too old a version
25+ # 30.3.0 allows us to put most metadata in setup.cfg
26+ # Should match pyproject.toml
27+ SETUP_REQUIRES = ['setuptools >= 30.3.0' ]
28+ # This enables setuptools to install wheel on-the-fly
29+ SETUP_REQUIRES += ['wheel' ] if 'bdist_wheel' in sys .argv else []
30+
2131if __name__ == "__main__" :
22- setuptools . setup (name = 'nibabel' ,
23- version = INFO .VERSION ,
24- setup_requires = [ 'setuptools>=30.3.0' ] ,
25- cmdclass = {'build_py' : get_comrec_build ('nibabel' )})
32+ setup (name = 'nibabel' ,
33+ version = INFO .VERSION ,
34+ setup_requires = SETUP_REQUIRES ,
35+ cmdclass = {'build_py' : get_comrec_build ('nibabel' )})
You can’t perform that action at this time.
0 commit comments