U ReT @ s d dl m Z d dlmZ d dlm mZ d dlZd dlZd dl Z d dl Z d dlZd dl Z d dlZd dlmZ dd ZG dd dejZd d ZdS ) )glob)convert_pathN)unique_everseenc C s t | t | jtjB d S N)oschmodstatst_modeS_IWRITE)target r /builddir/build/BUILDROOT/alt-python38-setuptools-58.3.0-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/setuptools/command/build_py.py make_writable s r c @ s e Zd ZdZdd Zdd Zdd Zdd Zd d Zdd Z dd Z dd Zdd Zdd Z dd Zdd Zdd Zdd Zedd Zd S )!build_pyaX Enhanced 'build_py' command that includes data files with packages The data files are specified via a 'package_data' argument to 'setup()'. See 'setuptools.dist.Distribution' for more details. Also, this version of the 'build_py' command allows you to specify both 'py_modules' and 'packages' in the same setup operation. c C s@ t j| | jj| _| jjp i | _d| jkr6| jd= g | _d S )N data_files)origr finalize_optionsdistributionpackage_dataexclude_package_data__dict___build_py__updated_filesselfr r r r s zbuild_py.finalize_optionsc C sN | j s| jsdS | j r| | jr4| | | tjj| dd dS )z?Build modules, packages, and copy data files to build directoryNr )Zinclude_bytecode) py_modulespackagesZ build_modulesZbuild_packagesbuild_package_databyte_compiler r get_outputsr r r r run$ s zbuild_py.runc C s&