Skip to content
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

Add project_urls so that PyPI will show GitHub stats. #2720

Merged
merged 2 commits into from Apr 26, 2018
Merged

Conversation

lepture
Copy link
Contributor

@lepture lepture commented Apr 24, 2018

Current Flask in PyPI: https://pypi.org/project/Flask/

There is a "GitHub statistics" section, that is because the old homepage in setup.py is set to GitHub repo. But now, homepage url is replaced by pallets project page. When releasing a new version to PyPI, that section will go.

Warehouse can get the package's GitHub info from homepage url and project_urls. Let's add it back.

@davidism
Copy link
Member

Interesting, haven't seen that arg before. I see it was added to the setuptools docs, but there's no description of what keys are recognized. Is that documented somewhere?

setup.py Outdated
@@ -25,6 +25,11 @@
include_package_data=True,
zip_safe=False,
platforms='any',
project_urls={
'Bug Tracker': 'https://github.com/pallets/flask/issues',
'Documentation': 'http://flask.pocoo.org/',

This comment was marked as off-topic.

@lepture
Copy link
Contributor Author

lepture commented Apr 24, 2018

No, I don’t think so. I found that my Authlib doesn’t have that GitHub section, and I wonder why. So I searched the code in warehouse, the logic is that it will detect GitHub repo by homepage and project_urls. Here is my log: lepture/authlib#45

I haven’t tested it. Maybe we can hold on this PR until I tested it with Authlib.

@davidism
Copy link
Member

I'll give it a try on a project when I get a chance too, and merge this before 1.0 if it works.

@davidism
Copy link
Member

Looks like it works fine, although I can't find the code in Warehouse that detects what URL to use for the GitHub stats.

I changed to an OrderedDict just to be sure they always build in the intended order.

@davidism davidism merged commit 062745b into master Apr 26, 2018
@davidism davidism added this to the 1.0 milestone Apr 26, 2018
@davidism davidism deleted the setup-link branch April 26, 2018 19:07
@davidism
Copy link
Member

And don't worry, I caught that I committed the wrong URLs.

@lepture
Copy link
Contributor Author

lepture commented Apr 27, 2018

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants