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

Ensure latest version source #4392

Merged
merged 1 commit into from Oct 1, 2022
Merged

Ensure latest version source #4392

merged 1 commit into from Oct 1, 2022

Conversation

ofek
Copy link
Sponsor Collaborator

@ofek ofek commented Sep 22, 2022

Address #4341 (comment)

@ofek
Copy link
Sponsor Collaborator Author

ofek commented Sep 24, 2022

Should be good to merge 👍

@squidfunk
Copy link
Owner

Thanks for the PR. I'm discovering more and more that the ecosystem doesn't seem to be ready for the switch, e.g. PyPI stats can't resolve author, license, etc. anymore: https://pypistats.org/packages/mkdocs-material

I'm not sure this is ready for primetime.

@ofek
Copy link
Sponsor Collaborator Author

ofek commented Sep 28, 2022

Hmm, cc @hugovk

@hugovk
Copy link

hugovk commented Sep 28, 2022

https://pypi.org/pypi/mkdocs-material/json contains:

{
"info": {
"author": "",
...
"license": "",
...

I see https://github.com/squidfunk/mkdocs-material/blob/master/pyproject.toml also contains no license or authors under [project].

Compare:

license = {text = "MIT"}
authors = [{name = "Hugo van Kemenade"}]

And they can be see at:

{
"info": {
"author": "Hugo van Kemenade",
...
"license": "MIT",
...

Should they be added here?

@ofek
Copy link
Sponsor Collaborator Author

ofek commented Sep 28, 2022

  1. So for the license see Revert "Declare license file in packaging tutorial" pypa/packaging.python.org#1143, basically until PyPI supports PEP 639 one must use classifiers
  2. The author in wheel is Author-email: Martin Donath <martin.donath@squidfunk.com> which is also how setuptools works

Both show correctly here under Meta tab https://pypi.org/project/mkdocs-material/

@hugovk
Copy link

hugovk commented Sep 28, 2022

Looks like pypistats.org is just using ['info']['author'] and ['info']['license'] from the JSON:

https://github.com/crflynn/pypistats.org/blob/e44f3944da4f065005fc750d0ed86bd1b42a3f56/pypistats/templates/package.html#L31-L32

I suggest opening an issue at https://github.com/crflynn/pypistats.org/issues

(My https://github.com/hugovk/pypistats is a Python client using the pypistats.org API; I'm not a maintainer of pypistats.org.)

@squidfunk
Copy link
Owner

I'm considering this ready for merge then. PyPI stats is not critical, but it would be great if this could be solved and reported. I'm not very familiar with the Python packaging ecosystem, so I would be thankful if one of you could take this on.

@squidfunk squidfunk merged commit 6edbcf8 into master Oct 1, 2022
@ofek ofek deleted the pin branch October 1, 2022 20:22
@squidfunk
Copy link
Owner

squidfunk commented Oct 2, 2022

So, as a temporary measure, couldn't we just add back all the information that was present in the setup.py before? This would at least fix the issues...

mkdocs-material/setup.py

Lines 40 to 78 in cccc214

setup(
name = "mkdocs-material",
version = package["version"],
url = package["homepage"],
project_urls = {
"Source": "https://github.com/squidfunk/mkdocs-material",
},
license = package["license"],
description = package["description"],
long_description = long_description,
long_description_content_type = "text/markdown",
author = package["author"]["name"],
author_email = package["author"]["email"],
keywords = package["keywords"],
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Programming Language :: JavaScript",
"Programming Language :: Python",
"Topic :: Documentation",
"Topic :: Software Development :: Documentation",
"Topic :: Text Processing :: Markup :: HTML"
],
packages = find_packages(exclude = ["src", "src.*"]),
include_package_data = True,
install_requires = install_requires,
python_requires='>=3.7',
entry_points = {
"mkdocs.themes": [
"material = material"
],
"mkdocs.plugins": [
"search = material.plugins.search.plugin:SearchPlugin",
"tags = material.plugins.tags.plugin:TagsPlugin"
]
},
zip_safe = False
)

@ofek
Copy link
Sponsor Collaborator Author

ofek commented Oct 2, 2022

That wouldn't fix it, here's the known issue pypi/warehouse#9400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants