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

Update package metadata #75

merged 7 commits into from Apr 17, 2022

Conversation

ofek
Copy link
Contributor

@ofek ofek commented Mar 30, 2022

Summary of changes

This implements PEP 621, obviating the need for setup.py. The build backend hatchling (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

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated
__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.

Copy link
Member

@Julian Julian left a 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
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 👍

@ofek
Copy link
Contributor Author

ofek commented Mar 30, 2022

black needed upgrading psf/black#2966

@ofek
Copy link
Contributor Author

ofek commented Apr 14, 2022

Should I just remove the pyproject-fmt hook?

@gaborbernat
Copy link
Contributor

Sure 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants