diff options
-rw-r--r-- | .pre-commit-config.yaml | 4 | ||||
-rw-r--r-- | MANIFEST.in | 6 | ||||
-rw-r--r-- | setup.cfg | 6 | ||||
-rw-r--r-- | setup.py | 43 |
4 files changed, 15 insertions, 44 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d62b4c3f..ad9baaf9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,6 +19,10 @@ repos: rev: 1.0.0 hooks: - id: black-disable-checker + - repo: https://github.com/asottile/setup-cfg-fmt + rev: v1.17.0 + hooks: + - id: setup-cfg-fmt - repo: https://github.com/asottile/pyupgrade rev: v2.12.0 hooks: diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index d6695c49..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include ChangeLog -include README.rst -recursive-include tests *.py *.zip *.egg *.pth -recursive-include astroid/brain *.py -graft tests -recursive-exclude tests *.pyc @@ -11,6 +11,7 @@ license_files = LICENSE classifiers = Development Status :: 6 - Mature + Environment :: Console Intended Audience :: Developers License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2) Operating System :: OS Independent @@ -33,12 +34,17 @@ project_urls = "Mailing list" = mailto:code-quality@python.org [options] +packages = find: install_requires = lazy_object_proxy>=1.4.0 wrapt>=1.11,<1.13 typed-ast>=1.4.0,<1.5;implementation_name=="cpython" and python_version<"3.8" python_requires = ~=3.6 +[options.packages.find] +include = + astroid* + [aliases] test = pytest @@ -1,43 +1,10 @@ -#!/usr/bin/env python -# Copyright (c) 2006, 2009-2010, 2012-2013 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> -# Copyright (c) 2010-2011 Julien Jehannet <julien.jehannet@logilab.fr> -# Copyright (c) 2014-2016, 2018-2020 Claudiu Popa <pcmanticore@gmail.com> -# Copyright (c) 2014 Google, Inc. -# Copyright (c) 2017 Hugo <hugovk@users.noreply.github.com> -# Copyright (c) 2018-2019 Ashley Whetter <ashley@awhetter.co.uk> -# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com> -# Copyright (c) 2020-2021 hippo91 <guillaume.peillex@gmail.com> -# Copyright (c) 2020 David Gilman <davidgilman1@gmail.com> -# Copyright (c) 2020 Colin Kennedy <colinvfx@gmail.com> -# Copyright (c) 2021 Pierre Sassoulas <pierre.sassoulas@gmail.com> -# Copyright (c) 2021 Marc Mueller <30130371+cdce8p@users.noreply.github.com> +from pathlib import Path -# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html -# For details: https://github.com/PyCQA/astroid/blob/master/LICENSE +from setuptools import setup -# pylint: disable=W0404,W0622,W0613 -"""Setup script for astroid.""" -import os - -from setuptools import find_packages, setup -from setuptools.command import easy_install # pylint: disable=unused-import -from setuptools.command import install_lib # pylint: disable=unused-import - -real_path = os.path.realpath(__file__) -astroid_dir = os.path.dirname(real_path) -pkginfo = os.path.join(astroid_dir, "astroid", "__pkginfo__.py") +pkginfo = Path(__file__).parent / "astroid/__pkginfo__.py" with open(pkginfo, "rb") as fobj: - exec(compile(fobj.read(), pkginfo, "exec"), locals()) - - -def install(): - return setup( - name="astroid", - version=__version__, - packages=find_packages(exclude=["tests"]) + ["astroid.brain"], - ) - + exec(compile(fobj.read(), pkginfo, "exec"), locals()) # pylint: disable=exec-used -if __name__ == "__main__": - install() +setup(version=__version__) # pylint: disable=undefined-variable |