mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Migrate setup.{cfg,py} logic to pyproject.toml
This commit is contained in:
parent
faa6f8c70c
commit
d0cb55f9b8
3 changed files with 62 additions and 67 deletions
62
pyproject.toml
Normal file
62
pyproject.toml
Normal file
|
|
@ -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
|
||||||
63
setup.cfg
63
setup.cfg
|
|
@ -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
|
|
||||||
4
setup.py
4
setup.py
|
|
@ -1,4 +0,0 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from setuptools import setup
|
|
||||||
setup()
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue