Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package metadata #75

Merged
merged 7 commits into from Apr 17, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Expand Up @@ -39,11 +39,6 @@ repos:
hooks:
- id: tox-ini-fmt
args: [ "-p", "fix" ]
- repo: https://github.com/asottile/setup-cfg-fmt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add https://github.com/tox-dev/pyproject-fmt instead now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will have a look 👍

rev: v1.20.0
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:
Expand Down
71 changes: 60 additions & 11 deletions pyproject.toml
@@ -1,19 +1,68 @@
[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"
build.targets.sdist.include = ["/src", "/tests", "/tox.ini"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, why do we need these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well there was no MANIFEST.in to go by so I thought this was a decent default. I can remove this if we want to ship everything.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because setuptools-scm packages every VCS file by default into the sdist, there's no need for a MANIFEST.in. How does hatchling decide what to put in the sdist?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything by default too, removing now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you define everything? Everything that's version-controlled and everything in the working directory are very different 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version.source = "vcs"

[tool.black]
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}
"""
56 changes: 0 additions & 56 deletions 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
Expand Down
5 changes: 0 additions & 5 deletions setup.py

This file was deleted.