관리-도구
편집 파일: context.cpython-311.pyc
� ,�Re, � �N � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZej d� � � Zej ddefd�� � Z d� Z ej ej fd�� � Zej ddefd�� � Z ej d� � � Z G d � d � � Z G d� dej ej � � ZdS ) � Nc # � K � t j � � }t j | � � | V � t j |� � d S # t j |� � w xY w�N)�os�getcwd�chdir)�dir�origs ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pkg_resources/_vendor/jaraco/context.py�pushdr sO � � � � �9�;�;�D��H�S�M�M�M��� � � � ������������������s �A �Ac # � K � |�Gt j � | � � � dd� � � dd� � }|� t j t j d�� � } | dj d i t � � ��� � d}d }d � ||f� � } | |j d dt | � � it � � ��� � ||� � 5 |V � ddd� � n# 1 swxY w Y | dj d i t � � ��� � dS # | dj d i t � � ��� � w xY w)z� Get a tarball, extract it, change to that directory, yield, then clean up. `runner` is the function to invoke commands. `pushd` is a context manager for changing the directory. Nz.tar.gz� z.tgzT)�shellzmkdir {target_dir}zwget {url} -O -z7tar x{compression} --strip-components=1 -C {target_dir}z | �compressionzrm -Rf {target_dir}� )r �path�basename�replace� functools�partial� subprocess� check_call�format�vars�join�infer_compression)�url� target_dir�runnerr �getter�extract�cmds r �tarball_contextr"