Skip to content

Commit

Permalink
Sort mypyc_targets in setup.py (python#6569)
Browse files Browse the repository at this point in the history
The mypy_mypyc-wheels Travis build is currently broken on linux
because of a mypyc bug that is dependent on the order of files passed
to mypyc. I am fixing the bug
(mypyc/mypyc#539), but this was complicated by
files coming out of the file system APIs in an unspecified order.

Sort the targets passed to mypyc so that the mypyc compilation process
is deterministic.
  • Loading branch information
msullivan authored Mar 19, 2019
1 parent bcd0480 commit bee1758
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def run(self):

# Fix the paths to be full
mypyc_targets = [os.path.join('mypy', x) for x in mypyc_targets]
# The targets come out of file system apis in an unspecified
# order. Sort them so that the mypyc output is deterministic.
mypyc_targets.sort()

# This bit is super unfortunate: we want to use the mypy packaged
# with mypyc. It will arrange for the path to be setup so it can
Expand Down

0 comments on commit bee1758

Please sign in to comment.