Skip to content

Commit

Permalink
tools: fix GYP MSVS solution generator for Python 3
Browse files Browse the repository at this point in the history
PR-URL: #29897
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
  • Loading branch information
targos committed Oct 13, 2019
1 parent 6c205ab commit 8728f86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/gyp/pylib/gyp/MSVSNew.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import hashlib
import os
import random
from operator import attrgetter

import gyp.common

Expand Down Expand Up @@ -86,7 +87,7 @@ def __init__(self, path, name = None, entries = None,
self.guid = guid

# Copy passed lists (or set to empty lists)
self.entries = sorted(list(entries or []))
self.entries = sorted(entries or [], key=attrgetter('path'))
self.items = list(items or [])

self.entry_type_guid = ENTRY_TYPE_GUIDS['folder']
Expand Down Expand Up @@ -230,7 +231,7 @@ def Write(self, writer=gyp.common.WriteOnDiff):
if isinstance(e, MSVSFolder):
entries_to_check += e.entries

all_entries = sorted(all_entries)
all_entries = sorted(all_entries, key=attrgetter('path'))

# Open file and print header
f = writer(self.path)
Expand Down

0 comments on commit 8728f86

Please sign in to comment.