-
Notifications
You must be signed in to change notification settings - Fork 36
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
Set homepage in pyproject.toml #606
Comments
See https://peps.python.org/pep-0621/#have-a-separate-url-home-page-field It was considered redundant and isn’t included. Some backends try to fill it from the urls if there’s a matching name (setuptools 61+ does, I think). I think others just ignore it entirely as no longer needed. |
The thing is, then no homepage is shown by pip: [project.urls]
homepage = "https://github.com/pypdfium2-team/pypdfium2" # FIXME not shown by pip
documentation = "https://pypdfium2.readthedocs.io/"
changelog = "https://pypdfium2.readthedocs.io/en/stable/changelog.html"
|
Hi, I have the same problem that you had. For now, I've just created a
Meanwhile, I have everything else in the It worked for me! Hope it helps you! |
Of course you can work around the issue with the old setup files. But that doesn't fix the problem. I think pip should look for a homepage entry in |
I started to port one of my projects from If I can't get a PyPi home page link other than by specifying a separate |
IMO the key problem is the relationship between
There are some potential solutions:
|
The biggest issue with AFAIK, the only issue here is |
It doesn't sound like a big problem. "Homepage" seems ambiguous to downstream users, but users hardly care about what "Homepage" exactly means. Users usually want an upstream URL of this library, it can be a source code page, a docs page, or a home page in the narrowest sense (for example, https://cython.org), it's OK. Many Linux package managers have one and only one URL for each package, but I saw few poeple complain about it.
Fair enough. It would be better to show all URLs instead of only one |
This is the behavior we get with That said, I agree with @GalaxySnail, nevermind about ambiguity. |
Sorry to add "complex logic in setup.py". Though it's a development feature closes #1155 I'm specifying `url` since it's not allowed in pyproject.toml: pypa/packaging-problems#606 --------- Co-authored-by: Justin Chu <[email protected]>
There is a subtle difference with the Home-Page field in setuptools not being set via pypoject.toml. The version of setuptools has been bumped to 61+ to at least map the url "homepage" to Home-Page in PyPi. See relevant Issue on pypa: pypa/packaging-problems#606
I'm in the same boat as @bulletmark was a year ago:
I've ported a project to Then I run
However, PyPI isn't showing any Description or Homepage when I upload this package. 😕 I have older projects using Can anyone explain what I might be doing wrong here? |
You don't want the
I would recommend using a PEP 621 backend instead of Poetry until they support PEP 621. PDM, uv, Hatch all support any build backend that supports PEP 621. |
I lost track of this issue a long time ago, but take a look at https://pypi.org/project/ue4-docker/. It uses |
You're right @henryiii. This turned out to be largely a PEBKAC error. I apparently had figured out how to add the right fields for homepage+description (turns out that either the old/deprecated or new/shiny versions still work), but I had also inadvertently upload a higher-version-number sdist while flailing around and trying different things… so that higher-numbered sdist "shadowed" the default view of the package until I "yanked" it. Derp derp derp. Sorry to waste others' time on this 🤦🏻. |
So... Should this issue be closed given that there is a working way to specify homepage in |
PEP 753 was just accepted yesterday, which deprecates Home-page entirely, and recommends build backends stop filling it. So I'd say yes. |
Problem description
How can I set a Homepage in a pyproject.toml? The guide shows this:
But this is just recognized as a normal URL field by PyPI and not as the homepage as the
url
argument from the old setup.py.The text was updated successfully, but these errors were encountered: