+
    êhs'  ã                  óø   € ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIt^ RIH	t	 ^ RI
HtHt ^ RIHt ^ RIHt ^ RIHt ^R	IHt ^R
IHt ^ RIHu Ht ^ RIHt R]P8                  9   t ! R R4      t ! R R4      tR t R# )é    )ÚannotationsN)Úcache_from_source)Úpath)Ú	build_extÚget_abi3_suffix)ÚDistribution)ÚCompileError)Ú	Extension)Úenvironment)ÚDALS)Úget_config_varÚ__pypy__c                  ó:   € ] tR t^tR tR tR tR tR tR t	Rt
R# )	ÚTestBuildExtc                óÀ   € \        4       p\        V4      pRVP                  R&   VP                  R4      p\        P                  P                  VR4      pW48X  g   Q hR# )ze
Setuptools needs to give back the same
result as distutils, even if the fullname
is not in ext_map.
Ú zfoo/barÚfooN)r   r   Úext_mapÚget_ext_filenameÚorig)ÚselfÚdistÚcmdÚresÚwanteds   &    ÚA/usr/lib/python3/dist-packages/setuptools/tests/test_build_ext.pyÚtest_get_ext_filenameÚ"TestBuildExt.test_get_ext_filename   sR   € ô ‹~ˆÜ˜‹oˆØ!#ˆ�‰�IÑØ×"Ñ" 5Ó)ˆÜ—‘×0Ñ0°°eÓ<ˆØŒ}ÐŠ}ó    c                óÎ  € \        \        4       4       \        RR.RR7      p\        \	        V.R7      4      p\        V4      pVP                  4        RVP                  9   g   Q hVP                  R4      p\        4       '       g%   VP                  \        R4      4      '       g   Q hR
# \        P                  R8X  d   VP                  R4      '       g   Q hR
# R	V9   g   Q hR
# )ze
Filename needs to be loadable by several versions
of Python 3 if 'is_abi3' is truthy on Extension()
ú	spam.eggsúeggs.cT©Úpy_limited_api©Úext_modulesÚ
EXT_SUFFIXÚwin32zeggs.pydÚabi3N)Úprintr   r
   r   Údictr   Úfinalize_optionsr   r   Úendswithr   ÚsysÚplatform)r   Ú	extensionr   r   r   s   &    r   Útest_abi3_filenameÚTestBuildExt.test_abi3_filename&   s·   € ô
 	ŒoÓÔ ä˜k¨H¨:ÀdÔKˆ	ÜœD¨i¨[Ô9Ó:ˆÜ˜‹oˆØ×ÑÔØ˜cŸk™kÔ)Ð)Ð)Ø×"Ñ" ;Ó/ˆä× Ò Ø—<‘<¤¨|Ó <×=Ò=Ð=Ò=Ü�\‰\˜WÔ$Ø—<‘< 
×+Ò+Ð+Ò+à˜S”=Ð ’=r   c                ó˜  € \        4       p\        V4      p\        RR.RR7      ;VP                  R&   pRVn        \
        '       g   VP                  R4      pMRp R\        P                  R&   VP                  R	4      pR
V8X  g   Q hVP                  R4      pWE8X  g   Q h \        P                  R R#   \        P                  R i ; i)zL
SETUPTOOLS_EXT_SUFFIX variable always overrides
default extension options.
Úfor_abi3zs.cTr#   Fzfor_abi3.test-suffixz.test-suffixÚSETUPTOOLS_EXT_SUFFIXÚnormalznormal.test-suffixN)	r   r   r
   r   Ú_links_to_dynamicÚIS_PYPYr   ÚosÚenviron)r   r   r   ÚextÚexpectr   s   &     r   Útest_ext_suffix_overrideÚ%TestBuildExt.test_ext_suffix_override;   sÆ   € ô
 ‹~ˆÜ˜‹oˆÜ(1ØØˆGàô	)
ð 	
ˆ�‰�JÑ #ð !&ˆÔç‹wØ×)Ñ)¨*Ó5‰Fð ,ˆFð	4Ø2@ŒB�J‰JÐ.Ñ/Ø×&Ñ& xÓ0ˆCØ'¨3Ô.Ð.Ð.Ø×&Ñ& zÓ2ˆCØ”=Ð ‘=ä—
‘
Ð2Ò3ø”—
‘
Ð2Ñ3ús   ÁAB6 Â6C	c           	     	óÆ   € R RRRR///RRRR///p\        RR	.4      p\        R
R.4      p\        RR.4      p\        P                  ! V4       \        RRRW#V.RRR //4      # )ÚsrcÚmypkgÚsubpkgzext2.cr   zc-extensionsÚext1zmain.cz
mypkg.ext1zc-extensions/ext1/main.czmypkg.subpkg.ext2zsrc/mypkg/subpkg/ext2.cÚext3zc-extension/ext3.cÚscript_namez%test%r&   Úpackage_dir)r
   r   Úbuildr   )r   ÚfilesrC   Úext2rD   s   &    r   Údist_with_exampleÚTestBuildExt.dist_with_example[   s“   € à�G˜h¨°2¨Ð7Ð8Ø˜V h° ^Ð4ð
ˆô
 ˜Ð(BÐ'CÓDˆÜÐ,Ð/HÐ.IÓJˆÜ˜Ð"6Ð!7Ó8ˆä�
Š
�5ÔÜØ˜8Ø˜D¨Ð-Ø˜B ˜;ð
ó ð 	r   c           	     	ó^  € VP                  R R4       VP                  RR4       V P                  4       pVP                  R4      pRVn        VP
                  ! 4        VP                  P                  \        P                  R4      pVP                  ! 4        Uu. uF"  qfP                  \        P                  R4      NK$  	  ppVV R2V R2V R2.8X  g   Q hVP                  ! 4       / 8X  g   Q hVP                  R4       R	Vn        VP
                  ! 4        VP                  ! 4       P                  4        UU	u/ uFD  w  r‰VP                  \        P                  R4      V	P                  \        P                  R4      bKF  	  p
pp	V
V R2R
V R2RV R2R/8X  g   Q hR# u upi u up	pi )r5   ú.mp3ú&setuptools.command.build_ext.use_stubsFr   Ú/ú	/ext3.mp3ú/mypkg/ext1.mp3ú/mypkg/subpkg/ext2.mp3Túsrc/ext3.mp3úsrc/mypkg/ext1.mp3úsrc/mypkg/subpkg/ext2.mp3N)ÚsetenvÚsetattrrJ   Úget_command_objÚeditable_modeÚensure_finalizedÚ	build_libÚreplacer9   ÚsepÚget_outputsÚget_output_mappingÚreinitialize_commandÚitems)r   Ú
tmpdir_cwdÚmonkeypatchr   r   r[   ÚxÚoutputsÚkÚvÚmappings   &&&        r   Útest_get_outputsÚTestBuildExt.test_get_outputsl   s·  € Ø×ÑÐ2°FÔ;Ø×ÑÐDÀeÔLØ×%Ñ%Ó'ˆð ×(Ñ(¨Ó5ˆ	Ø"'ˆ	ÔØ×"Ò"Ô$Ø×'Ñ'×/Ñ/´·±¸Ó<ˆ	Ø3<×3HÒ3HÔ3JÓKÑ3J¨a—9‘9œRŸV™V SÖ)Ñ3JˆÐKØØˆk˜Ð#Øˆk˜Ð)ØˆkÐ/Ð0ð
ô 
ð 	
ð 
ð
 ×+Ò+Ó-°Ô3Ð3Ð3ð 	×!Ñ! +Ô.Ø"&ˆ	ÔØ×"Ò"Ô$ð "×4Ò4Ó6×<Ñ<Ô>ô
á>‘�ð �I‰I”b—f‘f˜cÓ" A§I¡I¬b¯f©f°cÓ$:Ò:Ù>ð 	ñ 
ð Øˆk˜Ð# ^Øˆk˜Ð)Ð+?ØˆkÐ/Ð0Ð2Mð
ô 
ð 	
ò 
ùò! Lùó
s   Â(F$Ä=A
F)c                	ó¦  € VP                  R R4       VP                  RR4       V P                  4       pVP                  R4      pRVn        VP
                  ! 4        VP                   F  pVP                  VRR4       K  	  VP                  P                  \        P                  R4      pVP                  ! 4       P                  4        UUu/ uFD  w  rxVP                  \        P                  R4      VP                  \        P                  R4      bKF  	  p	ppR p
V	V
! V R24      V
! R	4      V R
2RV
! V R24      V
! R4      V R2RV
! V R24      V
! R4      V R2R/8X  g   Q hV R2V	9  g   Q hV R2V	9  g   Q hV
! V R24      pW¹9   g   Q hVP                  V R24      '       g   Q hVP                  R4      '       g   Q hR# u uppi )r5   rM   rN   Tr   Ú_needs_stubrO   c                óT   € \        V 4      P                  \        P                  R4      # )zDMake it possible to do comparisons and tests in a OS-independent wayrO   )Ú_compiled_file_namer\   r9   r]   )Úfiles   &r   ÚCÚ9TestBuildExt.test_get_output_mapping_with_stub.<locals>.Cž   s   € ä& tÓ,×4Ñ4´R·V±V¸SÓAÐAr   z/ext3.pyzsrc/ext3.pyrP   rS   z/mypkg/ext1.pyzsrc/mypkg/ext1.pyrQ   rT   z/mypkg/subpkg/ext2.pyzsrc/mypkg/subpkg/ext2.pyrR   rU   z/mypkg/__pycache__/ext1z.pycN)rV   rW   rJ   rX   rY   rZ   Ú
extensionsr[   r\   r9   r]   r_   ra   Ú
startswithr-   )r   rb   rc   r   r   r;   r[   rf   rg   rh   rp   Úexample_stubs   &&&         r   Ú!test_get_output_mapping_with_stubÚ.TestBuildExt.test_get_output_mapping_with_stubŒ   s  € Ø×ÑÐ2°FÔ;Ø×ÑÐDÀdÔKØ×%Ñ%Ó'ˆð ×(Ñ(¨Ó5ˆ	Ø"&ˆ	ÔØ×"Ò"Ô$Ø×'Ô'ˆCØ×Ñ  ]°DÖ9ñ (ð ×'Ñ'×/Ñ/´·±¸Ó<ˆ	ð "×4Ò4Ó6×<Ñ<Ô>ô
á>‘�ð �I‰I”b—f‘f˜cÓ" A§I¡I¬b¯f©f°cÓ$:Ò:Ù>ð 	ñ 
ò
	Bð Ù��˜8Ð$Ó%¡q¨Ó'7Øˆk˜Ð# ^Ù��˜>Ð*Ó+©QÐ/BÓ-CØˆk˜Ð)Ð+?Ù��Ð0Ð1Ó2±AÐ6PÓ4QØˆkÐ/Ð0Ð2Mð
ô 
ð 	
ð 
ð �˜NÐ+°7Ô:Ð:Ð:Ø�Ð1Ð2¸'ÔAÐAÐAñ ˜I˜; nÐ5Ó6ˆØÔ&Ð&Ð&Ø×&Ñ&¨)¨Ð4KÐ'L×MÒMÐMÐMØ×$Ñ$ V×,Ò,Ð,Ò,ùó5
s   ÃA
G© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r1   r=   rJ   ri   ru   Ú__static_attributes__rw   r   r   r   r      s"   † òò!ò*4ò@ò"
ö@'-r   r   c                  ó4   € ] tR t^¶tR R ltR tR tR tRtR# )ÚTestBuildExtInplacec               ó    € V ^8„  d   QhRRRR/# )é   ÚoptionalÚboolÚreturnr   rw   )Úformats   "r   Ú__annotate__Ú TestBuildExtInplace.__annotate__·   s   € ÷ ñ ¨$ð ¸9ñ r   c                	ó  € R RRR/ R/ //p\         P                  ! V4       \        RR .VR7      p\        \	        V.R7      4      pRVn        \        V4      p\        V4      P                  ! RR	R
RR/VB  VP                  4        V# )r"   z#include missingheader.h
z.buildÚlibÚtmpr!   )r�   r%   úsetup.pyr[   z
.build/libÚ
build_tempz
.build/tmprw   )
r   rG   r
   r   r+   rE   r   ÚvarsÚupdaterZ   )r   r�   ÚoptsrH   r0   r   r   s   &&,    r   Úget_build_ext_cmdÚ%TestBuildExtInplace.get_build_ext_cmd·   s�   € àÐ2Ø�u˜b %¨Ð,ð=
ˆô 	�
Š
�5ÔÜ˜k¨H¨:ÀÔIˆ	ÜœD¨i¨[Ô9Ó:ˆØ%ˆÔÜ˜‹oˆÜˆS‹	×ÒÑQ <ÐQ¸LÐQÈDÒQØ×ÑÔØˆ
r   c                ó¶   € VP                  4       pVP                  P                  4       VP                  P                  4       ,           VP                  ,           # )z�
Historically, distutils "logged" by printing to sys.std*.
Later versions adopted the logging framework. Grab
messages regardless of how they were captured.
)Ú
readouterrÚoutÚ
splitlinesÚerrÚmessages)r   ÚcaplogÚcapsysÚstds   &&& r   Úget_log_messagesÚ$TestBuildExtInplace.get_log_messagesÅ   s@   € ð ×ÑÓ!ˆØ�w‰w×!Ñ!Ó# c§g¡g×&8Ñ&8Ó&:Õ:¸V¿_¹_ÕLÐLr   c                ó   € V P                  RRR7      pVP                  4        \        ;QJ d+    R V P                  W#4       4       F  '       g   K   RM 	  RM! R V P                  W#4       4       4      '       g   Q hR# )zj
If optional extensions fail to build, setuptools should show the error
in the logs but not fail to build
T©r�   Úinplacec              3  ó&   "  € T F  pR x € K	  	  R# 5i)z0build_ext: building extension "spam.eggs" failedNrw   )Ú.0Úmsgs   & r   Ú	<genexpr>Ú4TestBuildExtInplace.test_optional.<locals>.<genexpr>Õ   s   é € ð 
á<�õ ?Û<ùs   ‚FN)r�   ÚrunÚanyrš   )r   rb   r—   r˜   r   s   &&&& r   Útest_optionalÚ!TestBuildExtInplace.test_optionalÎ   sq   € ð
 ×$Ñ$¨d¸DÐ$ÓAˆØ�‰Œ	ß‹sñ 
à×,Ñ,¨VÔ<ó
�s�sŠsñ 
à×,Ñ,¨VÔ<ó
÷ 
ò 
ð 	
ò 
r   c                	óÊ   € V P                  R RR7      p\        P                  ! \        4      ;_uu_ 4        VP	                  4        RRR4       R#   + '       g   i     R# ; i)FTr�   N)r�   ÚpytestÚraisesr	   r¤   )r   rb   r   s   && r   Útest_non_optionalÚ%TestBuildExtInplace.test_non_optionalÛ   s>   € à×$Ñ$¨e¸TÐ$ÓBˆÜ�]Š]œ<×(Õ(Ø�G‰GŒI÷ )×(×(Ò(ús   ¶AÁA"	rw   N)	rx   ry   rz   r{   r�   rš   r¦   r«   r|   rw   r   r   r~   r~   ¶   s   † õòMò

ör   r~   c                óÜ   € R \        R4      R\        R4      R\        R4      /p\        P                  ! V4       \        P                  ! R.RR7      w  pw  r4V^ 8X  g   Q RV R	V 24       hR
# )rŠ   zÚ
            from setuptools import Extension, setup
            setup(
                name='foo',
                version='0.0.0',
                ext_modules=[Extension('foo', ['foo.c'])],
            )
            zfoo.caÜ  
            #include "Python.h"

            #if PY_MAJOR_VERSION >= 3

            static struct PyModuleDef moduledef = {
                    PyModuleDef_HEAD_INIT,
                    "foo",
                    NULL,
                    0,
                    NULL,
                    NULL,
                    NULL,
                    NULL,
                    NULL
            };

            #define INITERROR return NULL

            PyMODINIT_FUNC PyInit_foo(void)

            #else

            #define INITERROR return

            void initfoo(void)

            #endif
            {
            #if PY_MAJOR_VERSION >= 3
                PyObject *module = PyModule_Create(&moduledef);
            #else
                PyObject *module = Py_InitModule("extension", NULL);
            #endif
                if (module == NULL)
                    INITERROR;
            #if PY_MAJOR_VERSION >= 3
                return module;
            #endif
            }
            z	setup.cfgzD
            [build]
            build_base = foo_build
            rG   )r   Údata_streamz	
STDOUT:
z	
STDERR:
N)r   r€   )r   r   rG   r   Úrun_setup_py)rb   rH   ÚcodeÚstdoutÚstderrs   &    r   Útest_build_ext_config_handlingr³   â   s‹   € à”Dðó	
ð 	”ð(ó*
ðV 	”Tðó
ðm<€Eôz 	‡J‚JˆuÔÜ(×5Ò5ØˆIØôÑ€DÑ
ˆ6ð �1Œ9Ð?˜ F 8¨;°v°hÐ?Ó?Š9r   )!Ú
__future__r   r9   r.   Úimportlib.utilr   rn   r©   Újaracor   Úsetuptools.command.build_extr   r   Úsetuptools.distr   Úsetuptools.errorsr	   Úsetuptools.extensionr
   r   r   Útextwrapr   Údistutils.command.build_extÚcommandr   Údistutils.sysconfigr   Úbuiltin_module_namesr8   r   r~   r³   rw   r   r   Ú<module>rÀ      sa   ðÝ "ã 	Û 
Ý Cã Ý ç CÝ (Ý *Ý *å Ý ç *Ð *Ý .à
˜×0Ñ0Ñ
0€÷[-ñ [-÷|)ñ )ôXC@r   