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 9
9
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
10
10
"""Build helper."""
11
11
12
+ import sys
12
13
import os
13
14
14
- import setuptools
15
+ from setuptools import setup
15
16
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
17
20
from nisext .sexts import get_comrec_build , read_vars_from
18
21
19
22
INFO = read_vars_from (os .path .join ('nibabel' , 'info.py' ))
20
23
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
+
21
31
if __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