Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/python/mozbuild/mozbuild/action/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  zip.py   Sprache: Python

 
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# This script creates a zip file, but will also strip any binaries
# it finds before adding them to the zip.

import argparse
import sys

import mozpack.path as mozpath
from mozpack.copier import Jarrer
from mozpack.errors import errors
from mozpack.files import FileFinder
from mozpack.path import match


def main(args):
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "-C",
        metavar="DIR",
        default=".",
        help="Change to given directory before considering " "other paths",
    )
    parser.add_argument("--strip", action="store_true", help="Strip executables")
    parser.add_argument(
        "-x",
        metavar="EXCLUDE",
        default=[],
        action="append",
        help="Exclude files that match the pattern",
    )
    parser.add_argument("zip", help="Path to zip file to write")
    parser.add_argument("input", nargs="+", help="Path to files to add to zip")
    args = parser.parse_args(args)

    jarrer = Jarrer()

    with errors.accumulate():
        finder = FileFinder(args.C, find_executables=args.strip)
        for path in args.input:
            for p, f in finder.find(path):
                if not any([match(p, exclude) for exclude in args.x]):
                    jarrer.add(p, f)
        jarrer.copy(mozpath.join(args.C, args.zip))


if __name__ == "__main__":
    main(sys.argv[1:])

Messung V0.5
C=93 H=98 G=95

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.