diff --git a/CHANGELOG.md b/CHANGELOG.md index dd21bc7..f65bdb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -ยจ# Changelog +# Changelog All notable changes to this project will be documented in this file. @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added metadata to mark support for Python 3.12 and enabled CI checks for it +- Implemented PEP-621 ### Changed diff --git a/pyproject.toml b/pyproject.toml index 92a5183..c08a3ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,66 @@ build-backend = "setuptools.build_meta" # ============================================================================== +[project] +name = 'cmake_pre_commit_hooks' +authors = [ + {name = 'Damien Nguyen', email = 'ngn.damien@gmail.com'}, +] +description = 'pre-commit hooks for CMake-based projects' +readme = 'README.md' +requires-python = '>=3.8' +keywords = [ +] +license = {text = 'Apache2'} +classifiers = [ + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', +] +dependencies = [ + 'toml', + 'CLinters>=1.3.0', + 'fasteners', + 'filelock', + 'attrs>=23' +] +dynamic = ['version'] + +[project.urls] +Homepage = 'https://github.com/Takishima/cmake-pre-commit-hooks' +Pypi = 'https://pypi.org/project/cmake-pre-commit-hooks/' +Repository = 'https://github.com/Takishima/cmake-pre-commit-hooks' +Issues = 'https://github.com/Takishima/cmake-pre-commit-hooks/issues' +Changelog = 'https://github.com/Takishima/cmake-pre-commit-hooks/blob/main/CHANGELOG.md' + +[project.optional-dependencies] +clang-format = ['clang-format'] +clang-tidy = ['clang-tidy'] +lizard = ['lizard'] +test = ['pytest', 'pytest-cov', 'pytest-mock', 'mock'] + +[project.scripts] +cmake-pc-clang-format-hook = 'cmake_pc_hooks.clang_format:main' +cmake-pc-clang-tidy-hook = 'cmake_pc_hooks.clang_tidy:main' +cmake-pc-cppcheck-hook = 'cmake_pc_hooks.cppcheck:main' +cmake-pc-cpplint-hook = 'cmake_pc_hooks.cpplint:main' +cmake-pc-include-what-you-use-hook = 'cmake_pc_hooks.include_what_you_use:main' +cmake-pc-lizard-hook = 'cmake_pc_hooks.lizard:main' + +[tool.distutils.bdist_wheel] +universal = true + +[tool.setuptools.packages.find] +include = ['cmake_pc_hooks'] +namespaces = false + +# ============================================================================== + [tool.ruff] line-length = 120 target-version = 'py38' diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 41d258f..0000000 --- a/setup.cfg +++ /dev/null @@ -1,59 +0,0 @@ -[metadata] -name = cmake_pre_commit_hooks -description = pre-commit hooks for CMake based projects -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/Takishima/cmake-pre-commit-hooks -author = Damien Nguyen -author_email = ngn.damien@gmail.com -license = Apache2 -license_file = LICENSE -classifiers = - License :: OSI Approved :: Apache Software License - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - - -[options] -packages = find: -python_requires = >=3.8 -install_requires = - toml - CLinters >= 1.3.0 - fasteners - filelock - attrs >= 23 - -[options.entry_points] -console_scripts = - cmake-pc-clang-format-hook = cmake_pc_hooks.clang_format:main - cmake-pc-clang-tidy-hook = cmake_pc_hooks.clang_tidy:main - cmake-pc-cppcheck-hook = cmake_pc_hooks.cppcheck:main - cmake-pc-cpplint-hook = cmake_pc_hooks.cpplint:main - cmake-pc-include-what-you-use-hook = cmake_pc_hooks.include_what_you_use:main - cmake-pc-lizard-hook = cmake_pc_hooks.lizard:main - - -[options.extras_require] - -clang-format = - clang-format - -lizard = - lizard - -test = - pytest - pytest-cov - pytest-mock - mock - -[bdist_wheel] -universal = True - -# ==============================================================================