Bug 2377215

Summary: bubblemail: Stop using deprecated %py3_build/%py3_install macros
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: bubblemailAssignee: Alexander Ploumistos <alex.ploumistos>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: alex.ploumistos, eclipseo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bubblemail-1.9-7.fc43 bubblemail-1.9-7.fc42 bubblemail-1.9-7.fc41 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-08-05 23:44:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2376118    
Attachments:
Description Flags
changed spec file
none
build log none

Description Miro Hrončok 2025-07-08 14:01:57 UTC
Dear package maintainer,

this bugzilla is automated becasue the number of impacted packages it too high to go trough manually.


It appears that your package uses the deprecated %py3_build and/or %py3_install macro.

See https://fedoraproject.org/wiki/Changes/DeprecateSetuppyMacros for why the macros are deprecated.

%py3_install expands to python setup.py install. This has been a deprecated command for 5 years and will likely stop working in Fedora 45.



Please migrate to %pyproject_buildrequires + %pyproject_wheel + %pyproject_install macros instead.

See https://fedoraproject.org/wiki/Changes/DeprecateSetuppyMacros#Migrating_to_%pyproject_macros for migration guide.

See https://github.com/hroncok/pyprojectize/ for a tool that can help you automate the migration.


Thank you. Let me know if you need help.

Comment 1 Alexander Ploumistos 2025-08-05 08:10:48 UTC
Hello Miro,

I tried switching over to the new macros and I started having issues with files that are not found during the various install steps. Is this something that ideally should be handled upstream, or am I supposed to untangle the mess myself?

Comment 2 Miro Hrončok 2025-08-05 09:40:36 UTC
Show me what you have and the issues it has. Without that I cannot answer your questions.

Comment 3 Alexander Ploumistos 2025-08-05 10:04:14 UTC
Created attachment 2102691 [details]
changed spec file

This is the amended spec file.

Comment 4 Alexander Ploumistos 2025-08-05 10:06:48 UTC
Created attachment 2102692 [details]
build log

And this is the result.
If I copy the "locale" folder in the buildroot, other missing files start causing the build to fail.

Comment 5 Miro Hrončok 2025-08-05 10:23:18 UTC
I guess the problem might be the same as https://github.com/zim-desktop-wiki/zim-desktop-wiki/issues/2858

When the data files are collected, they don't exist yet. A dirty solution that seems to work is:

diff --git a/setup.py b/setup.py
index 89f390d..7705e60 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,6 @@ class BuildData(build_py):
     def run(self):
         os.makedirs(BUILD_BIN_DIR, exist_ok=True)
         # generate translations
-        gen_locales()
         build_py.run(self)
         build_avatar_provider()
         create_default_avatars()
@@ -45,6 +44,7 @@ class BuildData(build_py):
         os.chmod(avatar_provider_bin, 0o755)
 
 def get_files(src_path, ext):
+    gen_locales()
     file_map = glob.glob(f'{src_path}/**/{PACKAGE_NAME}.{ext}', recursive=True)
     root = src_path.split('/')[0]
     path_map = map(lambda f:f.replace(root, 'share'), file_map)

Comment 6 Alexander Ploumistos 2025-08-05 10:57:42 UTC
Like when I did it before (albeit less elegantly), now the error is:

RPM build errors:
    File not found: /builddir/build/BUILD/bubblemail-1.9-build/BUILDROOT/etc/xdg/autostart/bubblemaild.desktop
    File not found: /builddir/build/BUILD/bubblemail-1.9-build/BUILDROOT/usr/lib/python3.14/site-packages/bubblemail-1.9-py*.egg-info
Finish: rpmbuild bubblemail-1.9-1.fc41.src.rpm



If I understand the situation correctly, setup.py should go away entirely, am I mistaken?

Comment 7 Miro Hrončok 2025-08-05 11:04:29 UTC
> File not found: /builddir/build/BUILD/bubblemail-1.9-build/BUILDROOT/etc/xdg/autostart/bubblemaild.desktop

This is a problem that needs to be solved in spec. Wheel-based installations cannot include files outside of the prefix (/usr). Likely, the file is located elsewhere (inside %{python3_sitelib}/%{name}) and needs to be moved in %install.


> File not found: /builddir/build/BUILD/bubblemail-1.9-build/BUILDROOT/usr/lib/python3.14/site-packages/bubblemail-1.9-py*.egg-info

Wheel-based installations have dist-info:

  -%{python3_sitelib}/%{name}-%{version}-py*.egg-info
  +%{python3_sitelib}/%{name}-%{version}.dist-info/

However, ideally use %pyproject_save_files -l %{name}:

  %install
  %pyproject_install
  %pyproject_save_files -l %{name}
  %find_lang %{name}
  cat %{name}.lang >> %{pyproject_files}
  
  (%check omitted here)
  
  %files -f %{pyproject_files}
  %doc AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
  %{_mandir}/man1/%{name}.1*
  %{_mandir}/man1/%{name}d.1*
  %{_sysconfdir}/xdg/autostart/%{name}d.desktop
  %{_bindir}/%{name}
  %{_bindir}/%{name}-avatar-provider
  %{_bindir}/%{name}d
  %{_datadir}/applications/bubblemail.desktop
  %{_datadir}/%{name}/
  %{_datadir}/icons/hicolor/*/apps/%{name}.svg
  %{_metainfodir}/%{name}.appdata.xml

Comment 8 Fedora Update System 2025-08-05 13:25:06 UTC
FEDORA-2025-bc0c3cff02 (bubblemail-1.9-7.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-bc0c3cff02

Comment 9 Fedora Update System 2025-08-05 13:25:08 UTC
FEDORA-2025-e958ce80b8 (bubblemail-1.9-7.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-e958ce80b8

Comment 10 Alexander Ploumistos 2025-08-05 13:31:14 UTC
Thank you very much Miro.
I've updated the package and I've also told upstream to check out the setuptools changes.

Comment 11 Fedora Update System 2025-08-06 02:11:23 UTC
FEDORA-2025-bc0c3cff02 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-bc0c3cff02`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-bc0c3cff02

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2025-08-06 02:36:37 UTC
FEDORA-2025-e958ce80b8 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-e958ce80b8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-e958ce80b8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2025-08-14 01:25:17 UTC
FEDORA-2025-e958ce80b8 (bubblemail-1.9-7.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2025-08-14 01:34:11 UTC
FEDORA-2025-bc0c3cff02 (bubblemail-1.9-7.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.