setup.py 2.06 KB
Newer Older
root's avatar
root committed
1
#!/usr/bin/env python
2
3
# pylint: disable=W0404,W0622,W0704,W0613,W0152
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
4
5
6
7
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
8
9
10
11
# 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.
12
13
14
15
16
17
18
#
# 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
19
# with logilab-common.  If not, see <http://www.gnu.org/licenses/>.
20
21
22
"""Generic Setup script, takes package info from __pkginfo__.py file.
"""
__docformat__ = "restructuredtext en"
root's avatar
root committed
23

24
25
26
27
28
29
from setuptools import setup, find_packages
from os import path

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

pkginfo = {}
Laurent Peuch's avatar
Laurent Peuch committed
30
with open(path.join(here, "__pkginfo__.py")) as f:
31
32
33
    exec(f.read(), pkginfo)

# Get the long description from the relevant file
Laurent Peuch's avatar
Laurent Peuch committed
34
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
35
36
37
    long_description = f.read()

setup(
Laurent Peuch's avatar
Laurent Peuch committed
38
39
40
    name=pkginfo["distname"],
    version=pkginfo["version"],
    description=pkginfo["description"],
41
    long_description=long_description,
Laurent Peuch's avatar
Laurent Peuch committed
42
43
44
45
    url=pkginfo["web"],
    author=pkginfo["author"],
    author_email=pkginfo["author_email"],
    license=pkginfo["license"],
46
    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
Laurent Peuch's avatar
Laurent Peuch committed
47
48
    classifiers=pkginfo["classifiers"],
    packages=find_packages(exclude=["contrib", "docs", "test*"]),
49
50
    package_data={"logilab.common": ["py.typed"]},
    include_package_data=True,
Laurent Peuch's avatar
Laurent Peuch committed
51
    namespace_packages=[pkginfo["subpackage_of"]],
52
    python_requires=">=3.6",
Laurent Peuch's avatar
Laurent Peuch committed
53
54
55
    install_requires=pkginfo["install_requires"],
    tests_require=pkginfo["tests_require"],
    scripts=pkginfo["scripts"],
56
)