diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0f99b1..fd01aff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,14 +5,27 @@ repos: - id: isort name: isort (python) - - repo: https://github.com/psf/black - rev: 23.7.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 23.10.1 hooks: - id: black name: black (python) - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: + - id: check-toml + - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace + + - repo: https://github.com/tox-dev/pyproject-fmt + rev: 1.4.1 + hooks: + - id: pyproject-fmt + additional_dependencies: [tox] + + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.15 + hooks: + - id: validate-pyproject diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f2ed994 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,60 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=61.2", +] + +[project] +name = "python-docs-bootstrapper" +version = "0.1.1" +description = "Bootstrapper for Python documentation translations" +readme = "README.md" +keywords = [ + "automation", + "CLI", + "documentation", + "i18n", + "python-docs", + "sphinx", + "translation", + "utilities", +] +license = {text = "MIT"} +authors = [{name = "egeakman", email = "me@egeakman.dev"}] +requires-python = ">=3.10" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "License :: OSI Approved :: MIT License", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Utilities", +] +dependencies = [ + "sphinx==4.5", +] +[project.urls] +Releases = "https://github.com/egeakman/python-docs-bootstrapper/releases" +Homepage = "https://github.com/egeakman/python-docs-bootstrapper" +Issues = "https://github.com/egeakman/python-docs-bootstrapper/issues" +[project.scripts] +bootstrapper = "bootstrapper.bootstrapper:main" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["."] +namespaces = false + +[tool.setuptools.package-data] +bootstrapper = [ + "data/.gitignore", + "data/Makefile", + "data/README.md", +] diff --git a/setup.py b/setup.py deleted file mode 100644 index 75b3bea..0000000 --- a/setup.py +++ /dev/null @@ -1,55 +0,0 @@ -from setuptools import find_packages, setup - -version = "0.1.1" - -with open("README.md", "r", encoding="utf-8") as f: - long_description = f.read() - -setup( - name="python-docs-bootstrapper", - author="egeakman", - author_email="me@egeakman.dev", - url="https://github.com/egeakman/python-docs-bootstrapper", - description="Bootstrapper for Python documentation translations", - long_description=long_description, - long_description_content_type="text/markdown", - version=version, - license="MIT", - download_url=f"https://github.com/egeakman/python-docs-bootstrapper/archive/{version}.tar.gz", - packages=find_packages(where="."), - install_requires=["sphinx==4.5.0"], - include_package_data=True, - package_data={ - "bootstrapper": ["data/.gitignore", "data/Makefile", "data/README.md"] - }, - python_requires=">=3.10", - entry_points={ - "console_scripts": [ - "bootstrapper=bootstrapper.bootstrapper:main", - ] - }, - classifiers=[ - "Topic :: Utilities", - "Programming Language :: Python :: 3 :: Only", - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "License :: OSI Approved :: MIT License", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX :: Linux", - "Operating System :: MacOS :: MacOS X", - ], - keywords=[ - "documentation", - "translation", - "sphinx", - "i18n", - "python-docs", - "CLI", - "automation", - "utilities", - ], - project_urls={ - "Homepage": "https://github.com/egeakman/python-docs-bootstrapper", - "Issues": "https://github.com/egeakman/python-docs-bootstrapper/issues", - }, -)