Your message dated Tue, 20 Oct 2026 14:24:46 +0200
with message-id <[email protected]>
and subject line closing, seems to be fixed
has caused the Debian Bug report #1077601,
regarding setuptools: please make the output reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1077601: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077601
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: setuptools
Version: 70.3.0-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: randomess toolchain
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
setuptools can generate nondeterministic PKG-INFO files.

For example, here is python-pylatex:

   ├── ./usr/lib/python3/dist-packages/PyLaTeX-1.4.2.egg-info/PKG-INFO
   │┄ Ordering differences only
   │ @@ -42,27 +42,27 @@
   │  Requires-Dist: coverage; extra == "testing"
   │  Requires-Dist: pytest-cov; extra == "testing"
   │  Requires-Dist: black; extra == "testing"
   │  Requires-Dist: isort; extra == "testing"
   │  Provides-Extra: packaging
   │  Requires-Dist: twine; extra == "packaging"
   │  Provides-Extra: all
   │ +Requires-Dist: isort; extra == "all"
   │ +Requires-Dist: quantities; extra == "all"
   │ +Requires-Dist: alabaster<0.7.12; extra == "all"
   │ +Requires-Dist: numpy; extra == "all"
   │  Requires-Dist: pytest>=4.6; extra == "all"
   │ +Requires-Dist: black; extra == "all"
   │ +Requires-Dist: matplotlib; extra == "all"
   │ +Requires-Dist: MarkupSafe==2.0.1; extra == "all"
   │ +Requires-Dist: coverage; extra == "all"
   │  Requires-Dist: twine; extra == "all"
   │ +Requires-Dist: jinja2<3.0; extra == "all"
   │  Requires-Dist: sphinx; extra == "all"
   │ -Requires-Dist: numpy; extra == "all"
   │ -Requires-Dist: quantities; extra == "all"
   │ -Requires-Dist: coverage; extra == "all"
   │ -Requires-Dist: black; extra == "all"
   │ -Requires-Dist: alabaster<0.7.12; extra == "all"
   │ -Requires-Dist: isort; extra == "all"
   │  Requires-Dist: pytest-cov; extra == "all"
   │ -Requires-Dist: jinja2<3.0; extra == "all"
   │ -Requires-Dist: MarkupSafe==2.0.1; extra == "all"
   │ -Requires-Dist: matplotlib; extra == "all"

The patch (also attached) is fairly simple:

  --- a/setuptools/_core_metadata.py
  +++ b/setuptools/_core_metadata.py
  @@ -226,7 +226,7 @@ def _write_requirements(self, file):
   
           if extra:
               _write_provides_extra(file, processed_extras, extra, 
unsafe_extra)
  -        for req in _reqs.parse_strings(reqs):
  +        for req in sorted(_reqs.parse_strings(reqs)):
               r = _include_extra(req, extra, condition.strip())
               file.write(f"Requires-Dist: {r}\n")
 
… although there may be more places where it is a problem.

  [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
diff --git a/setuptools/_core_metadata.py b/setuptools/_core_metadata.py
index 45aae7d..f50e2a0 100644
--- a/setuptools/_core_metadata.py
+++ b/setuptools/_core_metadata.py
@@ -226,7 +226,7 @@ def _write_requirements(self, file):
 
         if extra:
             _write_provides_extra(file, processed_extras, extra, unsafe_extra)
-        for req in _reqs.parse_strings(reqs):
+        for req in sorted(_reqs.parse_strings(reqs)):
             r = _include_extra(req, extra, condition.strip())
             file.write(f"Requires-Dist: {r}\n")
 

--- End Message ---
--- Begin Message ---
Version: 84.0.0-2

that seems to be fixed in testing/unstable.

--- End Message ---

Reply via email to