]> git.lizzy.rs Git - torbrowser-launcher.git/commitdiff
Merge pull request #478 from diabonas/reproducible-mo-file
authorMicah Lee <micah@micahflee.com>
Fri, 18 Jun 2021 21:51:21 +0000 (17:51 -0400)
committerGitHub <noreply@github.com>
Fri, 18 Jun 2021 21:51:21 +0000 (17:51 -0400)
Make torbrowser-launcher.mo ordering reproducible

1  2 
setup.py

diff --combined setup.py
index e42d83b419fb88c48efa41659f51da2756f25c00,0a743f7ec26d3007e0eb59b86fa1904b7075892d..67e126e20a8b3c9e66b700d02f66f396dfffaeec
+++ b/setup.py
@@@ -28,14 -28,14 +28,14 @@@ OTHER DEALINGS IN THE SOFTWARE
  
  import os
  import sys
 -import platform
 +import distro
  import subprocess
  from distutils.core import setup
  
  SHARE = "share"
  
  # detect linux distribution
 -distro = platform.dist()[0]
 +distro = distro.linux_distribution()[0]
  
  
  def file_list(path):
@@@ -52,7 -52,9 +52,9 @@@ def create_mo_files()
          return []
      domain = "torbrowser-launcher"
      mo_files = []
-     po_files = [f for f in next(os.walk(po_dir))[2] if os.path.splitext(f)[1] == ".po"]
+     po_files = sorted(
+         [f for f in next(os.walk(po_dir))[2] if os.path.splitext(f)[1] == ".po"]
+     )
      for po_file in po_files:
          filename, extension = os.path.splitext(po_file)
          mo_file = domain + ".mo"