Skip to content

Commit 87e4d66

Browse files
authored
Migrate metadata from setup.py to setup.cfg (#288)
* Migrate metadata from setup.py to setup.cfg Done using https://pypi.org/project/setuptools-py2cfg plus manual modifications. * Update setup.py * Placate isort
1 parent 2b4c163 commit 87e4d66

File tree

2 files changed

+55
-66
lines changed

2 files changed

+55
-66
lines changed

setup.cfg

+54-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,61 @@
1+
[metadata]
2+
license_file = LICENSE
3+
name = flake8-bugbear
4+
version = attr: bugbear.__version__
5+
author = Łukasz Langa
6+
author_email = [email protected]
7+
license = MIT
8+
description = A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.
9+
keywords =
10+
flake8
11+
bugbear
12+
bugs
13+
pyflakes
14+
pylint
15+
linter
16+
qa
17+
url = https://github.com/PyCQA/flake8-bugbear
18+
long_description = file: README.rst
19+
classifiers =
20+
Development Status :: 5 - Production/Stable
21+
Environment :: Console
22+
Framework :: Flake8
23+
Intended Audience :: Developers
24+
License :: OSI Approved :: MIT License
25+
Operating System :: OS Independent
26+
Programming Language :: Python
27+
Programming Language :: Python :: 3
28+
Programming Language :: Python :: 3.6
29+
Programming Language :: Python :: 3.7
30+
Programming Language :: Python :: 3.8
31+
Programming Language :: Python :: 3.9
32+
Programming Language :: Python :: 3 :: Only
33+
Topic :: Software Development :: Libraries :: Python Modules
34+
Topic :: Software Development :: Quality Assurance
35+
project_urls =
36+
Change Log = https://github.com/PyCQA/flake8-bugbear#change-log
37+
38+
[options]
39+
py_modules = bugbear
40+
zip_safe = False
41+
install_requires = flake8 >= 3.0.0; attrs>=19.2.0
42+
python_requires = >=3.6
43+
test_suite = tests.test_bugbear
44+
45+
[options.entry_points]
46+
flake8.extension = B = bugbear:BugBearChecker
47+
48+
[options.extras_require]
49+
dev =
50+
coverage
51+
hypothesis
52+
hypothesmith>=0.2
53+
pre-commit
54+
155
[flake8]
256
# Keep in sync with .flake8. This copy here is needed for source packages
357
# to be able to pass tests without failing selfclean check.
458
ignore = E203, E302, E501, E999, W503
559
max-line-length = 88
660
max-complexity = 12
761
select = B,C,E,F,W,B9
8-
9-
[metadata]
10-
license_file = LICENSE

setup.py

+1-63
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,5 @@
11
# Copyright (C) 2016-2021 Łukasz Langa
22

3-
import ast
4-
import os
5-
import re
6-
import sys
7-
83
from setuptools import setup
94

10-
assert sys.version_info >= (3, 6, 0), "bugbear requires Python 3.6+"
11-
12-
13-
current_dir = os.path.abspath(os.path.dirname(__file__))
14-
with open(os.path.join(current_dir, "README.rst"), encoding="utf8") as ld_file:
15-
long_description = ld_file.read()
16-
17-
18-
_version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)")
19-
20-
21-
with open(os.path.join(current_dir, "bugbear.py"), "r") as f:
22-
version = _version_re.search(f.read()).group("version")
23-
version = str(ast.literal_eval(version))
24-
25-
26-
setup(
27-
name="flake8-bugbear",
28-
version=version,
29-
description=(
30-
"A plugin for flake8 finding likely bugs and design problems "
31-
"in your program. Contains warnings that don't belong in "
32-
"pyflakes and pycodestyle."
33-
),
34-
long_description=long_description,
35-
keywords="flake8 bugbear bugs pyflakes pylint linter qa",
36-
author="Łukasz Langa",
37-
author_email="[email protected]",
38-
url="https://github.com/PyCQA/flake8-bugbear",
39-
license="MIT",
40-
py_modules=["bugbear"],
41-
zip_safe=False,
42-
python_requires=">=3.6",
43-
install_requires=["flake8 >= 3.0.0", "attrs>=19.2.0"],
44-
test_suite="tests.test_bugbear",
45-
classifiers=[
46-
"Development Status :: 5 - Production/Stable",
47-
"Environment :: Console",
48-
"Framework :: Flake8",
49-
"Intended Audience :: Developers",
50-
"License :: OSI Approved :: MIT License",
51-
"Operating System :: OS Independent",
52-
"Programming Language :: Python",
53-
"Programming Language :: Python :: 3",
54-
"Programming Language :: Python :: 3.6",
55-
"Programming Language :: Python :: 3.7",
56-
"Programming Language :: Python :: 3.8",
57-
"Programming Language :: Python :: 3.9",
58-
"Programming Language :: Python :: 3 :: Only",
59-
"Topic :: Software Development :: Libraries :: Python Modules",
60-
"Topic :: Software Development :: Quality Assurance",
61-
],
62-
entry_points={"flake8.extension": ["B = bugbear:BugBearChecker"]},
63-
extras_require={
64-
"dev": ["coverage", "hypothesis", "hypothesmith>=0.2", "pre-commit"]
65-
},
66-
project_urls={"Change Log": "https://github.com/PyCQA/flake8-bugbear#change-log"},
67-
)
5+
setup()

0 commit comments

Comments
 (0)