Ë /bF&³“ãóü—ddlmZddlmZddlmZddlmcmZddl Z ddl Z ddl Z ddl Z ddlZddlZddlmZddlmZmZmZmZmZmZddlmZdd lmZd Zd „ZGd „d ej«Zd„ZGd„d«Z y)é)Úpartial)Úglob)Ú convert_pathN)ÚPath)ÚDictÚIterableÚIteratorÚListÚOptionalÚTupleé)Úunique_everseen)ÚSetuptoolsDeprecationWarning)z*.pyizpy.typedcóŒ—tj|tj|«jtjz«y©N)ÚosÚchmodÚstatÚst_modeÚS_IWRITE)Útargets ú@/usr/lib/python3.12/site-packages/setuptools/command/build_py.pyÚ make_writablers'€Ü‡H�HˆV”R—W‘W˜V“_×,Ñ,¬t¯}©}Ñ<Õ=ócó<‡—eZdZUdZdZeed<dZee ed<d„Z dˆfd„ Z d„Z d „Z d „Zd „Zd „Zd „Zd„Zd dee fˆfd„ Zdee e ffd„Zdeee e ffd„Zdeee e ffd„Zd„Zd„Zdee de dee fd„Zd„Zd„Z d„Z!d„Z"d„Z#e$d!d„«Z%ˆxZ&S)"Úbuild_pyaXEnhanced '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. FÚ editable_modeNÚexisting_egg_info_dircóú—tjj|«|jj|_|jj xsi|_d|j vr |j d=g|_y)NÚ data_files)ÚorigrÚfinalize_optionsÚ distributionÚ package_dataÚexclude_package_dataÚ__dict__Ú_build_py__updated_files©Úselfs rr"zbuild_py.finalize_options&sa€Ü � ‰ ×&Ñ& tÔ,Ø ×-Ñ-×:Ñ:ˆÔØ$(×$5Ñ$5×$JÑ$JÒ$PÈbˆÔ!Ø ˜4Ÿ=™=Ñ (Ø— ‘ ˜lÐ+Ø!ˆÕrc󸕗|rDtt|«j««}tt|«j««}t‰|�||||||«Sr)ÚstrrÚresolveÚsuperÚ copy_file)r)ÚinfileÚoutfileÚ preserve_modeÚpreserve_timesÚlinkÚlevelÚ __class__s €rr.zbuild_py.copy_file.sUø€ñ Üœ˜f›×-Ñ-Ó/Ó0ˆFÜœ$˜w›-×/Ñ/Ó1Ó2ˆG܉wÑ Ø �G˜]¨N¸DÀ%ó ð rcó>—|js |jr |jry|jr|j«|jr |j «|j «|j tjj|d¬««y)z?Build modules, packages, and copy data files to build directoryNr)Úinclude_bytecode) Ú py_modulesÚpackagesrÚ build_modulesÚbuild_packagesÚbuild_package_dataÚ byte_compiler!rÚ get_outputsr(s rÚrunz build_py.run9sp€à—’ 4§=¢=°T×5GÒ5GØ à �?Š?Ø × Ñ Ô à �=Š=Ø × Ñ Ô !Ø × #Ñ #Ô %ð ×Ñœ$Ÿ-™-×3Ñ3°DÈ1Ð3ÓMÕNrcóŽ—|dk(r!|j«|_|jStjj ||«S)zlazily compute data filesr )Ú_get_data_filesr r!rÚ __getattr__)r)Úattrs rrBzbuild_py.__getattr__Is;€à �<Ò Ø"×2Ñ2Ó4ˆDŒOØ—?‘?Ð "Ü�}‰}×(Ñ(¨¨tÓ4Ð4rcóŽ—tjj||||«\}}|r|jj |«||fSr)r!rÚ build_moduler'Úappend)r)ÚmoduleÚ module_fileÚpackager0Úcopieds rrEzbuild_py.build_modulePsB€ÜŸ-™-×4Ñ4°T¸6À;ÐPWÓX‰ˆ�Ù Ø × Ñ × 'Ñ '¨Ô 0ؘˆÐrcó|—|j«tt|j|jxsd««S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples©)Úanalyze_manifestÚlistÚmapÚ_get_pkg_data_filesr9r(s rrAzbuild_py._get_data_filesVs/€à ×ÑÔÜ”C˜×0Ñ0°$·-±-Ò2EÀ2ÓFÓGÐGrcó”—|jjdi«tt|j|j xsd««S)z¡ Generate list of ``(package,src_dir,build_dir,filenames)`` tuples, but without triggering any attempt to analyze or build the manifest. Úmanifest_filesrL)r&Ú setdefaultrNrOrPr9r(s rÚget_data_files_without_manifestz(build_py.get_data_files_without_manifest[s:€ð � ‰ × Ñ Ð!1°2Ô6Ü”C˜×0Ñ0°$·-±-Ò2EÀ2ÓFÓGÐGrcó&—|j|«}tjj|jg|j d«zŽ}|j ||«D�cgc]"}tjj||«‘Œ$}}||||fScc}w©NÚ.)Úget_package_dirrÚpathÚjoinÚ build_libÚsplitÚfind_data_filesÚrelpath)r)rIÚsrc_dirÚ build_dirÚfileÚ filenamess rrPzbuild_py._get_pkg_data_fileses�€à×&Ñ& wÓ/ˆô—G‘G—L‘L D§N¡NÐ#3°g·m±mÀCÓ6HÑ#HÐJˆ ð ×,Ñ,¨W°gÔ>ó á>�ô �G‰G�O‰O˜D 'Õ *Ø>ð ð 𘠨IÐ5Ð5ùò  sÁ'BcóŠ—|j|j||t¬«}tt t d¬«|«}t jj|«}ttjj|«}t j|jj|g«|«}|j|||«S)z6Return filenames for package's data files in 'src_dir')Úextra_patternsT)Ú recursive)Ú_get_platform_patternsr$Ú_IMPLICIT_DATA_FILESrOrrÚ itertoolsÚchainÚ from_iterableÚfilterrrYÚisfilerRÚgetÚexclude_data_files)r)rIr_ÚpatternsÚglobs_expandedÚ globs_matchesÚ glob_filesÚfiless rr]zbuild_py.find_data_filesss¤€à×.Ñ.Ø × Ñ Ø Ø Ü/ð /ó ˆô œW¤T°TÔ:¸HÓEˆä!Ÿ™×5Ñ5°nÓEˆ ÜœBŸG™GŸN™N¨MÓ:ˆ Ü—‘Ø × Ñ × #Ñ # G¨RÓ 0Ø ó ˆð×&Ñ& w°¸Ó?Ð?rÚreturnc󈕗|jr't|j«j««St‰|�|«S)ú1See :class:`setuptools.commands.build.SubCommand`)rrNÚget_output_mappingÚkeysr-r>)r)r7r5s €rr>zbuild_py.get_outputs…s:ø€à × Ò Ü˜×/Ñ/Ó1×6Ñ6Ó8Ó9Ð 9܉wÑ"Ð#3Ó4Ð4rcó”—tj|j«|j««}t t |d„¬««S)rvcó —|dS)NrrL)Úxs rÚz-build_py.get_output_mapping..‘s€°!°A²$r)Úkey)rhriÚ _get_package_data_output_mappingÚ_get_module_mappingÚdictÚsorted)r)Úmappings rrwzbuild_py.get_output_mapping‹s<€ä—/‘/Ø × 1Ñ 1Ó 3Ø × $Ñ $Ó &ó ˆô”F˜7©Ô7Ó8Ð8rc#ó¦K—|j«D]:\}}}|jd«}|j|j||«}||f–—Œ<y­w)z5Iterate over all modules producing (dest, src) pairs.rWN)Úfind_all_modulesr\Úget_module_outfiler[)r)rIrGrHÚfilenames rrzbuild_py._get_module_mapping“sRèø€à,0×,AÑ,AÖ,CÑ (ˆG�V˜[Ø—m‘m CÓ(ˆGØ×.Ñ.¨t¯~©~¸wÈÓOˆHؘ[Ð)Ó )ñ-Dùs‚AAc#óÒK—|jD]T\}}}}|D]H}tjj||«}tjj||«}||f–—ŒJŒVy­w)z6Iterate over package data producing (dest, src) pairs.N)r rrYrZ)r)rIr_r`rbr†rÚsrcfiles rr~z)build_py._get_package_data_output_mappingšs[èø€à6:·o´oÑ 2ˆG�W˜i¨Û%�ÜŸ™Ÿ™ i°Ó:�ÜŸ'™'Ÿ,™, w°Ó9�ؘwÐ'Ó'ñ&ñ7Fùs‚A%A'cóЗ|j«D]S\}}|jtjj |««|j ||«\}}t |«ŒUy)z$Copy data files into build directoryN)r~ÚmkpathrrYÚdirnamer.r)r)rrˆÚ_outfÚ_copieds rr<zbuild_py.build_package_data¢sO€à#×DÑDÖF‰OˆF�GØ �K‰KœŸ™Ÿ™¨Ó/Ô 0Ø!Ÿ^™^¨G°VÓ<‰NˆE�7Ü ˜&Õ !ñ Grcó.—ix|_}|jjsyi}|jxsdD]}||t |j |««<Œ!t |dd«r]t|jd«j«r9|j}t|d«}|jd¬«j«}nD|jd«|jd«}|j}|jj }t#«}|j%||«D]ô} t&j(j+t | ««\} } d} | } | rY| | k7rT| |vrP| } t&j(j+| «\} }t&j(j-|| «} | r | | k7r| |vrŒP| |vsŒ’| | k(r|j/| «r)Œ©|j1|| | «}|r|j3|«|j5|| g«j7| «Œöy)NrLrz SOURCES.txtzutf-8)ÚencodingÚegg_info)rRr#Úinclude_package_datar9Úassert_relativerXÚgetattrrrÚexistsÚ read_textÚ splitlinesÚ run_commandÚget_finalized_commandr�ÚfilelistrsÚ_IncludePackageDataAbuseÚ_filter_build_filesrrYr\rZÚ is_moduleÚimportable_subpackageÚwarnrSrF)r)ÚmfÚsrc_dirsrIÚ egg_info_dirÚmanifestrsÚei_cmdÚcheckrYÚdÚfÚprevÚoldfÚdfÚ importables rrMzbuild_py.analyze_manifest©sÞ€Ø#%Ð%ˆÔ˜bØ× Ñ ×5Ò5Ø ØˆØ—}‘}Ò*¨Ò*ˆGàGNˆH”_ T×%9Ñ%9¸'Ó%BÓCÒ Dð+ô �DÐ1°4Ô 8Ü�T×/Ñ/°Ó?×FÑFÔHà×5Ñ5ˆLܘL¨-Ó8ˆHØ×&Ñ&°Ð&Ó8×CÑCÓE‰Eà × Ñ ˜ZÔ (Ø×/Ñ/° Ó;ˆFØ!Ÿ?™?ˆLØ—O‘O×)Ñ)ˆEä(Ó*ˆØ×,Ñ,¨U°LÖAˆDÜ—7‘7—=‘=¤°Ó!6Ó7‰DˆAˆq؈D؈DÙ˜˜Tš  a¨xÑ&7Ø�ÜŸ™Ÿ ™  aÓ(‘��2Ü—G‘G—L‘L  QÓ'�ñ˜˜Tš  a¨xÒ&7ð�HŠ}ؘ’9Ø—‘ qÔ)Ø à!&×!<Ñ!<¸XÀa¹[È!Ó!L�JÙ!ØŸ ™  :Ô.Ø— ‘ ˜h q™k¨2Ó.×5Ñ5°dÕ;ñ!Brrsr�c#óœ‡K—|jd«}||j|j|jf}|D�cgc]$}|sŒtj j |«‘Œ&}}|D]Y}tj j |«Štj j|«rtˆfd„|D««sŒV|–—Œ[ycc}w­w)a} ``build_meta`` may try to create egg_info outside of the project directory, and this can be problematic for certain plugins (reported in issue #3500). Extensions might also include between their sources files created on the ``build_lib`` and ``build_temp`` directories. This function should filter this case of invalid files out. Úbuildc3ó&•K—|]}|‰v–—Œ y­wrrL)Ú.0r¥Ú norm_paths €rÚ z/build_py._filter_build_files..âsøèø€Ð-TÉ)ÀQ¨a°yÔ.@É)ùsƒN) r˜r[Ú build_tempÚ build_baserrYÚnormpathÚisabsÚall) r)rsr�r¬Ú build_dirsÚpÚ norm_dirsrar¯s @rr›zbuild_py._filter_build_filesÒs¢øèø€ð×*Ñ*¨7Ó3ˆØ §¡°×0@Ñ0@À%×BRÑBRÐSˆ Ù2<ÓB±*¨Q”R—W‘W×%Ñ% aÕ(°*ˆ ÐBãˆDÜŸ™×(Ñ(¨Ó.ˆIÜ—7‘7—=‘= Ô&¬#Ó-TÉ)Ó-TÕ*TØ“ ñùòCùsƒ:C ½CÁ!CÁ&AC à C có—yrrLr(s rÚget_data_fileszbuild_py.get_data_filesås€Ø rcóú— |j|S#t$rYnwxYwtjj |||«}||j|<|r|j j s|S|j j D]}||k(s|j|dz«sŒn|St|d«5}|j«}ddd«n #1swYnxYwdvr#tjjd|›d�«‚|S)z8Check namespace packages' __init__ for declare_namespacerWÚrbNsdeclare_namespacezNamespace package problem: z¤ is a namespace package, but its __init__.py does not call declare_namespace()! Please fix it. (See the setuptools manual under "Namespace Packages" for details.) ") Úpackages_checkedÚKeyErrorr!rÚ check_packager#Únamespace_packagesÚ startswithÚopenÚreadÚ distutilsÚerrorsÚDistutilsError)r)rIÚ package_dirÚinit_pyÚpkgr¦Úcontentss rr¿zbuild_py.check_packageès÷€ð Ø×(Ñ(¨Ñ1Ð 1øÜò Ù ð úô—-‘-×-Ñ-¨d°G¸[ÓIˆØ)0ˆ×јgÑ&á˜d×/Ñ/×BÒB؈Nà×$Ñ$×7Ô7ˆCØ�gŠ~ §¡°¸#± Õ!>Ùð8ðˆNä �'˜4Ô  AØ—v‘v“xˆH÷!× Ñ úà  xÑ /Ü×"Ñ"×1Ò1ò.søèø€ÐOÁh¸7œŸ™ u¨g×6Áhùsƒ #c3ó,•K—|] }|‰vsŒ|–—Œ y­wrrL)r®ÚfnÚbads €rr°z.build_py.exclude_data_files..søèø€Ð7¡˜"¨°3ª”2¡ùsƒ �)rNrfr%rhrirjÚsetr) r)rIr_rsroÚ match_groupsÚmatchesÚkeepersrÖs ` @rrnzbuild_py.exclude_data_filessoù€ä�U“ ˆØ×.Ñ.Ø × %Ñ %Ø Ø ó ˆó PÁhÓOˆ ä—/‘/×/Ñ/° Ó=ˆÜ�'‹lˆÛ7¡Ó7ˆä”O GÓ,Ó-Ð-rc󈇗tj||jdg«|j|g««}ˆfd„|D«S)zÜ yield platform-specific path patterns (suitable for glob or fn_match) from a glob-based spec (such as self.package_data or self.exclude_package_data) matching package in src_dir. Úc3óp•K—|]-}tjj‰t|««–—Œ/y­wr)rrYrZr)r®rÓr_s €rr°z2build_py._get_platform_patterns../s/øèø€ð ñ(�ô �G‰G�L‰L˜¤,¨wÓ"7× 8Ù'ùsƒ36)rhrirm)ÚspecrIr_rdÚ raw_patternss ` rrfzbuild_py._get_platform_patterns"sFø€ô!—‘Ø Ø �H‰H�R˜Ó Ø �H‰H�W˜bÓ !ó ˆ ó  ñ(ó ð r)éràNrà)rà)rL)'Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚboolÚ__annotations__rr r+r"r.r?rBrErArTrPr]r r>rrwr r rr~r<rMrr›rºr¿rÌrXrnÚ staticmethodrfÚ __classcell__)r5s@rrrs ø…ñð €M�4ÓØ+/И8 C™=Ó/ò"ðTUõ  òOò 5òò Hò Hò 6ò@ñ$5°°c±õ5ð 9 D¨¨c¨¡Nó9ð* X¨e°C¸°H©oÑ%>ó*ð(°(¸5ÀÀcÀ¹?Ñ2Kó(ò"ò'<ðR¨°#©ðÀ#ðÈ(ÐSVÉ-óò& òò<*ò ò .ð ò óô rrcó¬—tjj|«s|Sddlm}t j d«j«|z}||«‚)Nr)ÚDistutilsSetupErrorzÓ Error: setup script specifies an absolute path: %s setup() arguments must *always* be /-separated paths relative to the setup.py directory, *never* absolute paths. )rrYr´Údistutils.errorsrêÚtextwrapÚdedentÚlstrip)rYrêÚmsgs rr’r’6sP€Ü �7‰7�=‰=˜Ô ؈ Ý4ô �‰ð ó ÷ ‰&‹(Ø ñ ðñ ˜cÓ "Ð"rcó>—eZdZdZGd„de«Zd„Zd„Zd„Zd„Z y) ršz>Inform users that package or module is included as 'data file'có—eZdZdZdZy)ú!_IncludePackageDataAbuse._WarningzU Package {importable!r} is absent from the `packages` configuration. a| ############################ # Package would be ignored # ############################ Python recognizes {importable!r} as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that {importable!r} is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want {importable!r} to be distributed and are already explicitly excluding {importable!r} via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. N)rárârãÚ_SUMMARYÚ_DETAILSrLrrÚ_WarningròNs„ð ˆð" ‰rrõcó"—t«|_yr)r×Ú_already_warnedr(s rÚ__init__z!_IncludePackageDataAbuse.__init__ys €Ü"›uˆÕrcób—|jd«xr|dtd« j«S)Nz.py)ÚendswithÚlenÚ isidentifier)r)ras rrœz"_IncludePackageDataAbuse.is_module|s,€Ø�}‰}˜UÓ#ÒJ¨¨]´°E³ ¨{Ð(;×(HÑ(HÓ(JÐJrcóÈ—t|«j}ttjt j |j««}|rdj|g|¢«SyrV) rÚparentrNrhÚ takewhiler+rüÚpartsrZ)r)rþrarÉrs rr�z._IncludePackageDataAbuse.importable_subpackagesO€Ü�4‹j×шܔY×(Ñ(¬×)9Ñ)9¸3¿9¹9ÓEÓFˆÙ Ø—8‘8˜VÐ, eÐ,Ó-Ð -Ørcó�—||jvr8|jj|¬«|jj|«yy)N)rª)r÷rõÚemitÚadd)r)rªs rržz_IncludePackageDataAbuse.warn†s>€Ø ˜T×1Ñ1Ñ 1Ø �M‰M× Ñ ¨*Ð Ô 5Ø × Ñ × $Ñ $ ZÕ 0ð 2rN) rárârãrärrõrørœr�ržrLrrršršKs(„ÙHô' Ð/ô' òV%òKòó1rrš)!Ú functoolsrrÚdistutils.utilrÚdistutils.command.build_pyÚcommandrr!rrÒrìrërÄrhrÚpathlibrÚtypingrrr r r r Úextern.more_itertoolsrÚwarningsrrgrr’ršrLrrÚr sdðÝÝÝ'ß)Ð)Û ÛÛÛÛÛ ÝßB×Bå3Ý3ð-Ðò>ôZ ˆt�}‰}ôZ òz#÷*>1ò>1r