-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Conversation
pyproject.toml
Outdated
__version_info__ = {version_tuple} | ||
''' | ||
build.hooks.vcs.version-file = "src/platformdirs/version.py" | ||
build.targets.sdist.include = ["/src", "/tests", "/tox.ini"] |
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.
Hmm, why do we need these?
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.
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.
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.
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?
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.
Everything by default too, removing now
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.
Can you define everything? Everything that's version-controlled and everything in the working directory are very different 😆
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.
Ha true, the former: https://ofek.dev/hatch/latest/plugins/builder/#default-file-selection_1
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.
(LGTM after Bernat's question!)
@@ -39,11 +39,6 @@ repos: | |||
hooks: | |||
- id: tox-ini-fmt | |||
args: [ "-p", "fix" ] | |||
- repo: https://github.com/asottile/setup-cfg-fmt |
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.
Can you add https://github.com/tox-dev/pyproject-fmt instead now?
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.
CI failing
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.
Will have a look 👍
black needed upgrading psf/black#2966 |
Should I just remove the pyproject-fmt hook? |
Sure 👍 |
Summary of changes
This implements PEP 621, obviating the need for
setup.py
. The build backendhatchling
(of which I am a maintainer) is quite stable and actively developed, the only reason the version is 0.x is because 1.0.0 will drop support for Python 2. It's also on the major distribution channels such as Debian, Fedora, Arch Linux, conda-forge, Nixpkgs, etc.In comparison to
setuptools
, Hatchling has reproducible builds, supports the modern PEP 660 editable installation standard, has a more intuitive plugin system, and the codebase is an order of magnitude smaller thus making it more auditable and less prone to bugs.Notes
setup.cfg