summaryrefslogtreecommitdiff
path: root/setup.py
blob: c11b59b539eecd7fb023ef9ef0e81674bf612507 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python
# pylint: disable=W0404,W0622,W0704,W0613,W0152
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 2.1 of the License, or (at your
# option) any later version.
#
# logilab-common 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 Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with logilab-common.  If not, see <http://www.gnu.org/licenses/>.
"""Generic Setup script, takes package info from __pkginfo__.py file.
"""
__docformat__ = "restructuredtext en"

from setuptools import setup, find_packages
from io import open
from os import path

here = path.abspath(path.dirname(__file__))

pkginfo = {}
with open(path.join(here, '__pkginfo__.py')) as f:
    exec(f.read(), pkginfo)

# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name=pkginfo['distname'],
    version=pkginfo['version'],
    description=pkginfo['description'],
    long_description=long_description,
    url=pkginfo['web'],
    author=pkginfo['author'],
    author_email=pkginfo['author_email'],
    license=pkginfo['license'],
    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=pkginfo['classifiers'],
    packages=find_packages(exclude=['contrib', 'docs', 'test*']),
    namespace_packages=[pkginfo['subpackage_of']],
    python_requires='>=3.3',
    install_requires=pkginfo['install_requires'],
    tests_require=pkginfo['tests_require'],
    scripts=pkginfo['scripts'],
)