Bug 2136838 - gnome-activity-journal fails to build without distutils
Summary: gnome-activity-journal fails to build without distutils
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-activity-journal
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2022-10-21 15:10 UTC by Miro Hrončok
Modified: 2023-01-09 10:47 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-01-09 10:47:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2022-10-21 15:10:26 UTC
Description of problem:
The Python standard library distutils module will be removed from Python 3.12+

https://peps.python.org/pep-0632/

As preparatory work, we build all python packages in a Copr repository with Python 3.11 sans distutils.

https://copr.fedorainfracloud.org/coprs/g/python/python-without-distutils/

gnome-activity-journal fails to build:

https://copr.fedorainfracloud.org/coprs/g/python/python-without-distutils/package/gnome-activity-journal/

------------------------
+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -sP'
ERROR: No module named 'distutils'.

Please install 'python3-distutils' and 'python3-distutils-extra' packages.
------------------------


The python3-setutpools package provides a distutils module, so sometimes "simply" adding BuildRequires: python3-setuptools might workaround the problem. Unfortunately,  is not 100 % compatible with the removed standard library one distutils: https://github.com/pypa/setuptools/issues/3532

When python3-setuptools is installed, the package fails to build differently:

https://copr.fedorainfracloud.org/coprs/g/python/python-without-distutils-always-setuptools/package/gnome-activity-journal/

------------------------
error: Installed (but unpackaged) file(s) found:
   /usr/lib/python3.11/site-packages/Indicator.py
   /usr/lib/python3.11/site-packages/__init__.py
   /usr/lib/python3.11/site-packages/__pycache__/Indicator.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/Indicator.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/__init__.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/__init__.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/activity_widgets.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/activity_widgets.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/blacklist.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/blacklist.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/common.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/common.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/config.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/config.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/content_objects.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/content_objects.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/external.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/external.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/histogram.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/histogram.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/main.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/main.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/sources.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/sources.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/store.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/store.cpython-311.pyc
   /usr/lib/python3.11/site-packages/__pycache__/supporting_widgets.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/__pycache__/supporting_widgets.cpython-311.pyc
   /usr/lib/python3.11/site-packages/activity_widgets.py
   /usr/lib/python3.11/site-packages/blacklist.py
   /usr/lib/python3.11/site-packages/common.py
   /usr/lib/python3.11/site-packages/config.py
   /usr/lib/python3.11/site-packages/content_objects.py
   /usr/lib/python3.11/site-packages/external.py
   /usr/lib/python3.11/site-packages/histogram.py
   /usr/lib/python3.11/site-packages/main.py
   /usr/lib/python3.11/site-packages/plugins/__init__.py
   /usr/lib/python3.11/site-packages/plugins/__pycache__/__init__.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/plugins/__pycache__/__init__.cpython-311.pyc
   /usr/lib/python3.11/site-packages/plugins/__pycache__/example_plugin.cpython-311.opt-1.pyc
   /usr/lib/python3.11/site-packages/plugins/__pycache__/example_plugin.cpython-311.pyc
   /usr/lib/python3.11/site-packages/plugins/example_plugin.py
   /usr/lib/python3.11/site-packages/sources.py
   /usr/lib/python3.11/site-packages/store.py
   /usr/lib/python3.11/site-packages/supporting_widgets.py
------------------------

Version-Release number of selected component:1.0.0-7 


How reproducible: Build gnome-activity-journal without distutils


Steps to Reproduce:
1. fedpkg clone <this_package> && cd <this_package>
2. mock -r fedora-rawhide-x86_64 init
3. mock -r fedora-rawhide-x86_64 install python3-devel
4. sudo rm -rf /var/lib/mock/fedora-rawhide-x86_64/root/usr/lib64/python3.11/distutils/
5. fedpkg mockbuild -N
6. mock -r fedora-rawhide-x86_64 install python3-setuptools
7. fedpkg mockbuild -N

Actual results: fails to build
Expected results: builds fine

Comment 1 Fedora Admin user for bugzilla script actions 2022-11-28 12:18:28 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 2 Tomáš Hrnčiar 2022-12-20 10:49:03 UTC
Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.12:
https://copr.fedorainfracloud.org/coprs/python3.12/

Please use this copr for testing rather than https://copr.fedorainfracloud.org/coprs/g/python/python-without-distutils/

If your package is listed in [0], you may workaround this issue by BuildRequiring python-setuptools, note that adding such BuildRequires might however hide some transitive dependency problem, if the distutils import comes from a dependency.
Cooperation with upstream is recommended. Additional context [1].

[0] https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/message/6BHNAWHE7M5VY3YQVJLOYHLY4M7KIFFN/

[1] https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/N6ITYHLRWIDNYNXGPYG2ZHF3ZLQWZN7L/

https://docs.python.org/3.12/whatsnew/3.12.html

For all our attempts to build gnome-activity-journal with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/python3.12/package/gnome-activity-journal/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 3 Miro Hrončok 2023-01-09 10:47:30 UTC
Automation has figured out the package is retired in rawhide.

If you like it to be unretired, please open a ticket at https://pagure.io/releng/new_issue?template=package_unretirement


Note You need to log in before you can comment on or make changes to this bug.