setup.py 2.91 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/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.
#     IRISA
#     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

VIGNET Pierre's avatar
VIGNET Pierre committed
34
__PACKAGE_VERSION__ = "0.1.3"
35 36 37 38 39 40 41 42
__LIBRARY_VERSION__ = "0.1.0"

deps = []

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

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

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)

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

59 60 61 62
setup(

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

    # 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
77
    url = "https://gitlab.inria.fr/pvignet/cadbiom",
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94

    # 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'],
    },

VIGNET Pierre's avatar
VIGNET Pierre committed
95 96
    install_requires=deps + ["cadbiom"],
    # For graphs drawing manually
97 98 99
    extras_require = {
        'matplotlib': ["matplotlib<2"],
    },
100 101 102 103

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