Bug 161947 - python3: bundle setuptools
Summary: python3: bundle setuptools
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-08 12:33 UTC by Xisco Faulí
Modified: 2024-07-24 12:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2024-07-08 12:33:45 UTC
Since python has been upgraded from 3.9 to 3.10 <https://git.libreoffice.org/core/+/a1295cb177295752f8cbfbb49e13d5bb69ed7dc7%5E%21/> doing make lxml with

--enable-python=fully-internal
--enable-werror

fails

Traceback (most recent call last):
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/lxml/setup.py", line 15, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/lxml/setup.py", line 17, in <module>
    from distutils.core import setup
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/instdir/program/python-core-3.10.14/lib/distutils/__init__.py", line 19, in <module>
    warnings.warn(_DEPRECATION_MESSAGE,
DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/external/lxml/ExternalProject_lxml.mk:26: /home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/ExternalProject/lxml/build] Error 1

See https://git.libreoffice.org/core/+/dc97b366ab9ce3d38c84da06b8b37131579f87f3%5E%21/
and https://git.libreoffice.org/core/+/f41773d684dfb1bfebe484bbf6d1ec4b5937d348%5E%21/

Towards python 3.12 ( distutils has been dropped there ) we need to bundle setuptools from https://github.com/pypa/setuptools/tags
Comment 1 Commit Notification 2024-07-09 08:28:36 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f9cd7e2801e7bbc620521f2ce3ee4be4c66cdc21

tdf#161947: test setuptools is imported on mac

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Xisco Faulí 2024-07-09 10:57:02 UTC
Macosx does bundle setuptools and that's because https://opengrok.libreoffice.org/xref/core/external/python3/ExternalProject_python3.mk?r=875a1bf2#127
if $(if $(filter MACOSX,$(OS)) is removed, then setuptools exists in workdir/UnpackedTarball/python3/python-inst/python-inst/lib/python3.10/site-packages/setuptools
Comment 3 Stéphane Guillou (stragu) 2024-07-24 12:12:40 UTC
Sounds like we do have to.
Setting to new, but can't remember if that's been brought up at ESC? I guess bundling a new external module is important enough to notify others?