summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST.in2
-rw-r--r--astroid/__pkginfo__.py30
-rw-r--r--pytest.ini3
-rw-r--r--setup.cfg43
-rw-r--r--setup.py28
5 files changed, 43 insertions, 63 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 1d4d411b..d6695c49 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,5 @@
include ChangeLog
include README.rst
-include LICENSE
-include pytest.ini
recursive-include tests *.py *.zip *.egg *.pth
recursive-include astroid/brain *.py
graft tests
diff --git a/astroid/__pkginfo__.py b/astroid/__pkginfo__.py
index 4282c8f8..e23c8500 100644
--- a/astroid/__pkginfo__.py
+++ b/astroid/__pkginfo__.py
@@ -33,33 +33,3 @@ dev_version = None
version = ".".join(str(num) for num in numversion)
if dev_version is not None:
version += "-dev" + str(dev_version)
-
-extras_require = {}
-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"',
-]
-
-# pylint: disable=redefined-builtin; why license is a builtin anyway?
-license = "LGPL-2.1-or-later"
-
-author = "Python Code Quality Authority"
-author_email = "code-quality@python.org"
-mailinglist = "mailto://%s" % author_email
-web = "https://github.com/PyCQA/astroid"
-
-description = "An abstract syntax tree for Python with inference support."
-
-classifiers = [
- "Topic :: Software Development :: Libraries :: Python Modules",
- "Topic :: Software Development :: Quality Assurance",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
- "Programming Language :: Python :: 3.8",
- "Programming Language :: Python :: 3.9",
- "Programming Language :: Python :: Implementation :: CPython",
- "Programming Language :: Python :: Implementation :: PyPy",
-]
diff --git a/pytest.ini b/pytest.ini
deleted file mode 100644
index f3820827..00000000
--- a/pytest.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[pytest]
-python_files=*test_*.py
-addopts=-m "not acceptance"
diff --git a/setup.cfg b/setup.cfg
index 9036261b..4a709ce3 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,8 +1,51 @@
+[metadata]
+name = astroid
+description = An abstract syntax tree for Python with inference support.
+long_description = file: README.rst
+long_description_content_type = text/x-rst
+url = https://github.com/PyCQA/astroid
+author = Python Code Quality Authority
+author_email = code-quality@python.org
+license = LGPL-2.1-or-later
+license_files =
+ LICENSE
+classifiers =
+ Development Status :: 6 - Mature
+ Intended Audience :: Developers
+ License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
+ Operating System :: OS Independent
+ Programming Language :: Python
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3 :: Only
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
+ Programming Language :: Python :: Implementation :: CPython
+ Programming Language :: Python :: Implementation :: PyPy
+ Topic :: Software Development :: Libraries :: Python Modules
+ Topic :: Software Development :: Quality Assurance
+ Topic :: Software Development :: Testing
+keywords = static code analysis,python,abstract syntax tree
+project_urls =
+ "Bug tracker" = https://github.com/PyCQA/astroid/issues
+ "Discord server" = https://discord.gg/kFebW799
+ "Mailing list" = mailto:code-quality@python.org
+
+[options]
+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
+
[aliases]
test = pytest
[tool:pytest]
testpaths = tests
+python_files = *test_*.py
+addopts = -m "not acceptance"
[isort]
multi_line_output = 3
diff --git a/setup.py b/setup.py
index 4a2f8d71..0353024c 100644
--- a/setup.py
+++ b/setup.py
@@ -18,19 +18,11 @@
# pylint: disable=W0404,W0622,W0613
"""Setup script for astroid."""
import os
-import sys
-import warnings
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
-if sys.version_info.major == 3 and sys.version_info.minor <= 5:
- warnings.warn(
- "You will soon need to upgrade to python 3.6 in order to use the latest version of Astroid.",
- DeprecationWarning,
- )
-
real_path = os.path.realpath(__file__)
astroid_dir = os.path.dirname(real_path)
pkginfo = os.path.join(astroid_dir, "astroid", "__pkginfo__.py")
@@ -38,32 +30,12 @@ pkginfo = os.path.join(astroid_dir, "astroid", "__pkginfo__.py")
with open(pkginfo, "rb") as fobj:
exec(compile(fobj.read(), pkginfo, "exec"), locals())
-with open(os.path.join(astroid_dir, "README.rst")) as fobj:
- long_description = fobj.read()
-
-
-needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv)
-pytest_runner = ["pytest-runner"] if needs_pytest else []
-
def install():
return setup(
name="astroid",
version=version,
- license=license,
- description=description,
- long_description=long_description,
- classifiers=classifiers,
- author=author,
- author_email=author_email,
- url=web,
- python_requires=">=3.6",
- install_requires=install_requires,
- extras_require=extras_require,
packages=find_packages(exclude=["tests"]) + ["astroid.brain"],
- setup_requires=pytest_runner,
- test_suite="test",
- tests_require=["pytest"],
)