diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bfc298e..9cb1c31 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,9 +30,11 @@ repos: - id: mypy # Passing filenames to mypy can do odd things. See # https://github.com/pre-commit/mirrors-mypy/issues/33. - # mypy.ini determines the set of files that will actually be checked. + # pyproject.toml determines the set of files that will actually be + # checked. pass_filenames: false - # The pre-commit hook passes some options, but we set options in mypy.ini. + # The pre-commit hook passes some options, but we set options in + # pyproject.toml. args: [] additional_dependencies: [ 'async-timeout==4.0.3', diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index c0ead5e..0000000 --- a/mypy.ini +++ /dev/null @@ -1,6 +0,0 @@ -[mypy] -python_version = 3.8 -files = src/aiokatcp, examples, tests - -[mypy-async_solipsism.*] -ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index cf529a9..c755884 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,58 @@ [build-system] requires = ["setuptools", "setuptools_scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "aiokatcp" +authors = [ + {name = "Bruce Merry", email = "bmerry@sarao.ac.za"} +] +description = "Asynchronous I/O implementation of the katcp protocol" +readme = "README.rst" +requires-python = ">=3.8" +license = {text = "BSD-3-Clause"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Framework :: AsyncIO", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Scientific/Engineering :: Astronomy", +] +keywords = [ + "asyncio", + "katcp", +] +dependencies = [ + "async-timeout", + "decorator>=4.1", + "katcp-codec", + "typing-extensions", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/ska-sa/aiokatcp" +Repository = "https://github.com/ska-sa/aiokatcp" +Documentation = "https://aiokatcp.readthedocs.io/" +Changelog = "https://aiokatcp.readthedocs.io/en/latest/changelog.html" + +[project.scripts] +katcpcmd = "aiokatcp.tools.katcpcmd:main" + +[project.optional-dependencies] +test = [ + "async-solipsism", + "pytest", + "pytest-asyncio", + "pytest-mock", +] +doc = [ + "sphinx", + "sphinx-rtd-theme", +] [tool.setuptools_scm] version_file = "src/aiokatcp/_version.py" @@ -10,3 +63,10 @@ line_length = 100 [tool.black] line-length = 100 + +[tool.mypy] +python_version = "3.8" +files = ["src/aiokatcp", "examples", "tests"] +[[tool.mypy.overrides]] +module = "async_solipsism.*" +ignore_missing_imports = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 1cbdb6c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,53 +0,0 @@ -[metadata] -name = aiokatcp -description = Asynchronous I/O implementation of the katcp protocol -long_description = file: README.rst -long_description_content_type = text/x-rst -author = Bruce Merry -author_email = bmerry@sarao.ac.za -url = https://github.com/ska-sa/aiokatcp -license = BSD -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Framework :: AsyncIO - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python :: 3 - Topic :: Software Development :: Libraries :: Python Modules - Topic :: Scientific/Engineering :: Astronomy -keywords = - asyncio - katcp - -[options] -package_dir = - = src -packages = find: -install_requires = - async-timeout - decorator>=4.1 - katcp-codec - typing-extensions -python_requires = >=3.8 -zip_safe = False # For py.typed - -[options.extras_require] -test = - async-solipsism - pytest - pytest-asyncio - pytest-mock -doc = - sphinx - sphinx-rtd-theme - -[options.packages.find] -where = src - -[options.package_data] -* = py.typed - -[options.entry_points] -console_scripts = - katcpcmd = aiokatcp.tools.katcpcmd:main