Completed
Push — master ( 4e6a0b...d21c1e )
by Gonzalo
52s
created

get_version()   A

Complexity

Conditions 4

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
dl 0
loc 11
rs 9.2
c 0
b 0
f 0
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
# -----------------------------------------------------------------------------
4
# Copyright (c) The Spyder Development Team
5
#
6
# Licensed under the terms of the MIT License
7
# (See LICENSE.txt for details)
8
# -----------------------------------------------------------------------------
9
"""Setup script for loghub."""
10
11
# Standard library imports
12
from setuptools import setup, find_packages
13
import ast
14
import os
15
16
17
HERE = os.path.abspath(os.path.dirname(__file__))
18
19
20
def get_version(module='loghub'):
21
    """Get version."""
22
    with open(os.path.join(HERE, module, '__init__.py'), 'r') as f:
23
        data = f.read()
24
    lines = data.split('\n')
25
    for line in lines:
26
        if line.startswith('VERSION_INFO'):
27
            version_tuple = ast.literal_eval(line.split('=')[-1].strip())
28
            version = '.'.join(map(str, version_tuple))
29
            break
30
    return version
31
32
33
def get_description():
34
    """Get long description."""
35
    with open(os.path.join(HERE, 'README.md'), 'r') as f:
36
        data = f.read()
37
    return data
38
39
40
setup(
41
    name='loghub',
42
    version=get_version(),
43
    keywords=["github changelog milestone"],
44
    url='https://github.com/spyder-ide/loghub',
45
    license='MIT',
46
    author='Carlos Cordoba',
47
    author_email='[email protected]',
48
    maintainer='Carlos Cordoba',
49
    maintainer_email='[email protected]',
50
    description='Generate changelogs based on Github milestones or tags',
51
    long_description=get_description(),
52
    packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
53
    entry_points={
54
        'console_scripts': [
55
            'loghub = loghub.main:main'
56
        ]
57
    },
58
    classifiers=[
59
        'Development Status :: 5 - Production/Stable',
60
        'Intended Audience :: Developers',
61
        'License :: OSI Approved :: MIT License',
62
        'Operating System :: OS Independent',
63
        'Programming Language :: Python :: 2.7',
64
        'Programming Language :: Python :: 3.4',
65
        'Programming Language :: Python :: 3.5']
66
)
67