-
Notifications
You must be signed in to change notification settings - Fork 150
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
"wheel convert" depends on setuptools #510
Comments
It also contains the somewhat useless extra lines (AFAICT?): try:
from setuptools import Distribution
except ImportError:
from distutils.dist import Distribution Besides distutils going away, This is literally the only usage of raw |
Oh, |
It converts both |
A temporary workaround would be to keep the runtime dependency on setuptools for now, and deprecate it. A second possibility would be to add an extra, like |
My quick assessment is that they don't really need setuptools since all they do is convert the metadata and repackage the files. |
I'm not really sure if it would be a problem if this runtime depended on setuptools. Depends on whether pip dep resolver regards it a cycle or not. I think setuptools has some bootstrap magic to discover itself from source tree. |
This is a blocker for release with flit, right? |
Regardless of resolving, it would be bad if wheel had a public API (#472) that was intended to be used by tools other than setuptools, but still pulled in setuptools. That's a longer term issue, though, which is why I suggested the temporary workaround. I'm a fan of smaller but more frequent changes over a rare "break everyone" release. :) Though, now that you mention it, it might be an issue if setuptools requires wheel, which then gets installed, and therefore pulls it's dependencies, which include setuptools... Yeah, that might be a problem. Runtime dep on setuptools might truly be not an option, even short term. It doesn't need to be bootstrap magic, self-builds are built into PEP 517. Flit-core builds itself that way. It would be great, though, if this could be solved properly without setuptools! |
FWIW, I don't think convert functionality is needed in the API. It seems like a pretty niche command, and it'll only become less and less relevant as time goes on. |
@henryiii indeed wheel is a build dependency of setuptools. |
Given how nobody has complained about it requiring setuptools but without wheel declaring it, it seems like it's not getting a lot of use. I'll probably just drop it in the |
I think this may be partially explained by abundant usage of pkg_resources from setuptools by basically everyone which is now getting replaced by importlib.resources. It's possible setuptools has been widely available on platforms where wheel convert has been used but this may stop being the case. |
But if it that is the case, it's not a problem of the flit conversion, and is just as present in the current release. :) |
Yeah, I think seems probable that it's a side-effect of something that the stable release didn't fail for @SpecLad |
Yep, before 0de0c1a there was no runtime dependence on setuptools either. If you were installing wheel from a wheel (most users), there's really no difference before or after the conversion. If you install from SDist, you used to need setuptools in the build environment, and now you don't. But that's the only change. Most environments happen to have setuptools injected, include default venvs, though that may change. |
Yeah, sorry for the confusion. For some reason, I was certain wheel used to have a runtime dependency on setuptools, but I was mistaken. I'll edit the issue description. |
It did briefly have that, but I had to backtrack quickly as it caused all sorts of issues. |
the file format blogging is done in it with the git_hub module telecasting.also the branch issue has also been resolved in it. |
This entire project is a setuptools plugin? AFAICT other wheel generators like flit or enscons avoid using the |
It's supposed to be slowly becoming a more general package with an API (#472), and setuptools will slowly be integrating the bdist_wheel command (pypa/setuptools#3908). The CLI already is not a setuptools plugin. (And depending on setuptools can cause causes weird circular dependency issues) |
This package absolutely cannot be used by flit or build without hitting circular dependencies. |
To be fair, I would just suggest making flit wheel building the canonical thing and merge everything there. The first wheel you will ever build is flit (with itself). |
I'm saying I think it should not be a bug that wheel convert depends on setuptools, too bad that the circular depedency causes problems, neat that it might be easy to fix though. Does any wheel generator depend on the wheel package? Like flit, they tend to generate the wheel file format themselves. |
They are not supposed to, since there is no public API in You don't need setuptools to run the other commands, though. I don't want to download setuptools if I'm changing the tags on a wheel, packing a wheel, or unpacking a wheel. The only place this is a problem is if you are converting |
wheel[convert] sounds reasonable and harmless. egg is a setuptools format after all. |
|
Setuptools most definitely depends on wheel these days. Even building setuptools with non-legacy backend requires wheel. It seems fine though that wheel convert requires setuptools. Similarly flit-core has less deps than flit. |
Since 0de0c1a, wheel no longer declares a runtime dependency on setuptools. However, the(Never mind this part, there was never a runtime dependency to start with.)convert
command still needs setuptools to work.wheel doesn't declare a runtime dependency on setuptools, but the
convert
command needs it to work. Here's what happens when setuptools is not installed:The text was updated successfully, but these errors were encountered: