-
Notifications
You must be signed in to change notification settings - Fork 151
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
feat: move to flit backend #501
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #501 +/- ##
=======================================
Coverage 68.35% 68.35%
=======================================
Files 12 12
Lines 929 929
=======================================
Hits 635 635
Misses 294 294 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
3772ab3
to
7edc0c3
Compare
Before you go any further, I would probably be only interested in switching to flit in v1.0.0 (the |
IMO, it would be easier to separate changes (this, then We've moved over Also, I'm following your lead of adding the backward-compatibility "setup.py" in the SDist. I don't think it's very useful, someone can use installer or bootstrap flit-core, but it's still there. |
7edc0c3
to
8773bef
Compare
And this precisely has been the source of trouble every time I try making a "radical" change to wheel. |
Yes, because you tried to move a year or two ago before anyone else had moved. Now FYI, running isort via pre-commit was broken two days ago by Poetry-core 1.5.0 (and they are the ones pushing for major version pinning, 🤣) - this branch works, but the main branch has a broken pre-commit due to isort. (noticed working on #422). Updating isort fixes it. |
Neither
I'm curious: what does this have to do with major version pinning? |
This should help with Poetry-core made a breaking change in a minor release that broke at least one major package (isort - which happens to be used via pre-commit, which builds from SDists unless you make a mirror). Poetry strongly insists on following SerVer and major version pinning (like poetry-core<2), while a lot of people (like me, I also link to others) really, really don't like. And they claim it protects you from exactly what they just did. :) |
That depends on whether or not they knew that the change was breaking. SemVer does give consumers some degree of protection from breaking changes, but that doesn't automatically protect from developer mistakes. I take it that they reverted the breaking change soon after? That is at least how SemVer is supposed to work. |
I went and fixed the pre-commit failure on main, and that caused the conflict you're seeing here. Sorry about that. |
8773bef
to
8b19da1
Compare
That's fine, I don't mind rebasing.
Nope, they considered it isort's problem. |
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.
Some questions, remarks and change requests.
I resolved the things I addressed with code changes. If I just respond, I didn't resolve. Tox's pyproject.toml support is... interesting. But I guess it works. :) |
Tox was supposed to get proper |
Per PEP-518 [0], for projects using setuptools as the build backend, both setuptools and wheel are to be specified, as wheel is a plugin for setuptools to support the format at all. Additionally, wheel itself will soon [1] not depend on setuptools, but rather the dependency tree will reverse. With hat: python Approved by: mentors (implicit), swills (maintainer, implicit) References: https://peps.python.org/pep-0518/#build-system-table [0] pypa/wheel#501 [1]
Is |
873deec
to
7cb3d25
Compare
Fixed flit_scm installation Fixed FreeBSD test suite Switched build backend to flit_core Removed configuration required previously by flit-scm
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
8eee7bc
to
f24840d
Compare
Signed-off-by: Henry Schreiner <[email protected]>
Thanks! |
Shouldn't there be a runtime dependency on setuptools? The > .\venv\Scripts\wheel.exe convert
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File ".\venv\Scripts\wheel.exe\__main__.py", line 7, in <module>
File ".\venv\Lib\site-packages\wheel\cli\__init__.py", line 91, in main
args.func(args)
File ".\venv\Lib\site-packages\wheel\cli\__init__.py", line 29, in convert_f
from .convert import convert
File ".\venv\Lib\site-packages\wheel\cli\convert.py", line 10, in <module>
from ..bdist_wheel import bdist_wheel
File ".\venv\Lib\site-packages\wheel\bdist_wheel.py", line 24, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources' |
I think you should open a separate issue for that. Ideally, nothing else than |
Would this be fixed by #508, I wonder? |
No, that still imports setuptools. |
Opened #510. |
Ahh, it’s via importing bdist_wheel. |
To be fair, it might have been more sustainable to split this to wheel-core which does not runtime depend on setuptools and wheel that does. They can live in same repo. The core version would provide API for setuptools to build itself. |
The long term plan is to move |
This is an updated version and closes #436. Besides rebasing, this moves from using an adaptor of flake8 to using Ruff. Adaptors for pyproject.toml for flake8 are constantly (intentionally?) broken by changes in flake8. Ruff is Rust reimplementation that is 10-100x faster, has no dependencies, can do the work of multiple tools (and versions can't get out of sync, since it is one compiled package - that's why #499 is failing, flake8-bugbear updated), supports auto-fixing, and is natively configured via pyproject.toml. Build & cibuildwheel have already moved to Ruff.
This solves the chicken-and-egg problem with setuptools and wheel when bootstrapping. Build and packaging have already moved to flit-core.