Files
poky/meta/recipes-devtools/python/python3-setuptools_76.0.0.bb
Yi Zhao cb23f1e136 python3-setuptools: restore build_scripts.executable support
We encountered an issue when running python scripts provided by
python3-fail2ban. The shebang '#!/usr/bin/env python3' was replaced by
'#!python', which caused these scripts to fail to run.

For example:
$ head -n 1 /usr/bin/fail2ban-testcases
 #!python
$ /usr/bin/fail2ban-testcases
-sh: /usr/bin/fail2ban-testcases: cannot execute: required file not found

This issue was introduced by commit[1] in python3-setuptools 75.3.2. See
the upstream issue report[2] for more information.

Backport patches from [3] to fix this issue.

[1] c71266345c
[2] https://github.com/pypa/setuptools/issues/4934
[3] https://github.com/pypa/distutils/pull/358

(From OE-Core rev: d728ec95291f05cbfb436eabe8717ebe9a0dc11d)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-25 12:25:51 -07:00

63 lines
2.0 KiB
BlitzBasic

SUMMARY = "Download, build, install, upgrade, and uninstall Python packages"
HOMEPAGE = "https://pypi.org/project/setuptools"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=141643e11c48898150daa83802dbc65f"
inherit pypi python_setuptools_build_meta
CVE_PRODUCT = "python3-setuptools python:setuptools"
SRC_URI:append:class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
SRC_URI += " \
file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch \
file://CVE-2025-47273-pre1.patch \
file://CVE-2025-47273.patch \
file://0001-Revert-Merge-pull-request-pypa-distutils-332-from-py.patch \
file://0002-Remove-support-for-special-executable-under-a-Python.patch \
"
SRC_URI[sha256sum] = "43b4ee60e10b0d0ee98ad11918e114c70701bc6051662a9a675a0496c1a158f4"
DEPENDS += "python3"
RDEPENDS:${PN} = "\
python3-compile \
python3-compression \
python3-ctypes \
python3-email \
python3-html \
python3-json \
python3-netserver \
python3-numbers \
python3-pickle \
python3-pkg-resources \
python3-pkgutil \
python3-plistlib \
python3-shell \
python3-stringold \
python3-threading \
python3-unittest \
python3-unixadmin \
python3-xml \
"
BBCLASSEXTEND = "native nativesdk"
# The pkg-resources module can be used by itself, without the package downloader
# and easy_install. Ship it in a separate package so that it can be used by
# minimal distributions.
PACKAGES =+ "python3-pkg-resources "
FILES:python3-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*"
RDEPENDS:python3-pkg-resources = "\
python3-compression \
python3-email \
python3-plistlib \
python3-pprint \
"
# This used to use the bootstrap install which didn't compile. Until we bump the
# tmpdir version we can't compile the native otherwise the sysroot unpack fails
INSTALL_WHEEL_COMPILE_BYTECODE:class-native = "--no-compile-bytecode"