-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
First, I failed to publish v0.13.5 because twine failed to validate the metadata. The package was built using metadata v2.4, but the version of twine used (by pypa/[email protected]
) only recognizes Metadata v1.0-2.3.
error in CI logs
Checking dist/sphinx_immaterial-0.13.5-py3-none-any.whl: ERROR InvalidDistribution: Metadata is missing required fields: Name,
Version.
Make sure the distribution includes the files where those fields are
specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2,
2.0, 2.1, 2.2, 2.3.
The CI artifact shows (in package's METADATA file):
Metadata-Version: 2.4
Name: sphinx_immaterial
Version: 0.13.5
This led me to look at the package build logs. There are more than a few warnings now, mostly related to bundled theme assets and a couple about PEP639 adoption.
Bundled assets warnings
!!
********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'sphinx_immaterial.bundles.javascripts' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.
This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'sphinx_immaterial.bundles.javascripts' is explicitly added
to the `packages` configuration field.
Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
If you don't want 'sphinx_immaterial.bundles.javascripts' to be distributed and are
already explicitly excluding 'sphinx_immaterial.bundles.javascripts' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.
You can read more about "package data files" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************
!!
check.warn(importable)
which is repeated for
sphinx_immaterial.bundles.mathjax.*
sphinx_immaterial.bundles.mermaid
sphinx_immaterial.bundles.stylesheets
sphinx_immaterial.partials.*
PEP639 warnings
/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpfnA80c/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2026-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
corresp(dist, value, root_dir)
/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpfnA80c/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
Metadata
Metadata
Assignees
Labels
No labels