Skip to content

Commit dbd53b2

Browse files
authored
Merge pull request #1627 from oesteban/enh/MigrateToSetuptools
[ENH] Abandon distutils
2 parents 5427538 + 8d28bde commit dbd53b2

File tree

6 files changed

+150
-438
lines changed

6 files changed

+150
-438
lines changed

.travis.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ python:
66
- 3.4
77
- 3.5
88
env:
9-
- INSTALL_DEB_DEPENDECIES=true
10-
- INSTALL_DEB_DEPENDECIES=false
11-
- INSTALL_DEB_DEPENDECIES=true DUECREDIT_ENABLE=yes
9+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler"
10+
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler"
11+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit"
1212
before_install:
1313
- function bef_inst {
1414
wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
@@ -28,16 +28,15 @@ before_install:
2828
export FSLOUTPUTTYPE=NIFTI_GZ; }
2929
- travis_retry bef_inst
3030
install:
31+
# Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi &&
3132
- function inst {
3233
conda config --add channels conda-forge &&
3334
conda update --yes conda &&
3435
conda update --all -y python=$TRAVIS_PYTHON_VERSION &&
35-
conda install -y nipype matplotlib nitime &&
36-
pip install python-coveralls coverage doctest-ignore-unicode &&
37-
if [ ! -z "$DUECREDIT_ENABLE"]; then pip install duecredit; fi &&
36+
conda install -y nipype &&
3837
rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype* &&
3938
pip install -r requirements.txt &&
40-
pip install -e . &&
39+
pip install -e .[$NIPYPE_EXTRAS] &&
4140
export COVERAGE_PROCESS_START=$(pwd)/.coveragerc &&
4241
export COVERAGE_DATA_FILE=$(pwd)/.coverage &&
4342
echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}; }

docker/nipype_test/Dockerfile_py27

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ RUN pip install -r /root/src/nipype/requirements.txt
4646
COPY . /root/src/nipype
4747
RUN rm -r /usr/local/miniconda/lib/python2.7/site-packages/nipype* && \
4848
cd /root/src/nipype && \
49-
pip install -e .
49+
pip install -e .[all]
5050

5151
CMD ["/bin/bash"]

docker/nipype_test/Dockerfile_py34

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ RUN pip install -r /root/src/nipype/requirements.txt
5151
COPY . /root/src/nipype
5252
RUN rm -r /usr/local/miniconda/lib/python3.4/site-packages/nipype* && \
5353
cd /root/src/nipype && \
54-
pip install -e .
54+
pip install -e .[all]
5555

5656
CMD ["/bin/bash"]

docker/nipype_test/Dockerfile_py35

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ FROM nipype/nipype_test:base-0.0.2
3030
MAINTAINER The nipype developers https://github.com/nipy/nipype
3131

3232
WORKDIR /root
33-
33+
3434
COPY docker/circleci/run_* /usr/bin/
3535
RUN chmod +x /usr/bin/run_*
3636

@@ -49,6 +49,6 @@ RUN pip install -r /root/src/nipype/requirements.txt
4949
COPY . /root/src/nipype
5050
RUN rm -r /usr/local/miniconda/lib/python3.5/site-packages/nipype* && \
5151
cd /root/src/nipype && \
52-
pip install -e .
52+
pip install -e .[all]
5353

5454
CMD ["/bin/bash"]

nipype/info.py

Lines changed: 71 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -48,49 +48,47 @@ def get_nipype_gitversion():
4848
if gitversion:
4949
_version_extra = '-' + gitversion + '.dev'
5050

51-
# Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z"
52-
__version__ = "%s.%s.%s%s" % (_version_major,
51+
# Format expected by setup.py and doc/source/conf.py: string of form 'X.Y.Z'
52+
__version__ = '%s.%s.%s%s' % (_version_major,
5353
_version_minor,
5454
_version_micro,
5555
_version_extra)
5656

57-
CLASSIFIERS = ["Development Status :: 5 - Production/Stable",
58-
"Environment :: Console",
59-
"Intended Audience :: Science/Research",
60-
"License :: OSI Approved :: Apache Software License",
61-
"Operating System :: MacOS :: MacOS X",
62-
"Operating System :: POSIX :: Linux",
63-
"Programming Language :: Python :: 2.7",
64-
"Programming Language :: Python :: 3.4",
65-
"Programming Language :: Python :: 3.5",
66-
"Topic :: Scientific/Engineering"]
57+
CLASSIFIERS = ['Development Status :: 5 - Production/Stable',
58+
'Environment :: Console',
59+
'Intended Audience :: Science/Research',
60+
'License :: OSI Approved :: Apache Software License',
61+
'Operating System :: MacOS :: MacOS X',
62+
'Operating System :: POSIX :: Linux',
63+
'Programming Language :: Python :: 2.7',
64+
'Programming Language :: Python :: 3.4',
65+
'Programming Language :: Python :: 3.5',
66+
'Topic :: Scientific/Engineering']
6767

6868
description = 'Neuroimaging in Python: Pipelines and Interfaces'
6969

7070
# Note: this long_description is actually a copy/paste from the top-level
7171
# README.txt, so that it shows up nicely on PyPI. So please remember to edit
7272
# it only in one place and sync it correctly.
73-
long_description = \
74-
"""
75-
========================================================
73+
long_description = """========================================================
7674
NIPYPE: Neuroimaging in Python: Pipelines and Interfaces
7775
========================================================
7876
79-
Current neuroimaging software offer users an incredible opportunity to
80-
analyze data using a variety of different algorithms. However, this has
81-
resulted in a heterogeneous collection of specialized applications
77+
Current neuroimaging software offer users an incredible opportunity to \
78+
analyze data using a variety of different algorithms. However, this has \
79+
resulted in a heterogeneous collection of specialized applications \
8280
without transparent interoperability or a uniform operating interface.
8381
84-
*Nipype*, an open-source, community-developed initiative under the
85-
umbrella of NiPy_, is a Python project that provides a uniform interface
86-
to existing neuroimaging software and facilitates interaction between
87-
these packages within a single workflow. Nipype provides an environment
88-
that encourages interactive exploration of algorithms from different
89-
packages (e.g., AFNI, ANTS, BRAINS, BrainSuite, Camino, FreeSurfer, FSL, MNE,
90-
MRtrix, MNE, Nipy, Slicer, SPM), eases the design of workflows within and
91-
between packages, and reduces the learning curve necessary to use different
92-
packages. Nipype is creating a collaborative platform for neuroimaging software
93-
development in a high-level language and addressing limitations of existing
82+
*Nipype*, an open-source, community-developed initiative under the \
83+
umbrella of NiPy_, is a Python project that provides a uniform interface \
84+
to existing neuroimaging software and facilitates interaction between \
85+
these packages within a single workflow. Nipype provides an environment \
86+
that encourages interactive exploration of algorithms from different \
87+
packages (e.g., AFNI, ANTS, BRAINS, BrainSuite, Camino, FreeSurfer, FSL, MNE, \
88+
MRtrix, MNE, Nipy, Slicer, SPM), eases the design of workflows within and \
89+
between packages, and reduces the learning curve necessary to use different \
90+
packages. Nipype is creating a collaborative platform for neuroimaging software \
91+
development in a high-level language and addressing limitations of existing \
9492
pipeline systems.
9593
9694
*Nipype* allows you to:
@@ -116,33 +114,58 @@ def get_nipype_gitversion():
116114
PROV_MIN_VERSION = '1.4.0'
117115

118116
NAME = 'nipype'
119-
MAINTAINER = "nipype developers"
120-
MAINTAINER_EMAIL = "[email protected]"
117+
MAINTAINER = 'nipype developers'
118+
MAINTAINER_EMAIL = '[email protected]'
121119
DESCRIPTION = description
122120
LONG_DESCRIPTION = long_description
123-
URL = "http://nipy.org/nipype"
124-
DOWNLOAD_URL = "http://github.com/nipy/nipype/archives/master"
125-
LICENSE = "Apache License, 2.0"
121+
URL = 'http://nipy.org/nipype'
122+
DOWNLOAD_URL = 'http://github.com/nipy/nipype/archives/master'
123+
LICENSE = 'Apache License, 2.0'
126124
CLASSIFIERS = CLASSIFIERS
127-
AUTHOR = "nipype developers"
128-
AUTHOR_EMAIL = "[email protected]"
129-
PLATFORMS = "OS Independent"
125+
AUTHOR = 'nipype developers'
126+
AUTHOR_EMAIL = '[email protected]'
127+
PLATFORMS = 'OS Independent'
130128
MAJOR = _version_major
131129
MINOR = _version_minor
132130
MICRO = _version_micro
133131
ISRELEASE = _version_extra == ''
134132
VERSION = __version__
135133
PROVIDES = ['nipype']
136-
REQUIRES = ["nibabel>=%s" % NIBABEL_MIN_VERSION,
137-
"networkx>=%s" % NETWORKX_MIN_VERSION,
138-
"numpy>=%s" % NUMPY_MIN_VERSION,
139-
"python-dateutil>=%s" % DATEUTIL_MIN_VERSION,
140-
"scipy>=%s" % SCIPY_MIN_VERSION,
141-
"traits>=%s" % TRAITS_MIN_VERSION,
142-
"nose>=%s" % NOSE_MIN_VERSION,
143-
"future>=%s" % FUTURE_MIN_VERSION,
144-
"simplejson>=%s" % SIMPLEJSON_MIN_VERSION,
145-
"prov>=%s" % PROV_MIN_VERSION,
146-
"mock",
147-
"xvfbwrapper"]
134+
REQUIRES = [
135+
'nibabel>=%s' % NIBABEL_MIN_VERSION,
136+
'networkx>=%s' % NETWORKX_MIN_VERSION,
137+
'numpy>=%s' % NUMPY_MIN_VERSION,
138+
'python-dateutil>=%s' % DATEUTIL_MIN_VERSION,
139+
'scipy>=%s' % SCIPY_MIN_VERSION,
140+
'traits>=%s' % TRAITS_MIN_VERSION,
141+
'future>=%s' % FUTURE_MIN_VERSION,
142+
'simplejson>=%s' % SIMPLEJSON_MIN_VERSION,
143+
'prov>=%s' % PROV_MIN_VERSION,
144+
'xvfbwrapper',
145+
'funcsigs'
146+
]
147+
148+
TESTS_REQUIRES = [
149+
'nose>=%s' % NOSE_MIN_VERSION,
150+
'mock',
151+
'codecov',
152+
'doctest-ignore-unicode',
153+
'dipy',
154+
'nipy',
155+
'matplotlib'
156+
]
157+
158+
EXTRA_REQUIRES = {
159+
'doc': ['Sphinx>=0.3', 'matplotlib', 'pydotplus'],
160+
'tests': TESTS_REQUIRES,
161+
'fmri': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],
162+
'profiler': ['psutil'],
163+
'duecredit': ['duecredit'],
164+
# 'mesh': ['mayavi'] # Enable when it works
165+
}
166+
167+
# Enable a handle to install all extra dependencies at once
168+
EXTRA_REQUIRES['all'] = [val for _, val in list(EXTRA_REQUIRES.items())]
169+
148170
STATUS = 'stable'
171+

0 commit comments

Comments
 (0)