-
Notifications
You must be signed in to change notification settings - Fork 353
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 #300
base: master
Are you sure you want to change the base?
Conversation
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.
Wow! Rocketing into the future here. boltons is a simple library, so this makes a lot of sense, and I appreciate you taking the time!
One small change, and a couple thoughts/concerns:
- Hatchling seems very new (still 0ver ;) ). What's the plan for maintenance/stability?
- Does Hatch/Hatchling offer anything like packaging tests we can add to the tox.ini?
Thanks in advance!
Co-authored-by: Mahmoud Hashemi <[email protected]>
It is quite stable and actively maintained, the only reason the version is 0.x is because 1.0.0 will drop support for Python 2.
If you mean like checking the contents of the sdist |
Oh btw it's also on conda-forge, Debian, Fedora, etc. |
@mahmoud Would you mind triggering the CI with that button below? |
Done :) All green.
I guess my main concern is that Hatchling first came out (0.3) two months ago? And I love the velocity, but it also makes me nervous should something break. Presumably I'd own the fix at that point :) Longer term, what's your recommendation when setuptools support lands?
MANIFEST.in could certainly be tricky, but even in this modern approach, couldn't the includes here go out of sync if a new file is added? Finally, maybe a very simple question, but if someone were to seek to install boltons from a source distribution built with this modern approach, how would it be recommended they do that without a setup.py? Does pip know what to do these days? |
No it would be on the maintainers, just as if you used
I still would not use it. I can briefly tell you why we moved: Our goal is to remove all setuptoolsDisadvantages:
Flit
Disadvantages:
Poetry
This was actually a no-go option for us due to its persistent unwillingness to adopt new standards if they are deemed suboptimal (see comments on PEP 621 and PEP 665) Hatchling
Well yes of course. If you want everything added to the source distribution that section can just be omitted, or define exclude.
Yes, since version 19.0. |
Just let me know if you want me to do anything else here! |
You could also just use the setuptools build backend. build-backend = "setuptools.build_meta" It's pretty standardized and I don't think there are any concerns about maintenance. Also, since a build backend has a standard to follow, if Hatchling really takes off, it wouldn't be hard to switch to it. The mentioned lack of support for [build-system]
requires = [
"setuptools ~= 61.0",
"wheel",
"build",
]
build-backend = "setuptools.build_meta"
[project]
name = "boltons"
version = "21.0.1dev"
description = "When they're not builtins, they're boltons."
urls = { "homepage" = "https://github.com/mahmoud/boltons" }
authors = [
{ "name" = "Mahmoud Hashemi", "email" = "[email protected]" },
]
license = { "text" = "BSD" }
classifiers = [
"Topic :: Utilities",
"Topic :: Software Development :: Libraries",
"Intended Audience :: Developers",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
[project.optional-dependencies]
test = [
"tox",
] That's all you'd theoretically need; no need for |
Support landed a few days ago and is experimental. See notes and fixes: https://setuptools.pypa.io/en/latest/history.html
True but in comparison to |
I'm not sure having Really though @ofek I'm not disagreeing with your analysis; my swing through Hatchling actually impressed me and I'm going to take it for a spin on a personal project so I have a reminder to keep an eye on it. It may be (probably even IS?) the superior project. I hope it takes off! Really though, technical analysis aside, my preference for widespread important projects like Of course it's not my call at all 😄 - I was just popping by to leave an unsolicited opinion 😉 |
Small update: Hatch will likely be adopted by PyPA in the next week
Nothing major will change, just the repo location |
Transfer complete! https://github.com/pypa/hatch |
Background
Hello there! The Python packaging ecosystem has now standardized on the interface for build backends (PEP 517/PEP 660) and the format for metadata declaration (PEP 621/PEP 631).
As such, I'm spending my free time updating important projects so that they are modernized and set an example for others 😄
Summary of changes
This implements PEP 621, obviating the need for
setup.py
,setup.cfg
, andMANIFEST.in
. Support has not landed insetuptools
, so builds will now usehatchling
.I've done this for such projects as pipx, all Datadog Agent integrations, etc.
Notes
hatchling
and other build backends likesetuptools
have already done so. This will not break anything becausepip
only looks for version candidates that satisfy therequires-python
field. Here are stats for the curious: https://pypistats.org/packages/boltons