Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940439 - dev-python/pdm-backend-2.4.1: AttributeError: 'StandardMetadata' object has no attribute 'license_files'; depends >=dev-python/pyproject-metadata-0.8.0
Summary: dev-python/pdm-backend-2.4.1: AttributeError: 'StandardMetadata' object has n...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-28 12:57 UTC by Ryan Tsien
Modified: 2024-09-28 13:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Tsien 2024-09-28 12:57:26 UTC
> 2024-09-28 19:51:58,524 gpep517 INFO Building wheel via backend pdm.backend.intree
> Traceback (most recent call last):
>   File "<frozen runpy>", line 198, in _run_module_as_main
>   File "<frozen runpy>", line 88, in _run_code
>   File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 443, in <module>
>     sys.exit(main())
>              ^^^^^^
>   File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 439, in main
>     return func(args)
>            ^^^^^^^^^^
>   File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 229, in build_wheel
>     print(build_wheel_impl(args, args.wheel_dir), file=out)
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 221, in build_wheel_impl
>     wheel_name = backend.build_wheel(str(wheel_dir), args.config_json)
>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/var/tmp/portage/dev-python/pdm-backend-2.4.1/work/pdm-backend-2.4.1/src/pdm/backend/__init__.py", line 55, in build_wheel
>     return builder.build(
>            ^^^^^^^^^^^^^^
>   File "/var/tmp/portage/dev-python/pdm-backend-2.4.1/work/pdm-backend-2.4.1/src/pdm/backend/base.py", line 227, in build
>     files = sorted(self.get_files(context))
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/var/tmp/portage/dev-python/pdm-backend-2.4.1/work/pdm-backend-2.4.1/src/pdm/backend/wheel.py", line 122, in get_files
>     yield from self._get_metadata_files(context)
>                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/var/tmp/portage/dev-python/pdm-backend-2.4.1/work/pdm-backend-2.4.1/src/pdm/backend/wheel.py", line 322, in _get_metadata_files
>     dist_info = self._write_dist_info(context.ensure_build_dir())
>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/var/tmp/portage/dev-python/pdm-backend-2.4.1/work/pdm-backend-2.4.1/src/pdm/backend/wheel.py", line 246, in _write_dist_info
>     for file in self.find_license_files(meta):
>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/var/tmp/portage/dev-python/pdm-backend-2.4.1/work/pdm-backend-2.4.1/src/pdm/backend/base.py", line 281, in find_license_files
>     if metadata.license_files:
>        ^^^^^^^^^^^^^^^^^^^^^^
> AttributeError: 'StandardMetadata' object has no attribute 'license_files'


It seems that there is no 'license_files' attribute in 'StandardMetadata' object for dev-python/pyproject-metadata-0.8.0 package version.

After upgrading to dev-python/pyproject-metadata-0.9.0_beta5, the problem disappears.

Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-09-28 13:11:01 UTC
Thanks for the report!
Comment 2 Larry the Git Cow gentoo-dev 2024-09-28 13:11:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc5151a73048ce580b93781f2b105511903b7ddd

commit cc5151a73048ce580b93781f2b105511903b7ddd
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-09-28 13:10:52 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-09-28 13:10:52 +0000

    dev-python/pdm-backend: Bump required pyproject-metadata version
    
    Closes: https://bugs.gentoo.org/940439
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 .../{pdm-backend-2.4.1.ebuild => pdm-backend-2.4.1-r1.ebuild}           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)