setup.py 1.78 KB
Newer Older
1
2
3
4
5
6
7
#!/usr/bin/env python
#
# setup.py - setuptools configuration for installing the fslpy package.
#
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#

8
9
import os.path as op

10
11
12
13
from setuptools import setup
from setuptools import find_packages


14
15
16
17
18
19
20
21
22
23
24
25
# The directory in whihc this setup.py file is contained.
basedir = op.dirname(__file__)


# Figure out the current fslpy version, as defined in fsl/version.py. We
# don't want to import the fsl package,  as this may cause build problems.
# So we manually parse the contents of fsl/version.py to extract the
# version number.
version = {}
with open(op.join(basedir, "fsl", "version.py")) as f:
    exec(f.read(), version)

26
27
28
29
30
install_requires = open(op.join(basedir, 'requirements.txt'), 'rt').readlines()

dependency_links = [i for i in install_requires if     i.startswith('git')]
install_requires = [i for i in install_requires if not i.startswith('git')]

31
32
33
34
setup(

    name='fslpy',

35
    version=version['__version__'],
36

Paul McCarthy's avatar
Paul McCarthy committed
37
    description='FSL Python library',
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

    url='https://git.fmrib.ox.ac.uk/paulmc/fslpy',

    author='Paul McCarthy',

    author_email='pauldmccarthy@gmail.com',

    license='FMRIB',

    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: Free for non-commercial use',
        'Programming Language :: Python :: 2.7',
        'Topic :: Software Development :: Libraries :: Python Modules'],

Paul McCarthy's avatar
Paul McCarthy committed
54
    packages=find_packages(exclude=('doc')),
55

56
57
58
59
60
61
    install_requires=install_requires,
    dependency_links=dependency_links,

    setup_requires=['pytest-runner'],
    tests_require=['pytest', 'pytest-runner'],
    test_suite='tests',
62

63
64
65
66
67
68
    entry_points={
        'console_scripts' : [
            'fslpy_imcp = fsl.scripts.imcp:main',
            'fslpy_immv = fsl.scripts.immv:main'
        ]
    }
69
)