Server IP : 103.119.228.120 / Your IP : 3.145.63.131 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/mysqlsh/lib/python3.9/site-packages/setuptools/_vendor/wheel/cli/ |
Upload File : |
""" Wheel command-line utility. """ from __future__ import annotations import argparse import os import sys from argparse import ArgumentTypeError class WheelError(Exception): pass def unpack_f(args): from .unpack import unpack unpack(args.wheelfile, args.dest) def pack_f(args): from .pack import pack pack(args.directory, args.dest_dir, args.build_number) def convert_f(args): from .convert import convert convert(args.files, args.dest_dir, args.verbose) def tags_f(args): from .tags import tags names = ( tags( wheel, args.python_tag, args.abi_tag, args.platform_tag, args.build, args.remove, ) for wheel in args.wheel ) for name in names: print(name) def version_f(args): from .. import __version__ print("wheel %s" % __version__) def parse_build_tag(build_tag: str) -> str: if build_tag and not build_tag[0].isdigit(): raise ArgumentTypeError("build tag must begin with a digit") elif "-" in build_tag: raise ArgumentTypeError("invalid character ('-') in build tag") return build_tag TAGS_HELP = """\ Make a new wheel with given tags. Any tags unspecified will remain the same. Starting the tags with a "+" will append to the existing tags. Starting with a "-" will remove a tag (use --option=-TAG syntax). Multiple tags can be separated by ".". The original file will remain unless --remove is given. The output filename(s) will be displayed on stdout for further processing. """ def parser(): p = argparse.ArgumentParser() s = p.add_subparsers(help="commands") unpack_parser = s.add_parser("unpack", help="Unpack wheel") unpack_parser.add_argument( "--dest", "-d", help="Destination directory", default="." ) unpack_parser.add_argument("wheelfile", help="Wheel file") unpack_parser.set_defaults(func=unpack_f) repack_parser = s.add_parser("pack", help="Repack wheel") repack_parser.add_argument("directory", help="Root directory of the unpacked wheel") repack_parser.add_argument( "--dest-dir", "-d", default=os.path.curdir, help="Directory to store the wheel (default %(default)s)", ) repack_parser.add_argument( "--build-number", help="Build tag to use in the wheel name" ) repack_parser.set_defaults(func=pack_f) convert_parser = s.add_parser("convert", help="Convert egg or wininst to wheel") convert_parser.add_argument("files", nargs="*", help="Files to convert") convert_parser.add_argument( "--dest-dir", "-d", default=os.path.curdir, help="Directory to store wheels (default %(default)s)", ) convert_parser.add_argument("--verbose", "-v", action="store_true") convert_parser.set_defaults(func=convert_f) tags_parser = s.add_parser( "tags", help="Add or replace the tags on a wheel", description=TAGS_HELP ) tags_parser.add_argument("wheel", nargs="*", help="Existing wheel(s) to retag") tags_parser.add_argument( "--remove", action="store_true", help="Remove the original files, keeping only the renamed ones", ) tags_parser.add_argument( "--python-tag", metavar="TAG", help="Specify an interpreter tag(s)" ) tags_parser.add_argument("--abi-tag", metavar="TAG", help="Specify an ABI tag(s)") tags_parser.add_argument( "--platform-tag", metavar="TAG", help="Specify a platform tag(s)" ) tags_parser.add_argument( "--build", type=parse_build_tag, metavar="BUILD", help="Specify a build tag" ) tags_parser.set_defaults(func=tags_f) version_parser = s.add_parser("version", help="Print version and exit") version_parser.set_defaults(func=version_f) help_parser = s.add_parser("help", help="Show this help") help_parser.set_defaults(func=lambda args: p.print_help()) return p def main(): p = parser() args = p.parse_args() if not hasattr(args, "func"): p.print_help() else: try: args.func(args) return 0 except WheelError as e: print(e, file=sys.stderr) return 1