diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..17dc2560 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,62 @@ +[build-system] +build-backend = 'setuptools.build_meta' +requires = ['setuptools'] + +[project] +name = 'pre_commit' +version = '3.7.1' +description = 'A framework for managing and maintaining multi-language pre-commit hooks.' +license = { text = 'MIT' } +readme = { file = 'README.md', content-type = 'text/markdown' } +authors = [{ name = 'Anthony Sottile', email = 'asottile@umich.edu' }] +requires-python = '>=3.9' +classifiers = [ + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', +] +dependencies = [ + 'cfgv>=2.0.0', + 'identify>=1.0.0', + 'nodeenv>=0.11.1', + 'pyyaml>=5.1', + 'virtualenv>=20.10.0', +] + +[project.urls] +Homepage = 'https://github.com/pre-commit/pre-commit' + +[project.scripts] +pre-commit = 'pre_commit.main:main' + +[tool.setuptools] +include-package-data = false +license-files = ['LICENSE'] + +[tool.setuptools.packages.find] +exclude = ['tests*', 'testing*'] +namespaces = false + +[tool.setuptools.package-data] +'pre_commit.resources' = ['*.tar.gz', 'empty_template_*', 'hook-tmpl'] + +[tool.distutils.bdist_wheel] +universal = true + +[tool.coverage.run] +plugins = ['covdefaults'] +omit = ['pre_commit/resources/*'] + +[tool.mypy] +check_untyped_defs = true +disallow_any_generics = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +warn_redundant_casts = true +warn_unused_ignores = true + +[[tool.mypy.overrides]] +module = ['testing.*', 'tests.*'] +disallow_untyped_defs = false diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 83c09acd..00000000 --- a/setup.cfg +++ /dev/null @@ -1,63 +0,0 @@ -[metadata] -name = pre_commit -version = 3.7.1 -description = A framework for managing and maintaining multi-language pre-commit hooks. -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/pre-commit/pre-commit -author = Anthony Sottile -author_email = asottile@umich.edu -license = MIT -license_files = LICENSE -classifiers = - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - -[options] -packages = find: -install_requires = - cfgv>=2.0.0 - identify>=1.0.0 - nodeenv>=0.11.1 - pyyaml>=5.1 - virtualenv>=20.10.0 -python_requires = >=3.9 - -[options.packages.find] -exclude = - tests* - testing* - -[options.entry_points] -console_scripts = - pre-commit = pre_commit.main:main - -[options.package_data] -pre_commit.resources = - *.tar.gz - empty_template_* - hook-tmpl - -[bdist_wheel] -universal = True - -[coverage:run] -plugins = covdefaults -omit = pre_commit/resources/* - -[mypy] -check_untyped_defs = true -disallow_any_generics = true -disallow_incomplete_defs = true -disallow_untyped_defs = true -warn_redundant_casts = true -warn_unused_ignores = true - -[mypy-testing.*] -disallow_untyped_defs = false - -[mypy-tests.*] -disallow_untyped_defs = false diff --git a/setup.py b/setup.py deleted file mode 100644 index 3d93aefb..00000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -from __future__ import annotations - -from setuptools import setup -setup()