Skip to content

Commit e356747

Browse files
committed
Make wheel BUILD file generation deterministic
1 parent 363f3eb commit e356747

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rules_python/piptool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,9 @@ def extract(args):
405405
repository=args.repository,
406406
dependencies=''.join([
407407
('\n "%s",' % d) if d[0] == "@" else ('\n requirement("%s"),' % d)
408-
for d in external_deps
408+
for d in sorted(external_deps)
409409
]),
410-
imports=','.join(map(lambda i: '"%s"' % i, imports)),
410+
imports=','.join(['"%s"' % i for i in sorted(imports)]),
411411
extras='\n\n'.join([
412412
"""py_library(
413413
name = "{extra}",
@@ -417,7 +417,7 @@ def extract(args):
417417
)""".format(extra=extra,
418418
deps=','.join([
419419
'requirement("%s")' % dep
420-
for dep in whl.dependencies(extra)
420+
for dep in sorted(whl.dependencies(extra))
421421
]))
422422
for extra in args.extras or []
423423
]),

tools/piptool.par

38 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)