관리-도구
편집 파일: bdist_rpm.cpython-37.opt-1.pyc
B � f�T � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZ ddlT ddl mZ dd lmZ G d d� de�ZdS )zwdistutils.command.bdist_rpm Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).� N)�Command)�DEBUG)�get_platform)� write_file)�*)�get_python_version)�logc ) @ s� e Zd ZdZdddddddd d ddd ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*g)Zd+d,d-d.d/gZd+d,d-d0�Zd1d2� Zd3d4� Zd5d6� Z d7d8� Z d9d:� Zd;d<� Zd=d>� Z d?S )@� bdist_rpmzcreate an RPM distribution)zbdist-base=Nz/base directory for creating built distributions)z rpm-base=Nzdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2))z dist-dir=�dzDdirectory to put final RPM files in (and .spec files if --spec-only))zpython=NzMpath to Python interpreter to hard-code in the .spec file (default: "python"))z fix-pythonNzLhard-code the exact path to the current Python interpreter in the .spec file)z spec-onlyNzonly regenerate spec file)zsource-onlyNzonly generate source RPM)zbinary-onlyNzonly generate binary RPM)z use-bzip2Nz7use bzip2 instead of gzip to create source distribution)zdistribution-name=Nzgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!))zgroup=Nz9package classification [default: "Development/Libraries"])zrelease=NzRPM release number)zserial=NzRPM serial number)zvendor=NzaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script])z packager=NzBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor])z doc-files=Nz6list of documentation files (space or comma-separated))z changelog=Nz RPM changelog)zicon=Nzname of icon file)z provides=Nz%capabilities provided by this package)z requires=Nz%capabilities required by this package)z conflicts=Nz-capabilities which conflict with this package)zbuild-requires=Nz+capabilities required to build this package)z obsoletes=Nz*capabilities made obsolete by this package)z no-autoreqNz+do not automatically calculate dependencies)z keep-temp�kz"don't clean up RPM build directory)zno-keep-tempNz&clean up RPM build directory [default])zuse-rpm-opt-flagsNz8compile with RPM_OPT_FLAGS when building from source RPM)zno-rpm-opt-flagsNz&do not pass any RPM CFLAGS to compiler)z rpm3-modeNz"RPM 3 compatibility mode (default))z rpm2-modeNzRPM 2 compatibility mode)zprep-script=Nz3Specify a script for the PREP phase of RPM building)z build-script=Nz4Specify a script for the BUILD phase of RPM building)zpre-install=Nz:Specify a script for the pre-INSTALL phase of RPM building)zinstall-script=Nz6Specify a script for the INSTALL phase of RPM building)z post-install=Nz;Specify a script for the post-INSTALL phase of RPM building)zpre-uninstall=Nz<Specify a script for the pre-UNINSTALL phase of RPM building)zpost-uninstall=Nz=Specify a script for the post-UNINSTALL phase of RPM building)z clean-script=Nz4Specify a script for the CLEAN phase of RPM building)zverify-script=Nz6Specify a script for the VERIFY phase of the RPM build)zforce-arch=Nz0Force an architecture onto the RPM build process)�quiet�qz3Run the INSTALL phase of RPM building in quiet modez keep-tempzuse-rpm-opt-flagsz rpm3-modez no-autoreqr )zno-keep-tempzno-rpm-opt-flagsz rpm2-modec C s� d | _ d | _d | _d | _d | _d | _d | _d | _d | _d | _ d | _ d | _d | _d | _ d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _d | _ d| _!d| _"d| _#d| _$d | _%d| _&d S )Nr � )'� bdist_base�rpm_base�dist_dir�python� fix_python� spec_only�binary_only�source_only� use_bzip2�distribution_name�group�release�serial�vendor�packager� doc_files� changelog�icon�prep_script�build_script�install_script�clean_script� verify_script�pre_install�post_install� pre_uninstall�post_uninstall�prep�provides�requires� conflicts�build_requires� obsoletes� keep_temp�use_rpm_opt_flags� rpm3_mode� no_autoreq� force_archr )�self� r6 �@/opt/alt/python37/lib64/python3.7/distutils/command/bdist_rpm.py�initialize_options� sN zbdist_rpm.initialize_optionsc C s� | � dd� | jd kr6| js$td��tj�| jd�| _| jd krX| j rPt j| _qfd| _n| j rftd��tjdkr~t dtj ��| jr�| jr�td ��| j�� s�d | _| � dd� | �� d S )NZbdist)r r z)you must specify --rpm-base in RPM 2 mode�rpmZpython3z8--python and --fix-python are mutually exclusive options�posixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r )r r )Zset_undefined_optionsr r2 ZDistutilsOptionError�os�path�joinr r r �sys� executable�nameZDistutilsPlatformErrorr r �distribution�has_ext_modulesr1 �finalize_package_data)r5 r6 r6 r7 �finalize_options� s. zbdist_rpm.finalize_optionsc C sX | � dd� | � dd| j�� | j�� f � | � d� | �d� t| jt�r|x.dD ]&}tj � |�rR|| jkrR| j�|� qRW | � dd � | � d � | � d� | � d� | �| j �| _ | �d � | �d� | �d� | �d� | �d� | �d� | �d� | �d� | �d� | �d� | �d� | �d� | �d� | �d� | �d� | � d� d S )Nr zDevelopment/Librariesr z%s <%s>r r )ZREADMEz README.txtr �1r r r r r! r"