Skip to content

Commit 06c7f96

Browse files
authored
Drop Python 3.6, use declarative setup (#267)
1 parent 063f794 commit 06c7f96

File tree

5 files changed

+66
-87
lines changed

5 files changed

+66
-87
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
needs: [lint]
7575
strategy:
7676
matrix:
77-
pyver: ['3.6', '3.7', '3.8', '3.9', '3.10']
77+
pyver: ['3.7', '3.8', '3.9', '3.10']
7878
os: [ubuntu, macos, windows]
7979
include:
8080
- pyver: pypy3

Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ SRC = aiosignal tests setup.py
44

55
all: test
66

7-
.install-deps:
7+
.install-deps:
88
pip install -r requirements/dev.txt
99
@touch .install-deps
1010

1111
isort:
12-
isort -rc $(SRC)
12+
isort $(SRC)
1313

1414
flake: .flake
1515

1616
.flake: .install-deps $(shell find aiosignal -type f) \
17-
$(shell find tests -type f)
17+
$(shell find tests -type f)
1818
flake8 aiosignal tests
1919
python setup.py check -rms
20-
@if ! isort -c -rc aiosignal tests; then \
21-
echo "Import sort errors, run 'make isort' to fix them!"; \
22-
isort --diff -rc aiosignal tests; \
23-
false; \
20+
@if ! isort -c aiosignal tests; then \
21+
echo "Import sort errors, run 'make isort' to fix them!"; \
22+
isort --diff aiosignal tests; \
23+
false; \
2424
fi
2525
@if ! LC_ALL=C sort -c CONTRIBUTORS.txt; then \
26-
echo "CONTRIBUTORS.txt sort error"; \
26+
echo "CONTRIBUTORS.txt sort error"; \
2727
fi
2828
@touch .flake
2929

@@ -34,10 +34,10 @@ mypy: .flake
3434
mypy aiosignal
3535

3636
isort-check:
37-
@if ! isort -rc --check-only $(SRC); then \
38-
echo "Import sort errors, run 'make isort' to fix them!!!"; \
39-
isort --diff -rc $(SRC); \
40-
false; \
37+
@if ! isort --check-only $(SRC); then \
38+
echo "Import sort errors, run 'make isort' to fix them!!!"; \
39+
isort --diff $(SRC); \
40+
false; \
4141
fi
4242

4343
check_changes:

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=51.0",
4+
"wheel>=0.36",
5+
]
6+
build-backend = "setuptools.build_meta"
7+
8+
19
[tool.towncrier]
210
package = "aiosignal"
311
filename = "CHANGES.rst"

setup.cfg

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,50 @@
1-
[aliases]
2-
test = pytest
3-
41
[metadata]
2+
name = aiosignal
3+
version = attr: aiosignal.__version__
4+
url = https://github.com/aio-libs/aiosignal
5+
project_urls =
6+
Chat: Gitter = https://gitter.im/aio-libs/Lobby
7+
CI: GitHub Actions = https://github.com/aio-libs/aiosignal/actions
8+
Coverage: codecov = https://codecov.io/github/aio-libs/aiosignal
9+
Docs: RTD = https://docs.aiosignal.org
10+
GitHub: issues = https://github.com/aio-libs/aiosignal/issues
11+
GitHub: repo = https://github.com/aio-libs/aiosignal
12+
description = aiosignal: a list of registered asynchronous callbacks
13+
long_description = file: README.rst
14+
long_description_content_type = text/x-rst
15+
maintainer = aiohttp team <[email protected]>
16+
maintainer_email = [email protected]
17+
license = Apache 2.0
518
license_file = LICENSE
19+
classifiers =
20+
License :: OSI Approved :: Apache Software License
21+
22+
Intended Audience :: Developers
23+
24+
Programming Language :: Python",
25+
Programming Language :: Python :: 3
26+
Programming Language :: Python :: 3 :: Only
27+
Programming Language :: Python :: 3.7
28+
Programming Language :: Python :: 3.8
29+
Programming Language :: Python :: 3.9
30+
Programming Language :: Python :: 3.10
31+
32+
Development Status :: 5 - Production/Stable
33+
Operating System :: POSIX
34+
Operating System :: MacOS :: MacOS X
35+
Operating System :: Microsoft :: Windows
36+
Framework :: AsyncIO
37+
38+
[options]
39+
python_requires = >=3.7
40+
packages = find:
41+
include_package_data = True
42+
43+
install_requires =
44+
frozenlist >= 1.1.0
645
746
[pep8]
8-
max-line-length=79
47+
max-line-length=88
948
1049
[easy_install]
1150
zip_ok = false

setup.py

Lines changed: 2 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,4 @@
1-
import pathlib
2-
import re
3-
import sys
4-
51
from setuptools import setup
62

7-
if sys.version_info < (3, 6):
8-
raise RuntimeError("aiosignal 1.x requires Python 3.6+")
9-
10-
11-
here = pathlib.Path(__file__).parent
12-
13-
14-
txt = (here / "aiosignal" / "__init__.py").read_text("utf-8")
15-
try:
16-
version = re.findall(r'^__version__ = "([^"]+)"\r?$', txt, re.M)[0]
17-
except IndexError:
18-
raise RuntimeError("Unable to determine version.")
19-
20-
install_requires = [
21-
"frozenlist>=1.1.0",
22-
]
23-
24-
25-
def read(f):
26-
return (here / f).read_text("utf-8").strip()
27-
28-
29-
args = dict(
30-
name="aiosignal",
31-
version=version,
32-
description="aiosignal: a list of registered asynchronous callbacks",
33-
long_description="\n\n".join((read("README.rst"), read("CHANGES.rst"))),
34-
long_description_content_type="text/x-rst",
35-
classifiers=[
36-
"License :: OSI Approved :: Apache Software License",
37-
"Intended Audience :: Developers",
38-
"Programming Language :: Python",
39-
"Programming Language :: Python :: 3",
40-
"Programming Language :: Python :: 3 :: Only",
41-
"Programming Language :: Python :: 3.6",
42-
"Programming Language :: Python :: 3.7",
43-
"Programming Language :: Python :: 3.8",
44-
"Programming Language :: Python :: 3.9",
45-
"Programming Language :: Python :: 3.10",
46-
"Development Status :: 5 - Production/Stable",
47-
"Operating System :: POSIX",
48-
"Operating System :: MacOS :: MacOS X",
49-
"Operating System :: Microsoft :: Windows",
50-
"Framework :: AsyncIO",
51-
],
52-
author="Nikolay Kim",
53-
author_email="[email protected]",
54-
maintainer="Martijn Pieters <[email protected]>",
55-
maintainer_email="[email protected]",
56-
url="https://github.com/aio-libs/aiosignal",
57-
project_urls={
58-
"Chat: Gitter": "https://gitter.im/aio-libs/Lobby",
59-
"CI: GitHub Actions": "https://github.com/aio-libs/aiosignal/actions",
60-
"Coverage: codecov": "https://codecov.io/github/aio-libs/aiosignal",
61-
"Docs: RTD": "https://docs.aiosignal.org",
62-
"GitHub: issues": "https://github.com/aio-libs/aiosignal/issues",
63-
"GitHub: repo": "https://github.com/aio-libs/aiosignal",
64-
},
65-
license="Apache 2",
66-
packages=["aiosignal"],
67-
python_requires=">=3.6",
68-
install_requires=install_requires,
69-
include_package_data=True,
70-
)
71-
72-
setup(**args)
3+
if __name__ == "__main__":
4+
setup()

0 commit comments

Comments
 (0)