Skip to content

Commit 1278bf6

Browse files
committed
RF - make required check explicit in setup
1 parent 1d63690 commit 1278bf6

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

nibabel/info.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
information and access to the image data is made available via NumPy arrays.
5151
"""
5252

53+
# versions for dependencies
54+
NUMPY_MIN_VERSION='1.2'
55+
PYDICOM_MIN_VERSION='0.9.5'
56+
57+
# Main setup parameters
5358
NAME = 'nibabel'
5459
MAINTAINER = "Matthew Brett and Michael Hanke"
5560
MAINTAINER_EMAIL = "[email protected]"
@@ -67,8 +72,5 @@
6772
MICRO = _version_micro
6873
ISRELEASE = _version_extra == ''
6974
VERSION = __version__
70-
REQUIRES = ["numpy"]
71-
72-
# versions
73-
NUMPY_MIN_VERSION='1.2'
74-
PYDICOM_MIN_VERSION='0.9.5'
75+
PROVIDES = ["nibabel"]
76+
REQUIRES = ["numpy (>=%s)" % NUMPY_MIN_VERSION]

setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def main(**extra_args):
6363
platforms=PLATFORMS,
6464
version=VERSION,
6565
requires=REQUIRES,
66+
provides=PROVIDES,
6667
packages = ['nibabel',
6768
'nibabel.externals',
6869
'nibabel.gifti',
@@ -73,16 +74,16 @@ def main(**extra_args):
7374
# required in setup.py, hence needs to go into source
7475
# dist
7576
'nisext'],
76-
# this has no effect for me (on python 2.6) -- even changing to
77-
# data_files doesn't get this stuff included in the source
77+
# The package_data spec has no effect for me (on python 2.6) -- even
78+
# changing to data_files doesn't get this stuff included in the source
7879
# distribution -- not sure if it has something to do with the magic
7980
# above, but distutils is surely the worst piece of code in all of
80-
# python -- moving things into MANIFEST.in but this is admittedly
81+
# python -- duplicating things into MANIFEST.in but this is admittedly
8182
# only a workaround to get things started -- not a solution
82-
#package_data = {'nibabel':
83-
# [pjoin('tests', 'data', '*'),
84-
# pjoin('nicom', 'tests', 'data', '*'),
85-
# ]},
83+
package_data = {'nibabel':
84+
[pjoin('tests', 'data', '*'),
85+
pjoin('nicom', 'tests', 'data', '*'),
86+
]},
8687
scripts = [pjoin('bin', 'parrec2nii')],
8788
cmdclass = cmdclass,
8889
**extra_args

0 commit comments

Comments
 (0)