✏️ 编辑:cmd.cpython-39.opt-1.pyc
路径:
/usr/lib/python3.9/site-packages/setuptools/_distutils/__pycache__/cmd.cpython-39.opt-1.pyc
大小:13.6 KB · 修改:2025-09-21 11:46:17 · 权限:0644 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
检测到二进制内容,直接保存可能损坏文件。请改用「上传替换」。
a ���h�F � @ sb d Z ddlZddlZddlZddlmZ ddlmZmZm Z m Z mZ ddlmZ G dd� d�Z dS )ztdistutils.cmd Provides the Command class, the base class for the command classes in the distutils.command package. � N)�DistutilsOptionError)�util�dir_util� file_util�archive_util�dep_util��logc @ s" e Zd ZdZg Zdd� Zdd� Zdd� Zdd � Zd d� Z dCdd�Z dd� ZdDdd�Zdd� Z dEdd�ZdFdd�Zdd� ZdGdd�Zdd � Zd!d"� Zd#d$� Zd%d&� ZdHd'd(�ZdId*d+�Zd,d-� Zd.d/� Zd0d1� ZdJd2d3�ZdKd5d6�ZdLd7d8�ZdMd9d:�ZdNd;d<�ZdOd=d>�Z dPd?d@�Z!dQdAdB�Z"dS )R�Commanda} Abstract base class for defining command classes, the "worker bees" of the Distutils. A useful analogy for command classes is to think of them as subroutines with local variables called "options". The options are "declared" in 'initialize_options()' and "defined" (given their final values, aka "finalized") in 'finalize_options()', both of which must be defined by every command class. The distinction between the two is necessary because option values might come from the outside world (command line, config file, ...), and any options dependent on other options must be computed *after* these outside influences have been processed -- hence 'finalize_options()'. The "body" of the subroutine, where it does all its work based on the values of its options, is the 'run()' method, which must also be implemented by every command class. c C sb ddl m} t||�std��| jtu r0td��|| _| �� d| _ |j | _ d| _d| _d| _ dS )z�Create and initialize a new Command object. Most importantly, invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being instantiated. r )�Distributionz$dist must be a Distribution instancezCommand is an abstract classN)Zdistutils.distr � isinstance� TypeError� __class__r �RuntimeError�distribution�initialize_optionsZ_dry_run�verbose�force�help� finalized)�selfZdistr � r �=/usr/lib/python3.9/site-packages/setuptools/_distutils/cmd.py�__init__/ s zCommand.__init__c C s<