From Fedora Project Wiki
Line 165: Line 165:


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
N/A (not a System Wide Change)
This page is a documentation, this is not a user facing change.


== Release Notes ==
== Release Notes ==

Revision as of 07:06, 15 March 2021


python3-devel won't pull in setuptools by default in rpmbuild

Summary

python3-devel currently requires python-setuptools if rpmbuild is used. Due to a change in RPM generators, this is not needed anymore hence we are removing it.

Owner

Current status

  • Targeted release: Fedora Linux 35
  • Last updated: 2021-03-15
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

python3-devel currently requires python3-setuptools if rpmbuild is used. This was needed for RPM generators but since it adapted packaging, this is not needed anymore hence we are removing it. We tested this change in the past when we asked other maintainers to explicitly BuildRequire python-3setuptools. Some of them responded, some not. Our analysis was based on greping sources for any mention of setuptools, such as import setuptools or from setuptools import. Nowadays, the same grep based query showed us roughly the same number (about 335 + 72 that failed to be analysed) of packages relying on python3-setuptools. To see direct impact we removed this Require from python-devel package used in testing python3.10 COPR. It showed us 140 packages affected by this change. Even though it is fewer than expected 300+ packages, to avoid any breakages we plan to do a mass spec update on all of them to explicitly BuildRequire python3-setuptools. Some of them might build because they fallback to distutils if dependency on python3-setuptools is not satisfied.

Feedback

Benefit to Fedora

From Fedora Packaging Guidelines: It is important that your package list all necessary build dependencies using the BuildRequires: tag. As our testing showed, this is not true for many packages. Some of them can successfully build either with or without setuptools (they use try-except import and fallback to distutils from the standard library). Such packages are especially dangerous when not BuildRequiring setuptools -- they can produce different results depending on the presence of setuptools: either an .egg-info metadata directory (w/setuptools) or .egg-info text file (w/distutils). RPM has troubles when upgrading directories to files.

Scope

We will coordinate the work in a side tag and merge when ready.

  • Proposal owners:
    1. Test affected packages in Copr.
    2. Do the mass spec update to introduce missing BuildRequire to them.
  • Other developers: There should be no additional work for other developers. BuildRequiring setuptools might not be enough for all packages, but we will take care of them manually if it happens.
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives: N/A

Upgrade/compatibility impact

All affected packages needs rebuild after the mass spec update.

How To Test

Interested testers can push explicit BuildRequire on setuptools to the distgit and see in our Python 3.10 COPR whether the package starts to build again. Webhook should trigger rebuild automatically on new commit in rawhide branch.

User Experience

Regular distro users shouldn't notice any change in system behaviour.

Dependencies

140 packages will need to BuildRequire setuptools explicitly. This will be done by the mass spec update.

Contingency Plan

  • Contingency mechanism: Commit removing Requires on python-setuptools will be reverted.
  • Contingency deadline: mass rebuild
  • Blocks release? No

Documentation

This page is a documentation, this is not a user facing change.

Release Notes