From d6ab2ca5bb19d0c707352d826d76785d085d165f Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sun, 17 Apr 2022 18:34:35 -0400 Subject: [PATCH] Update package metadata (#75) --- .pre-commit-config.yaml | 5 --- pyproject.toml | 70 ++++++++++++++++++++++++++++++++++------- setup.cfg | 56 --------------------------------- setup.py | 5 --- 4 files changed, 59 insertions(+), 77 deletions(-) delete mode 100644 setup.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26b7c12..774d417 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,11 +39,6 @@ repos: hooks: - id: tox-ini-fmt args: [ "-p", "fix" ] - - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.20.1 - hooks: - - id: setup-cfg-fmt - args: [ --min-py3-version, "3.7", "--max-py-version", "3.10" ] - repo: https://github.com/PyCQA/flake8 rev: 4.0.1 hooks: diff --git a/pyproject.toml b/pyproject.toml index ddf56c8..18d662f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,63 @@ [build-system] -requires = ["setuptools >= 44", "wheel >= 0.30", "setuptools_scm[toml]>=5"] -build-backend = "setuptools.build_meta" +build-backend = "hatchling.build" +requires = ["hatchling>=0.22.0", "hatch-vcs"] + +[project] +name = "platformdirs" +description = 'A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".' +readme = "README.rst" +license = "MIT" +maintainers = [ + { name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }, + { name = "Julian Berman", email = "Julian@GrayVines.com" }, + { name = "Ofek Lev", email = "oss@ofek.dev" }, + { name = "Ronny Pfannschmidt", email = "opensource@ronnypfannschmidt.de" }, +] +urls.Documentation = "https://platformdirs.readthedocs.io" +urls.Homepage = "https://github.com/platformdirs/platformdirs" +urls.Source = "https://github.com/platformdirs/platformdirs" +urls.Tracker = "https://github.com/platformdirs/platformdirs/issues" +requires-python = ">=3.7" +optional-dependencies.test = [ + "appdirs==1.4.4", + "pytest>=6", + "pytest-cov>=2.7", + "pytest-mock>=3.6", +] +optional-dependencies.docs = [ + "furo>=2021.7.5b38", + "proselint>=0.10.2", + "sphinx>=4", + "sphinx-autodoc-typehints>=1.12", +] +keywords = ["application", "cache", "directory", "log", "user"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dynamic = ["version"] + +[tool.hatch] +build.hooks.vcs.template = ''' +"""Version information""" + +__version__ = "{version}" +__version_info__ = {version_tuple} +''' +build.hooks.vcs.version-file = "src/platformdirs/version.py" +version.source = "vcs" [tool.black] line-length = 120 @@ -8,12 +65,3 @@ line-length = 120 [tool.isort] profile = "black" known_first_party = ["platformdirs"] - -[tool.setuptools_scm] -write_to = "src/platformdirs/version.py" -write_to_template = """ -\"\"\" Version information \"\"\" - -__version__ = "{version}" -__version_info__ = {version_tuple} -""" diff --git a/setup.cfg b/setup.cfg index 1a4ab63..265ce83 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,59 +1,3 @@ -[metadata] -name = platformdirs -description = A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir". -long_description = file: README.rst -long_description_content_type = text/x-rst -url = https://github.com/platformdirs/platformdirs -maintainer = Bernát Gábor, Julian Berman, Ofek Lev, Ronny Pfannschmidt -maintainer_email = gaborjbernat@gmail.com, Julian@GrayVines.com, oss@ofek.dev, opensource@ronnypfannschmidt.de -license = MIT -license_file = LICENSE.txt -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: MIT License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Topic :: Software Development :: Libraries :: Python Modules -keywords = application directory log cache user -project_urls = - Source=https://github.com/platformdirs/platformdirs - Tracker=https://github.com/platformdirs/platformdirs/issues - Documentation=https://platformdirs.readthedocs.io/ - -[options] -packages = find: -python_requires = >=3.7 -package_dir = - =src -zip_safe = True - -[options.packages.find] -where = src - -[options.extras_require] -docs = - Sphinx>=4 - furo>=2021.7.5b38 - proselint>=0.10.2 - sphinx-autodoc-typehints>=1.12 -test = - appdirs==1.4.4 - pytest>=6 - pytest-cov>=2.7 - pytest-mock>=3.6 - -[options.package_data] -platformdirs = py.typed - [flake8] max-line-length = 120 dictionaries = en_US,python,technical diff --git a/setup.py b/setup.py deleted file mode 100644 index a03590f..0000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -from __future__ import annotations - -from setuptools import setup - -setup()