Edit File: build_py.cpython-311.opt-1.pyc
� �����f&C����������������������������d�Z�ddlZddlZddlZddlZddlmZ�ddlT�ddl m Z mZ�ddlm Z ��G�d��de������������Z�G�d ��d ee������������ZdS�)zHdistutils.command.build_py Implements the Distutils 'build_py' command.�����N)�Command)�*)�convert_path� Mixin2to3)�logc�������������������������e�Zd�ZdZg�d�ZddgZddiZd��Zd��Zd��Z d ��Z d ��Zd��Zd��Z d ��Zd��Zd��Zd��Zd��Zd��Zd��Zdd�Zd��Zd��Zd��Zd��ZdS�)�build_pyz5"build" pure Python modules (copy to build directory)))z build-lib=�dzdirectory to "build" (copy) to)�compile�czcompile .py to .pyc)� no-compileNz!don't compile .py files [default])z optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz2forcibly build everything (ignore file timestamps)r���r���r ���c������������������v�����d�|�_���������d�|�_��������d�|�_��������d�|�_��������d�|�_��������d|�_��������d|�_��������d�|�_��������d�S�)Nr���)� build_lib� py_modules�package�package_data�package_dirr����optimizer�����selfs��� �A/opt/alt/python311/lib64/python3.11/distutils/command/build_py.py�initialize_optionszbuild_py.initialize_options ���s@��������������� ����������� ��� � � �����c����������������������|�����������������������ddd�������������|�j��������j��������|�_��������|�j��������j��������|�_��������|�j��������j��������|�_��������i�|�_��������|�j��������j��������r;|�j��������j�������������������������������������������D�]\��}}t����������|������������|�j��������|<����|������������������������������������|�_ ��������t����������|�j��������t����������������������s@ �t����������|�j��������������������|�_��������d�S�#�t����������t����������f$�r�t����������d�������������w�xY�wd�S�)N�build)r���r���)r���r���zoptimize must be 0, 1, or 2)�set_undefined_options�distribution�packagesr���r���r����itemsr����get_data_files� data_files� isinstancer����int� ValueError�AssertionError�DistutilsOptionError)r����name�paths��� r����finalize_optionszbuild_py.finalize_options*���s#������"�"�7�#=�#5� 7�� 7�� 7���)�2�� ��+�6��� �-�:��������(�� <�"�/�;�A�A�C�C�� <�� <� ��d�)5�d�);�);�� ��&�&��-�-�/�/�����$�-��-�-�� J� J� #�D�M� 2� 2�� � � ����/�� J�� J�� J�*�+H�I�I�I� J���� J�� Js���� C(��(!D c������������������������|�j���������r|�������������������������������������|�j��������r(|�������������������������������������|�������������������������������������|����������������������|����������������������d��������������������������d�S��Nr���)�include_bytecode)r���� build_modulesr!����build_packages�build_package_data�byte_compile�get_outputsr���s��� r����runzbuild_py.runC���sy������,��?�� !���� � � ��=�� &����!�!�!��#�#�%�%�%����$�*�*�A�*�>�>�?�?�?�?�?r���c������������������\�����g�}|�j���������s|S�|�j���������D�]�}|����������������������|������������}t����������j��������j��������|�j��������g|���������������������d������������z�����}d�|rt����������|������������dz�����fd�|����������������������||������������D���������������}|� ��������������������||||f���������������|S�)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�.r�������c������������������$������g�|�]}|�d������������� S��N��)�.0�file�plens��� �r���� <listcomp>z+build_py.get_data_files.<locals>.<listcomp>s���s.������������� $��T�U�U������r���) r!����get_package_dir�osr+����joinr����split�len�find_data_files�append)r����datar����src_dir� build_dir� filenamesr>���s��� @r���r#���zbuild_py.get_data_filesa���s�����������}�� ��K��}�� B�� B�G��*�*�7�3�3�G�������'7�'�-�-��:L�:L�'L�N�I���D��� &��7�|�|�A�~���������(,�(<�(<�W�g�(N�(N������I�� �K�K��'�9�i�@�A�A�A�A��r���c����������� �������h�����|�j������������������������������dg�������������|�j������������������������������|g�������������z���}g��|D�]t}t����������j��������t����������j�����������������������������t����������j��������|������������t����������|������������������������������������}�����������������������fd�|D�����������������������������u�S�)z6Return filenames for package's data files in 'src_dir'��c������������������Z������g�|�]'}|�v�t�����������j�����������������������������|�������������%|��(S�r;���)rA���r+����isfile)r<����fn�filess��� �r���r?���z,build_py.find_data_files.<locals>.<listcomp>����s;��������(��(��(��2�U�?�?��G�N�N�2�&�&��4C�"�?�?�?r���) r����get�globrA���r+���rB����escaper����extend)r���r���rH����globs�pattern�filelistrP���s��� @r���rE���zbuild_py.find_data_filesy���s���������"�&�&�r�2�.�.��$�(�(��"�5�5�6������ )�� )�G��y�����d�k�'�.B�.B�L�QX�DY�DY�!Z�!Z�[�[�H��L�L��(��(��(��(�x��(��(��(�� )�� )�� )�� )��r���c������������������B����d}|�j���������D�]�\��}}}}|D�]�}t����������j�����������������������������||������������}|����������������������t����������j�����������������������������|�������������������������|����������������������t����������j�����������������������������||������������|d������������������dS�)z$Copy data files into build directoryNF�� preserve_mode)r$���rA���r+���rB����mkpath�dirname� copy_file)r����lastdirr���rH���rI���rJ����filename�targets��� r���r2���zbuild_py.build_package_data����s���������6:�o�� 4�� 4�2�G�W�i��%�� 4�� 4������i��:�:�����B�G�O�O�F�3�3�4�4�4����r�w�|�|�G�X�>�>��-2����4��4��4��4� 4� 4�� 4r���c����������������������|����������������������d������������}|�j��������s|rt����������j��������j��������|��S�dS�g�}|r{ �|�j��������d���������������������|���������������������}|���������������������d|�������������t����������j��������j��������|��S�#�t����������$�r"�|���������������������d|d����������������������|d=�Y�nw�xY�w|�{|�j�����������������������������d������������}|�|���������������������d|�������������|rt����������j��������j��������|��S�dS�)z�Return the directory, relative to the top of the source distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).r7���rL���r������)rC���r���rA���r+���rB����insert�KeyErrorrQ���)r���r���r+����tail�pdirs��� r���r@���zbuild_py.get_package_dir����s"�������}�}�S�!�!����� ��� ��w�|�T�*�*��r��D��� �/��+�C�H�H�T�N�N�;�D� ��K�K��4�(�(�(��7�<��.�.��� ��!��!��!��K�K��4��8�,�,�,��R����!������� �"��'�+�+�B�/�/���#��K�K��4�(�(�(�����7�<��.�.��2s���� B��)B.�-B.c����������������������|dk����rbt�����������j�����������������������������|������������st����������d|z���������������t�����������j�����������������������������|������������st����������d|z���������������|rVt�����������j�����������������������������|d������������}t�����������j�����������������������������|������������r|S�t����������j��������d|�������������d�S�)NrL���z%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.pyz8package init file '%s' not found (or not a regular file)) rA���r+����exists�DistutilsFileError�isdirrB���rN���r����warn)r���r���r����init_pys��� r���� check_packagezbuild_py.check_package����s������� ��"����7�>�>�+�.�.�� M�(�=��K�M��M��M��7�=�=��-�-�� ?�(�0�2=�>�?��?��?� ��� ?��g�l�l�;� �>�>�G��w�~�~�g�&�&�� ?������4�6=�?��?��?� ��tr���c������������������t�����t�����������j�����������������������������|������������st����������j��������d||�������������dS�dS�)Nz!file %s (for module %s) not foundFT)rA���r+���rN���r���rk���)r����module�module_files��� r����check_modulezbuild_py.check_module����s7�������w�~�~�k�*�*�� ��H�8�+�v�N�N�N��5��4r���c������������������J����|�����������������������||�������������t����������j��������t����������j�����������������������������t����������j��������|������������d������������������������}g�}t����������j�����������������������������|�j��������j��������������������}|D�]�}t����������j�����������������������������|������������}||k����r[t����������j��������� ��������������������t����������j��������� ��������������������|������������������������d���������}|���������������������|||f���������������|����������������������d|z�����������������|S�)Nz*.pyr���zexcluding %s) rm���rR���rA���r+���rB���rS����abspathr ����script_name�splitext�basenamerF����debug_print) r���r���r����module_files�modules�setup_scriptr����abs_fro���s ��� r����find_package_moduleszbuild_py.find_package_modules����s����������7�K�0�0�0��y�����d�k�+�.F�.F��!O�!O�P�P�����w���t�'8�'D�E�E���� @�� @�A��G�O�O�A�&�&�E���$�$���)�)�"�'�*:�*:�1�*=�*=�>�>�q�A��������3�4�4�4�4�� � ��,�!>�?�?�?�?��r���c����������������������i�}g�}|�j���������D�]�}|���������������������d������������}d���������������������|dd����������������������}|d���������} �||���������\��}}n'#�t����������$�r�|����������������������|������������}d}Y�nw�xY�w|s7|����������������������||������������} |df||<���| r|���������������������|d| f�������������t����������j�����������������������������||dz���������������} |�� ��������������������|| ������������s��|���������������������||| f���������������|S�)a���Finds individually-specified Python modules, ie. those listed by module name in 'self.py_modules'. Returns a list of tuples (package, module_base, filename): 'package' is a tuple of the path through package-space to the module; 'module_base' is the bare (no packages, no dots) module name, and 'filename' is the path to the ".py" file (relative to the distribution root) that implements the module. r7���r���rb���r8����__init__�.py) r���rC���rB���rd���r@���rm���rF���rA���r+���rq���)r���r!���ry���ro���r+���r����module_baser����checkedrl���rp���s��� r����find_moduleszbuild_py.find_modules����sN�������������o�� @�� @�F��<�<��$�$�D��h�h�t�A�b�D�z�*�*�G��r�(�K� �)1�'�):�&��g�g���� �� �� �"�2�2�7�;�;������ ������� C��,�,�W�k�B�B��%0�!�$4���!���C��N�N�G�Z��#A�B�B�B� ��'�,�,�{�K�%�4G�H�H�K��$�$�V�[�9�9�� ���N�N�G�[�+�>�?�?�?�?��s���� A�!A9�8A9c����������������������g�}|�j���������r'|���������������������|�������������������������������������������������|�j��������rJ|�j��������D�]B}|����������������������|������������}|����������������������||������������}|���������������������|��������������C|S�)a4��Compute the list of all modules that will be built, whether they are specified one-module-at-a-time ('self.py_modules') or by whole packages ('self.packages'). Return a list of tuples (package, module, module_file), just like 'find_modules()' and 'find_package_modules()' do.)r���rT���r����r!���r@���r|���)r���ry���r���r����ms��� r����find_all_moduleszbuild_py.find_all_modules��s�����������?�� 0��N�N�4�,�,�.�.�/�/�/��=�� "��=�� "�� "��"�2�2�7�;�;���-�-�g�{�C�C�����q�!�!�!�!��r���c������������������>�����d��|�������������������������������������D���������������S�)Nc�����������������������g�|�] }|d������������S�)rb���r;���)r<���ro���s��� r���r?���z-build_py.get_source_files.<locals>.<listcomp>-��s������A�A�A�v��r� �A�A�Ar���)r����r���s��� r����get_source_fileszbuild_py.get_source_files,��s"������A�A��)>�)>�)@�)@�A�A�A�Ar���c������������������\�����|gt����������|������������z���|dz���gz���}t����������j��������j��������|��S�)Nr���)�listrA���r+���rB���)r���rI���r���ro����outfile_paths��� r����get_module_outfilezbuild_py.get_module_outfile/��s/������!�{�T�'�]�]�2�f�u�n�5E�E���w�|�\�*�*r���r8���c����������������������|�������������������������������������}g�}|D�]�\��}}}|���������������������d������������}|����������������������|�j��������||������������}|���������������������|�������������|r|�j��������r4|���������������������t����������j�����������������������������|d��������������������������|�j ��������dk����r9|���������������������t����������j�����������������������������||�j ������������������������������������|d��|�j ��������D���������������z ��}|S�)Nr7���rL���)�optimizationr���c������������������b�����g�|�],\��}}}}|D�]"}t�����������j�����������������������������||��������������#�-S�r;���)rA���r+���rB���)r<���r���rH���rI���rJ���r_���s��� r���r?���z(build_py.get_outputs.<locals>.<listcomp>B��sW������������6���)�Y�%������� �G�L�L��H�-�-�������r���)r����rC���r����r���rF���r���� importlib�util�cache_from_sourcer���r$���)r���r/���ry����outputsr���ro���rp���r_���s��� r���r4���zbuild_py.get_outputs3��s'������'�'�)�)����.5�� ?�� ?�*�W�f�k��m�m�C�(�(�G��.�.�t�~�w��O�O�H��N�N�8�$�$�$��� ?��<��4��N�N�9�>�#C�#C� �r��$D��$3��$3��4��4��4��=�1�$�$��N�N�9�>�#C�#C� �t�}��$D��$>��$>��?��?��?��� �����:>�/������� ����r���c������������������~����t����������|t����������������������r|���������������������d������������}n+t����������|t����������t����������f������������st����������d�������������|����������������������|�j��������||������������}t����������j ��������� ��������������������|������������}|����������������������|�������������|����������������������||d�������������S�)Nr7���z:'package' must be a string (dot-separated), list, or tupler���rY���) r%����strrC���r�����tuple� TypeErrorr����r���rA���r+���r\���r[���r]���)r���ro���rp���r����outfile�dirs��� r����build_modulezbuild_py.build_moduleJ��s��������g�s�#�#�� P��m�m�C�(�(�G�G��G�d�E�]�3�3�� P��N�P��P�� P���)�)�$�.�'�6�J�J���g�o�o�g�&�&�����C�����~�~�k�7�!�~�D�D�Dr���c������������������n�����|�������������������������������������}|D�]\��}}}|����������������������|||��������������d�S�r:���)r����r����)r���ry���r���ro���rp���s��� r���r0���zbuild_py.build_modulesY��sP�������#�#�%�%��.5�� <�� <�*�W�f�k� � ���f�k�7�;�;�;�;� <�� <r���c�����������������������|�j���������D�]M}|����������������������|������������}|����������������������||������������}|D�]\��}}}|����������������������|||���������������Nd�S�r:���)r!���r@���r|���r����)r���r���r���ry����package_ro���rp���s��� r���r1���zbuild_py.build_packagesb��s��������}�� @�� @�G���.�.�w�7�7�K��/�/���E�E�G��4;�� @�� @�/��6�;��!�!�&�+�w�?�?�?�?� @� @�� @r���c������������������J����t�����������j��������r|����������������������d�������������d�S�ddlm}�|�j��������}|d���������t����������j��������k����r|t����������j��������z���}|�j��������r�||d|�j ��������||�j ����������������������|�j��������dk����r!�|||�j��������|�j ��������||�j ����������������������d�S�d�S�)Nz%byte-compiling is disabled, skipping.r���)r3���rb���)r���r����prefix�dry_run)�sys�dont_write_bytecoderk����distutils.utilr3���r���rA����sepr���r���r����r���)r���rP���r3���r����s��� r���r3���zbuild_py.byte_compilev��s��������"�� ��I�I�=�>�>�>��F�/�/�/�/�/�/�����"�:������b�f�_�F� ��<�� P��L���#�z�&�$�,� P�� P�� P�� P��=�1����L����#�z�&�$�,� P�� P�� P�� P�� P�� P���r���N)r8���)�__name__� __module__�__qualname__�description�user_options�boolean_options�negative_optr���r,���r5���r#���rE���r2���r@���rm���rq���r|���r����r����r����r����r4���r����r0���r1���r3���r;���r���r���r ���r ������sx�������������K�K� �� �� �L��!�'�*�O� �9�-�L������J��J��J�2@��@��@�<�����0�����4��4��4�%��%��%�N�����6����� �� �� �2��2��2�h����� B��B��B�+��+��+��������. E�� E�� E�<��<��<�@��@��@�(P��P��P��P��Pr���r ���c�������������������������e�Zd�Zd��Zd��ZdS�)� build_py_2to3c������������������.����g�|�_���������|�j��������r|�������������������������������������|�j��������r(|�������������������������������������|�������������������������������������|����������������������|�j����������������������|����������������������|����������������������d��������������������������d�S�r.���) � updated_filesr���r0���r!���r1���r2����run_2to3r3���r4���r���s��� r���r5���zbuild_py_2to3.run���s������������?�� !���� � � ��=�� &����!�!�!��#�#�%�%�%�� � � �d�(�)�)�)�� ���$�*�*�A�*�>�>�?�?�?�?�?r���c�����������������������t��������������������������������|�|||������������}|d���������r |�j�����������������������������|d����������������������|S�)Nr8���r���)r ���r����r����rF���)r���ro���rp���r����ress��� r���r����zbuild_py_2to3.build_module���sG�������#�#�D�&�+�w�G�G���q�6�� .���%�%�c�!�f�-�-�-�� r���N)r����r����r����r5���r����r;���r���r���r����r�������s5��������������@��@��@� ��������r���r����)�__doc__rA����importlib.utilr����r����rR����distutils.corer����distutils.errorsr����r���r���� distutilsr���r ���r����r;���r���r����<module>r�������s������0��0�� � � � ���������� � � � �������"��"��"��"��"��"����������2��2��2��2��2��2��2��2�������������yP��yP��yP��yP��yP���yP��yP��yP�v���������H�i����������r���