Benjamin Gordon | 1f4537f | 2019-12-06 09:10:56 -0700 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | # Copyright 2020 The Chromium OS Authors. All rights reserved. |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | """Run xz from PATH with a thread for each core in the system.""" |
| 7 | |
| 8 | from __future__ import print_function |
| 9 | |
| 10 | import os |
Mike Frysinger | 687ab9d | 2020-02-06 00:35:15 -0500 | [diff] [blame^] | 11 | import sys |
| 12 | |
| 13 | |
| 14 | assert sys.version_info >= (3, 6), 'This module requires Python 3.6+' |
Benjamin Gordon | 1f4537f | 2019-12-06 09:10:56 -0700 | [diff] [blame] | 15 | |
| 16 | |
| 17 | def main(argv): |
| 18 | os.execvp('xz', ['xz', '-T0'] + argv) |