Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,67 @@ | ||
[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 | ||
|
||
[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} | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how am I supposed to build this?
d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what context?
d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a port maintainer. I guess it needs hatch not "just" hatchling..?
Current port using setuptools
d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only needs
hatchling
d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what do I do with it?
python -m hatchling build
threw an error for me and I gave up.d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specifically:
requires = ["hatchling>=0.22.0", "hatch-vcs"]
d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not supposed to build the wheel yourself. You're supposed to use a wheel builder, such as https://pypi.org/project/build/, which would pull the build dependencies as defined in the
pyproject.toml
- https://github.com/platformdirs/platformdirs/blob/main/pyproject.toml#L3 👍 as defined by the new 6 years old standard https://peps.python.org/pep-0518/d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaborbernat Okay, so I can keep using build, thats nice..
@ofek I am using 0.22.0 though.
The error stays the same when using build.
d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll need both things I listed
d6ab2ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha.. thanks.