forked from nipy/nibabel
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
630dacf
commit 275d441
Showing
2 changed files
with
62 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,23 +11,47 @@ | |
|
||
__docformat__ = 'restructuredtext' | ||
|
||
from numpy.distutils.core import setup | ||
from glob import glob | ||
import os | ||
import sys | ||
from glob import glob | ||
|
||
# For some commands, use setuptools. | ||
if len(set(('develop', 'bdist_egg', 'bdist_rpm', 'bdist', 'bdist_dumb', | ||
'bdist_wininst', 'install_egg_info', 'egg_info', 'easy_install', | ||
)).intersection(sys.argv)) > 0: | ||
# setup_egg imports setuptools setup, thus monkeypatching distutils. Note | ||
# that we have to import our own setup after this so we catch the | ||
# monkeypatched version | ||
from setup_egg import extra_setuptools_args | ||
|
||
# extra_setuptools_args can be defined from the line above, but it can | ||
# also be defined here because setup.py has been exec'ed from | ||
# setup_egg.py. | ||
if not 'extra_setuptools_args' in globals(): | ||
extra_setuptools_args = dict() | ||
|
||
|
||
def main(**extra_args): | ||
# Import late so we catch setuptools monkeypatched distutils setup | ||
from numpy.distutils.core import setup | ||
setup(name = 'nibabel', | ||
version = '1.0.0', | ||
author = 'Matthew Brett and Michael Hanke', | ||
author_email = 'NiBabel List <[email protected]>', | ||
license = 'MIT License', | ||
url = 'http://niftilib.sf.net/pynifti', | ||
description = 'Access a multitude of neuroimaging data formats', | ||
long_description = "", | ||
packages = ['nibabel', | ||
'nibabel.externals', | ||
'nibabel.testing', | ||
'nibabel.tests'], | ||
data_files = [('nibabel/tests/data', | ||
glob(os.path.join('nibabel', 'tests', 'data', '*')))], | ||
scripts = [os.path.join('bin', 'parrec2nii')], | ||
**extra_args | ||
) | ||
|
||
|
||
setup(name = 'nibabel', | ||
version = '1.0.0', | ||
author = 'Matthew Brett and Michael Hanke', | ||
author_email = 'NiBabel List <[email protected]>', | ||
license = 'MIT License', | ||
url = 'http://niftilib.sf.net/pynifti', | ||
description = 'Access a multitude of neuroimaging data formats', | ||
long_description = "", | ||
packages = ['nibabel', | ||
'nibabel.externals', | ||
'nibabel.testing', | ||
'nibabel.tests'], | ||
data_files = [('nibabel/tests/data', | ||
glob(os.path.join('nibabel', 'tests', 'data', '*')))], | ||
scripts = [os.path.join('bin', 'parrec2nii')] | ||
) | ||
if __name__ == "__main__": | ||
main(**extra_setuptools_args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- | ||
#!/usr/bin/env python | ||
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- | ||
# vi: set ft=python sts=4 ts=4 sw=4 et: | ||
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## | ||
# | ||
# See COPYING file distributed along with the NiBabel package for the | ||
# copyright and license terms. | ||
# | ||
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## | ||
from setuptools import setup | ||
execfile('setup.py') | ||
"""Wrapper to run setup.py using setuptools.""" | ||
|
||
from setuptools import setup | ||
|
||
################################################################################ | ||
# Call the setup.py script, injecting the setuptools-specific arguments. | ||
|
||
extra_setuptools_args = dict( | ||
tests_require=['nose'], | ||
test_suite='nose.collector', | ||
zip_safe=False, | ||
) | ||
|
||
|
||
if __name__ == '__main__': | ||
execfile('setup.py', dict(__name__='__main__', | ||
extra_setuptools_args=extra_setuptools_args)) | ||
|
||
|
||
|