-
Notifications
You must be signed in to change notification settings - Fork 253
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
Transition to using flit
#340
Comments
+1 from me 😄 . (I'm also willing to do the work or |
Oh 100%. PRs very welcome! |
* Move from setuptools to flit Closes #340 * Add URLs to the documentation and changelog * Move classifiers above dependency resolution fields * Update copyright for Furio theme
I'm reopening this as I believe we said we would give folks a year to get |
It's probably high time to move back to |
Does anyone know how to include multiple license files (other than draft PEP 639)? I made a before and after, and got: $ unzip -l dist-new/packaging-21.4.dev0-py3-none-any.whl
Archive: dist/packaging-21.4.dev0-py3-none-any.whl
Length Date Time Name
--------- ---------- ----- ----
666 12-20-2021 20:38 packaging/__about__.py
497 05-19-2021 18:43 packaging/__init__.py
11488 10-29-2021 15:51 packaging/_manylinux.py
4378 10-29-2021 15:51 packaging/_musllinux.py
1431 10-29-2021 15:51 packaging/_structures.py
9460 05-11-2022 20:37 packaging/markers.py
0 01-26-2021 19:35 packaging/py.typed
5123 05-11-2022 20:37 packaging/requirements.py
30397 05-11-2022 20:37 packaging/specifiers.py
15697 05-11-2022 20:37 packaging/tags.py
4355 05-11-2022 20:37 packaging/utils.py
14665 05-19-2021 18:43 packaging/version.py
197 05-11-2022 20:56 packaging-21.4.dev0.dist-info/LICENSE
10174 05-11-2022 20:56 packaging-21.4.dev0.dist-info/LICENSE.APACHE
1344 05-11-2022 20:56 packaging-21.4.dev0.dist-info/LICENSE.BSD
15133 05-11-2022 20:56 packaging-21.4.dev0.dist-info/METADATA
92 05-11-2022 20:56 packaging-21.4.dev0.dist-info/WHEEL
10 05-11-2022 20:56 packaging-21.4.dev0.dist-info/top_level.txt
1553 05-11-2022 20:56 packaging-21.4.dev0.dist-info/RECORD
--------- -------
126660 19 files
$ unzip -l dist-new/packaging-21.4.dev0-py3-none-any.whl
Archive: dist-new/packaging-21.4.dev0-py3-none-any.whl
Length Date Time Name
--------- ---------- ----- ----
666 12-20-2021 15:38 packaging/__about__.py
497 05-19-2021 14:43 packaging/__init__.py
11488 10-29-2021 11:51 packaging/_manylinux.py
4378 10-29-2021 11:51 packaging/_musllinux.py
1431 10-29-2021 11:51 packaging/_structures.py
9460 05-11-2022 16:37 packaging/markers.py
0 01-26-2021 14:35 packaging/py.typed
5123 05-11-2022 16:37 packaging/requirements.py
30397 05-11-2022 16:37 packaging/specifiers.py
15697 05-11-2022 16:37 packaging/tags.py
4355 05-11-2022 16:37 packaging/utils.py
14665 05-19-2021 14:43 packaging/version.py
197 01-26-2021 14:35 packaging-21.4.dev0.dist-info/LICENSE
81 01-01-2016 00:00 packaging-21.4.dev0.dist-info/WHEEL
2993 01-01-2016 00:00 packaging-21.4.dev0.dist-info/METADATA
1254 01-01-2016 00:00 packaging-21.4.dev0.dist-info/RECORD
--------- -------
102682 16 files The other two license files are missing (as is top_level.txt, but I think that one is okay). |
The best I can think of is https://flit.pypa.io/en/latest/pyproject_toml.html#sdist-section . |
Flit should include files that match the |
Ahah! If I go SDist -> wheel, then I only get the single file specified in the license field. If I go directly to wheel, then I get all the license files as shown above. IMO Flit should not be forgetting to put |
Is there a reason docs are included in the SDist? I usually don't put docs in SDists. Playing with the include/exclude list currently. |
See recent long thread about including docs and tests in sdists so that downstream distributors can use them as sources! |
Idle question, I don't much care what backend packaging uses, it's simple enough that any of them will do, but setuptools itself supports Do we gain anything from using flit versus just using setuptools + |
The goal is to fix the bootstrapping issue. Flit has no dependencies and recently (just before this PR) can be bootstrapped. Setuptools shouldn’t depend on things that depend on setuptools. |
Setuptools vendors packaging IIRC, so it doesn't depend on anything anyways, right? Which is the same thing that flit_core does, as it vendors tomli (and I think it also vendors pieces of packaging, just not the whole packaging library, which seems wholly worse to me than just vendoring since it makes maintenance into the future harder). |
To be clear, It's fine to me if packaging moves to flit, I have no conceptual problem with it. I just suspect it's going to break more people than any bootstrapping problems it fixes. Any place where |
IIUC, flit has a better bootstrapping story than setuptools, for people building up the ecosystem from scratch -- some of that might be due to this documentation link: https://flit.pypa.io/en/latest/bootstrap.html |
The idea is to move all foundational dependencies to the same (dependency-less) backend to make PEP 517 bootstrapping easier. We are not worried about people debundling setuptools or flit_core. There's a number of reasons that we gravitated towards flit but the main one is that the wheel package is distributed separately and it has a circural dependency on setuptools. |
If that's a desired end goal, that all "foundational" dependencies are on flit, that seems like something that would be useful to be documented/recommended somewhere FWIW. |
I mean, this is all being done kind of haphazardly, but my impression is that we think sticking to one backend for bootstrapping is a good thing. pep517 (the package) and installer are already on flit IIRC. There's also an open PR for build to move to flit. |
I think this was discussed informally around when flit joined the PyPA. It’s a closed set of libraries, and not something we need to communicate as a “good practice” to others, which is why makes it tricky to formalize. There’s nothing wrong with dependencies, just with circular dependencies in the SDist build and install system. And it’s nice to only require a small set of lightweight libraries to bootstrap a functional environment from source. |
If you guys want, you can also create a PR vendoring wheel in setuptools. |
Circular dependencies are completely unacceptable for those of us who maintain operating system-level ports/package repositories. This is why, at least for us in FreeBSD, we cannot just use {,ensure}pip et al to implement PEP-517 into our framework. |
There will be no circular dependencies. I summarized one way to do it in our meta distros issue tracker:
After this you have functional pypa/build and pypa/installer. This is minimal working set of tooling for building wheels and installing them. IMHO the sane way to bootstrap setuptools and wheel is to stage the sources together (IMHO these two packages should be merged for good but that's anoher matter) into same build sandbox and use PYTHONPATH to ensure wheel is importable when building wheels for setuptools and wheel using pypa/build and installing them with pypa/installer. Once you have these, you can continue building pip with pypa/build and installing the wheel with pypa/installer. |
@dstufft note there is plan for flit_core to eventually unvendor tomli now that tomllib entered standard library. |
Originally posted by @brettcannon in #332 (comment)
Yes. :)
The text was updated successfully, but these errors were encountered: