setup.py 3.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2017  IRISA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# The original code contained here was initially developed by:
#
#     Pierre Vignet.
21
#     IRISA/IRSET
22
23
24
25
26
27
28
#     Dyliss team
#     IRISA Campus de Beaulieu
#     35042 RENNES Cedex, FRANCE

"""Definition of setup function for setuptools module."""

# Standard imports
29
import sys
30
from setuptools import setup, find_packages
31
from setuptools.command.test import test as TestCommand
32
33
from sys import version_info

34
__PACKAGE_VERSION__ = "1.1.0"
35
36
37
38
39
40
41

deps = []

if version_info[0] == 2:
    # Require backport of concurrent.futures on Python 2
    deps.append("futures")

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
################################################################################

class PyTest(TestCommand):
    """Call tests with the custom 'python setup.py test' command."""

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = []

    def run_tests(self):
        import pytest
        errno = pytest.main()
        sys.exit(errno)

################################################################################

58
59
60
61
setup(

    # Library name & version
    name='cadbiom_cmd',
62
    version=__PACKAGE_VERSION__,
63
64
65
66
67
68
69
70
71
72
73
74
75

    # Search all packages recursively
    packages=find_packages(),

    # Authors
    author="pvignet",
    author_email="pierre.vignet@irisa.fr",

    # Description
    description="Command line tools using the Cadbiom library",
    long_description=open('README.md').read(),

    # Official page
76
    url = "https://gitlab.inria.fr/pvignet/cadbiom",
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

    # Metadata
    classifiers=[
        "Environment :: Console",
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
        "Natural Language :: French",
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 2.7",
        "Topic :: Scientific/Engineering :: Bio-Informatics",
    ],

    entry_points={
        'console_scripts': ['cadbiom_cmd = cadbiom_cmd.cadbiom_cmd:main'],
    },

94
    install_requires=deps + ["cadbiom", "futures"],
95
96
    # TODO: use setup.cfg instead of these directives.
    # => Will allow to finely distinguish dev, and extra packages
97
    extras_require = {
98
99
        "matplotlib": ["matplotlib<2"], # For graphs drawing manually
        "dev": ["sphinx<2", "sphinx-argparse"], # For doc
100
    },
101
102

    # Tests
103
    tests_require=['pytest<3.7'],
104
    cmdclass={'test': PyTest},
105
)