setup.py 1.91 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

Paul McCarthy's avatar
Paul McCarthy committed
10
11
from setuptools import setup
from setuptools import find_packages
12
13
14


# The directory in which this setup.py file is contained.
15
16
17
18
19
20
21
22
23
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:
24
25
26
27
    for line in f:
        if line.startswith('__version__'):
            exec(line, version)
            break 
28

29
30
31
32
33
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')]

34
35
36
37
setup(

    name='fslpy',

38
    version=version['__version__'],
39

Paul McCarthy's avatar
Paul McCarthy committed
40
    description='FSL Python library',
41
42
43
44
45
46
47

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

    author='Paul McCarthy',

    author_email='pauldmccarthy@gmail.com',

Paul McCarthy's avatar
Paul McCarthy committed
48
    license='Apache License Version 2.0',
49
50
51
52

    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
Paul McCarthy's avatar
Paul McCarthy committed
53
        'License :: OSI Approved :: Apache Software License',
54
55
56
        'Programming Language :: Python :: 2.7',
        'Topic :: Software Development :: Libraries :: Python Modules'],

Paul McCarthy's avatar
Paul McCarthy committed
57
    packages=find_packages(exclude=('doc', 'tests')),
58

59
60
61
62
63
64
    install_requires=install_requires,
    dependency_links=dependency_links,

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

66
67
68
69
70
71
    entry_points={
        'console_scripts' : [
            'fslpy_imcp = fsl.scripts.imcp:main',
            'fslpy_immv = fsl.scripts.immv:main'
        ]
    }
72
)