found 1077601 75.2.0-1
tags 1077601 + patch
thanks

I don't think this is a regression given that this bit of the method
has always been there, so I think my original patch did not take into
account all possible variations..

Here is an example of setuptools varying the contents of PKG-INFO (from
src:domain2idna):

 /usr/lib/python3/dist-packages/domain2idna-1.12.2.egg-info/PKG-INFO
 ┄ Ordering differences only
  @@ -14,16 +14,16 @@
   Description-Content-Type: text/markdown
   License-File: LICENSE
  -Requires-Dist: setuptools>=65.5.1
   Requires-Dist: colorama
  +Requires-Dist: setuptools>=65.5.1
   Provides-Extra: test

The patch to setuptools (also attached) is:

    --- setuptools/_core_metadata.py
    +++ setuptools/_core_metadata.py
     
     def _write_requirements(self, file):
    -    for req in _reqs.parse(self.install_requires):
    +    for req in sorted(_reqs.parse_strings(self.install_requires)):
             file.write(f"Requires-Dist: {req}\n")
     
         processed_extras = {}

… which matches what we are doing further down in this method.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git setuptools/_core_metadata.py setuptools/_core_metadata.py
index 2e9c48a..58e38ea 100644
--- setuptools/_core_metadata.py
+++ setuptools/_core_metadata.py
@@ -215,7 +215,7 @@ def write_pkg_file(self, file):  # noqa: C901  # is too 
complex (14)  # FIXME
 
 
 def _write_requirements(self, file):
-    for req in _reqs.parse(self.install_requires):
+    for req in sorted(_reqs.parse_strings(self.install_requires)):
         file.write(f"Requires-Dist: {req}\n")
 
     processed_extras = {}

Reply via email to