Source: pydoctor
Version: 16.3.0-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fileordering toolchain
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that pydoctor generates output that is not reproducible.

This affects other packages such as "subvertpy" amongst others.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/pydoctor/model.py b/pydoctor/model.py
index 173e7f4..6159441 100644
--- a/pydoctor/model.py
+++ b/pydoctor/model.py
@@ -621,7 +621,7 @@ class System(object):
         package = self.ensurePackage(package_full_name)
         package.filepath = dirpath
         self.setSourceHref(package)
-        for fname in os.listdir(dirpath):
+        for fname in sorted(os.listdir(dirpath)):
             fullname = os.path.join(dirpath, fname)
             if os.path.isdir(fullname):
                 initname = os.path.join(fullname, '__init__.py')

Reply via email to