Skip to content

Commit

Permalink
Drop Python 3.6, use declarative setup (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov authored Jan 13, 2022
1 parent 063f794 commit 06c7f96
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
needs: [lint]
strategy:
matrix:
pyver: ['3.6', '3.7', '3.8', '3.9', '3.10']
pyver: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu, macos, windows]
include:
- pyver: pypy3
Expand Down
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ SRC = aiosignal tests setup.py

all: test

.install-deps:
.install-deps:
pip install -r requirements/dev.txt
@touch .install-deps

isort:
isort -rc $(SRC)
isort $(SRC)

flake: .flake

.flake: .install-deps $(shell find aiosignal -type f) \
$(shell find tests -type f)
$(shell find tests -type f)
flake8 aiosignal tests
python setup.py check -rms
@if ! isort -c -rc aiosignal tests; then \
echo "Import sort errors, run 'make isort' to fix them!"; \
isort --diff -rc aiosignal tests; \
false; \
@if ! isort -c aiosignal tests; then \
echo "Import sort errors, run 'make isort' to fix them!"; \
isort --diff aiosignal tests; \
false; \
fi
@if ! LC_ALL=C sort -c CONTRIBUTORS.txt; then \
echo "CONTRIBUTORS.txt sort error"; \
echo "CONTRIBUTORS.txt sort error"; \
fi
@touch .flake

Expand All @@ -34,10 +34,10 @@ mypy: .flake
mypy aiosignal

isort-check:
@if ! isort -rc --check-only $(SRC); then \
echo "Import sort errors, run 'make isort' to fix them!!!"; \
isort --diff -rc $(SRC); \
false; \
@if ! isort --check-only $(SRC); then \
echo "Import sort errors, run 'make isort' to fix them!!!"; \
isort --diff $(SRC); \
false; \
fi

check_changes:
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[build-system]
requires = [
"setuptools>=51.0",
"wheel>=0.36",
]
build-backend = "setuptools.build_meta"


[tool.towncrier]
package = "aiosignal"
filename = "CHANGES.rst"
Expand Down
47 changes: 43 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
[aliases]
test = pytest

[metadata]
name = aiosignal
version = attr: aiosignal.__version__
url = https://github.com/aio-libs/aiosignal
project_urls =
Chat: Gitter = https://gitter.im/aio-libs/Lobby
CI: GitHub Actions = https://github.com/aio-libs/aiosignal/actions
Coverage: codecov = https://codecov.io/github/aio-libs/aiosignal
Docs: RTD = https://docs.aiosignal.org
GitHub: issues = https://github.com/aio-libs/aiosignal/issues
GitHub: repo = https://github.com/aio-libs/aiosignal
description = aiosignal: a list of registered asynchronous callbacks
long_description = file: README.rst
long_description_content_type = text/x-rst
maintainer = aiohttp team <[email protected]>
maintainer_email = [email protected]
license = Apache 2.0
license_file = LICENSE
classifiers =
License :: OSI Approved :: Apache Software License

Intended Audience :: Developers

Programming Language :: Python",
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Development Status :: 5 - Production/Stable
Operating System :: POSIX
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows
Framework :: AsyncIO
[options]
python_requires = >=3.7
packages = find:
include_package_data = True
install_requires =
frozenlist >= 1.1.0
[pep8]
max-line-length=79
max-line-length=88
[easy_install]
zip_ok = false
Expand Down
72 changes: 2 additions & 70 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,72 +1,4 @@
import pathlib
import re
import sys

from setuptools import setup

if sys.version_info < (3, 6):
raise RuntimeError("aiosignal 1.x requires Python 3.6+")


here = pathlib.Path(__file__).parent


txt = (here / "aiosignal" / "__init__.py").read_text("utf-8")
try:
version = re.findall(r'^__version__ = "([^"]+)"\r?$', txt, re.M)[0]
except IndexError:
raise RuntimeError("Unable to determine version.")

install_requires = [
"frozenlist>=1.1.0",
]


def read(f):
return (here / f).read_text("utf-8").strip()


args = dict(
name="aiosignal",
version=version,
description="aiosignal: a list of registered asynchronous callbacks",
long_description="\n\n".join((read("README.rst"), read("CHANGES.rst"))),
long_description_content_type="text/x-rst",
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"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 :: 3.10",
"Development Status :: 5 - Production/Stable",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Framework :: AsyncIO",
],
author="Nikolay Kim",
author_email="[email protected]",
maintainer="Martijn Pieters <[email protected]>",
maintainer_email="[email protected]",
url="https://github.com/aio-libs/aiosignal",
project_urls={
"Chat: Gitter": "https://gitter.im/aio-libs/Lobby",
"CI: GitHub Actions": "https://github.com/aio-libs/aiosignal/actions",
"Coverage: codecov": "https://codecov.io/github/aio-libs/aiosignal",
"Docs: RTD": "https://docs.aiosignal.org",
"GitHub: issues": "https://github.com/aio-libs/aiosignal/issues",
"GitHub: repo": "https://github.com/aio-libs/aiosignal",
},
license="Apache 2",
packages=["aiosignal"],
python_requires=">=3.6",
install_requires=install_requires,
include_package_data=True,
)

setup(**args)
if __name__ == "__main__":
setup()

0 comments on commit 06c7f96

Please sign in to comment.