+
    SBiU                         R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^RIH	t	 ^RI
Ht ^RIHtHtHtHt ^RIHt ^RIHt  ! R	 R
]	4      tR# )zwdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).N)log)ClassVar)Command)DEBUG)DistutilsExecErrorDistutilsFileErrorDistutilsOptionErrorDistutilsPlatformError)
write_file)get_python_versionc                   >  a  ] tR t^t o Rt. RNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=Nt. R>OtRRRRRR/tR	 tV 3R
 lR lt	V 3R lR lt
V 3R lR ltR tR tR tV 3R ltRtV tR# )?	bdist_rpmzcreate an RPM distributionN	keep-tempno-keep-tempuse-rpm-opt-flagsno-rpm-opt-flags	rpm3-mode	rpm2-modec                (   R V n         R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n	        R V n
        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n        R V n         RV n!        RV n"        RV n#        RV n$        R V n%        RV n&        R # )NFT)'
bdist_baserpm_basedist_dirpython
fix_python	spec_onlybinary_onlysource_only	use_bzip2distribution_namegroupreleaseserialvendorpackager	doc_files	changelogiconprep_scriptbuild_scriptinstall_scriptclean_scriptverify_scriptpre_installpost_installpre_uninstallpost_uninstallprepprovidesrequires	conflictsbuild_requires	obsoletes	keep_tempuse_rpm_opt_flags	rpm3_mode
no_autoreq
force_archquietselfs   &L/usr/lib/python3.14/site-packages/setuptools/_distutils/command/bdist_rpm.pyinitialize_optionsbdist_rpm.initialize_options   s!   !%
	 " ! !"	"!%
    c                   < V ^8  d   QhRR/#    returnN )format__classdict__s   "r>   __annotate__bdist_rpm.__annotate__   s     % %$ %rA   c                   V P                  R R
4       V P                  fM   V P                  '       g   \        R4      h\        P
                  P                  V P                  R4      V n        V P                  f1   V P                  '       d   \        P                  V n        M%RV n        MV P                  '       d   \        R4      h\        P                  R8w  d   \        R\        P                   24      hV P                  '       d   V P                  '       d   \        R4      hV P                   P#                  4       '       g   R	V n        V P                  R R4       V P'                  4        R# )bdistNz)you must specify --rpm-base in RPM 2 moderpmpython3z8--python and --fix-python are mutually exclusive optionsposixz7don't know how to create RPM distributions on platform z6cannot supply both '--source-only' and '--binary-only'F)r   r   )r   r   )set_undefined_optionsr   r8   r   ospathjoinr   r   r   sys
executablenamer	   r   r   distributionhas_ext_modulesr7   finalize_package_datar<   s   &r>   finalize_optionsbdist_rpm.finalize_options   s   ""7,HI== >>>*+VWWGGLL%@DM;;!nn'___&J  77g(I"''S   0 0 0&H 
   0022%*D"""7,DE""$rA   c                   < V ^8  d   QhRR/# rC   rF   )rG   rH   s   "r>   rI   rJ      s     ,) ,)t ,)rA   c                   V P                  R R4       V P                  RV P                  P                  4        RV P                  P                  4        R24       V P                  R4       V P	                  R4       \        V P                  \        4      '       d^   R FW  p\        P                  P                  V4      '       g   K*  WP                  9  g   K<  V P                  P                  V4       KY  	  V P                  RR4       V P                  R	4       V P                  R
4       V P                  R4       V P                  V P                  4      V n        V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P	                  R4       V P	                  R4       V P	                  R4       V P	                  R4       V P	                  R4       V P                  R4       R# )r   zDevelopment/Librariesr"   z <>r#   r$   r    1r!   r   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r1   r2   r3   r4   r5   r:   N)READMEz
README.txt)ensure_stringrW   get_contactget_contact_emailensure_string_list
isinstancer$   listrQ   rR   existsappend_format_changelogr%   ensure_filename)r=   readmes   & r>   rY   bdist_rpm.finalize_package_data   s   7$;<  ,,./r$2C2C2U2U2W1XXYZ	
 	:&,dnnd++277>>&))fNN.JNN))&1 3 	9c*8$./;'//?V$]+^,-.^,_-]+^,_--. 	
+
+, 01,<(rA   c                   < V ^8  d   QhRR/# rC   rF   )rG   rH   s   "r>   rI   rJ     s     ~ ~T ~rA   c                   \         '       dd   \        R 4       \        RV P                  4       \        RV P                  4       \        RV P                  4       \        RV P
                  4       V P                  '       d   V P                  pV P                  V4       MW/ pR' FF  p\        P                  P                  V P                  V4      W#&   V P                  W#,          4       KH  	  VR,          p\        P                  P                  WP                  P                  4        R	24      pV P                  \         W@P#                  4       3R
V R24       V P                  '       d   R# V P                  P$                  R,          pV P'                  R4      pV P(                  '       d
   R.Vn        MR.Vn        V P-                  R4       WPP                  n        VP/                  4       ^ ,          pXR,          pV P1                  Wx4       V P2                  '       df   \        P                  P5                  V P2                  4      '       d   V P1                  V P2                  V4       M\7        RV P2                   R24      h\8        P:                  ! R4       R.p	V P<                  '       d   V	P?                  R4       M5V P@                  '       d   V	P?                  R4       MV	P?                  R4       V	PC                  RRV PD                   2.4       V PF                  '       d>   V	PC                  RR\        P                  PI                  V P                  4       2.4       V PJ                  '       g   V	P?                  R4       V PL                  '       d   V	P?                  R4       V	P?                  V4       Rp
V
R,           pRV
,           R ,           pR!V R"V R#V R2p\        PN                  ! V4      p . pRp VPQ                  4       pV'       g   MYVPS                  4       PU                  4       p\W        V4      ^8X  g   Q hVP?                  V^,          4       Ve   Kh  V^ ,          pKs  VPY                  4       pV'       d   \[        R$V: 24      h VPY                  4        V P]                  V	4       V P^                  '       Eg   V P                  Pa                  4       '       d   \c        4       pMR%pV P@                  '       g   \        P                  P                  VR,          V4      p\        P                  P5                  V4      '       g   Q hV Pe                  VV P                  4       \        P                  P                  V P                  V4      pV P                  P$                  P?                  R&VV34       V P<                  '       g   V F  p\        P                  P                  VR,          V4      p\        P                  P5                  V4      '       g   KQ  V Pe                  VV P                  4       \        P                  P                  V P                  \        P                  Pg                  V4      4      pV P                  P$                  P?                  R&VV34       K  	  R# R# R#   TPY                  4        i ; i)(zbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =SOURCESSPECSRPMSSRPMSz.specz	writing ''N:NNNsdistbztargztarzicon file 'z' does not existzbuilding RPMsrpmbuildz-bsz-bbz-baz--definez	__python z_topdir z--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmzrpm -q --qf ' z\n' --specfile 'zFailed to execute: anyr   )ro   rp   BUILDrq   rr   )4r   printr"   r#   r$   r%   r   r   mkpathrQ   rR   rS   r   rW   get_nameexecuter
   _make_spec_file
dist_filesreinitialize_commandr   formatsrun_commandget_archive_files	copy_filer&   rg   r   r   infor   rh   r   extendr   r8   abspathr6   r;   popenreadlinestripsplitlencloser   spawndry_runrX   r   	move_filebasename)r=   spec_dirrpm_dird	spec_pathsaved_dist_filesrt   source
source_dirrpm_cmd
nvr_stringsrc_rpmnon_src_rpmq_cmdoutbinary_rpms
source_rpmlineellstatus	pyversionsrpmfilenamerM   s   &                       r>   runbdist_rpm.run  s   5/0*dkk*,.-0-0 >>>}}HKK!GCWW\\$--;
GJ' D w'H GGLL.?.?.H.H.J-K5+QR	$8$8$:;yST=U	
 >>>  ,,77:))'2>>>$IEM$IEM!'7$((*1-Y'
v*999ww~~dii((tyy*5(;tyykAQ)RSS 	!,NN5!NN5!NN5!
i}$=>?>>>NNJ(277??4==3Q2R(STU~~~NN9%:::NN9%y!
 5
z) :-> 	;-7G	{RSThhuo	KJ||~jjl((*3x1}$}""3q6*%!$QJYY[F(+>ui)HII  IIK

7|||  0022.0	!	###ww||GG$4jAww~~d++++tT]]377<<zB!!,,33[)X4VW###&C'',,wv<Cww~~c**sDMM:#%77<<rww?O?OPS?T#U))44;;'%$=  ' $ 	 IIKs   ?[ A
[ +"[ [ [c                    \         P                  P                  V P                  \         P                  P	                  V4      4      # )N)rQ   rR   rS   r   r   )r=   rR   s   &&r>   
_dist_pathbdist_rpm._dist_path  s*    ww||DMM277+;+;D+ABBrA   c           	     J   RV P                   P                  4       ,           RV P                   P                  4       P                  RR4      ,           RV P                   P                  4       ,           RV P                  P                  RR4      ,           RRV P                   P                  4       ;'       g    R	,           .p\        P                  ! R
4      pRP                  VP                  4        Uu. uF  pRVP                  4        R2NK  	  up4      pRpRpVP                  WE4      pWb8w  d1   VP                  R4       VP                  RV,           R,           4       VP                  . R.O4       V P                  '       d   VP                  R4       MVP                  R4       TP                  RV P                   P                  4       ;'       g    R	,           RV P                  ,           RR.4       V P                   '       g3   V P                   P#                  4       '       g   VP                  R4       MVP                  RV P                    24       R/ F  p\%        WP'                  4       4      p\)        V\*        4      '       d3   VP                  RP-                  VRP                  V4      4      4       Kd  Vf   Kj  VP                  V RV 24       K  	  V P                   P/                  4       '       d1   VP                  RV P                   P/                  4       ,           4       V P0                  '       d#   VP                  RV P0                  ,           4       V P2                  '       d2   VP                  R RP                  V P2                  4      ,           4       V P4                  '       d@   VP                  R!\6        P8                  P;                  V P4                  4      ,           4       V P<                  '       d   VP                  R"4       TP                  RR#V P                   P?                  4       ;'       g    R.4       V P@                   R\6        P8                  P;                  \B        PD                  ^ ,          4       2p	V	 R$2p
V PF                  '       d
   R%V
,           p
V	 R&2pR0R'R(V
3R)R*V3R1R2R3R4R5R6.	pV F  w  rp\%        W4      pV'       g   V'       g   K#  VP                  RR+V,           .4       V'       dM   \I        V4      ;_uu_ 4       pVP                  VPK                  4       PM                  R4      4       RRR4       K  VP                  V4       K  	  VP                  . R7O4       V PN                  '       d2   VP                  R,RP                  V PN                  4      ,           4       V PP                  '       d/   VP                  RR-.4       VP                  V PP                  4       V# u upi   + '       g   i     EKU  ; i)8zYGenerate the text of an RPM spec file and return it as a
list of strings (one per line).
z%define name z%define version -_z%define unmangled_version z%define release  z	Summary: UNKNOWNzrpm --eval %{__os_install_post}
  z \zbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z3# Workaround for https://bugs.python.org/issue14443z%define __os_install_post z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchzBuildArch: z{}: {}rx   Nz: zUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz buildzenv CFLAGS="$RPM_OPT_FLAGS" z< install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILESbuildr(   installr)   %z%doc z
%changelog)zName: %{name}zVersion: %{version}zRelease: %{release})VendorPackagerProvidesRequires	Conflicts	Obsoletes)r0   r'   z&%setup -n %{name}-%{unmangled_version})cleanr*   zrm -rf $RPM_BUILD_ROOT)verifyscriptr+   N)prer,   N)postr-   N)preunr.   N)postunr/   N)r   z%files -f INSTALLED_FILESz%defattr(-,root,root)))rW   r}   get_versionreplacer    get_description
subprocess	getoutputrS   
splitlinesr   rh   r   r   get_licenser   r:   rX   getattrlowerre   rf   rG   get_urlr   r4   r&   rQ   rR   r   r9   get_long_descriptionr   rT   argvr7   openreadr   r$   r%   )r=   	spec_filevendor_hookr   problemfixed
fixed_hookfieldvaldef_setup_call	def_buildinstall_cmdscript_optionsrpm_optattrdefaultfs   &                r>   r   bdist_rpm._make_spec_file  s    d//88::!2!2!>!>!@!H!Hc!RR(4+<+<+H+H+JJ!5!5c3!??4,,<<>KK)L
	 !**+LM ii/:/E/E/G!
/Gtbc"/G!
  09 ((8
$RS9JFMN 	 
 	 >>>LMKL4,,88:GGiH

"L 	
 	 $$4466  !45{4??*;<=
E $.C#t$$  !FG  E7"SE!23
 $$&&Wt'8'8'@'@'BBC!!!-0F0FFG.$:M:M1NNO999X(8(8(CCD???\*224::
 	$ !KK="''*:*:388A;*G)HI%&f-	!!!6BI (((de Nni0(+6?3(*,.

 '5"G7 $%Cgg  'M"  ca!(()=> # $$W- '5  	 
 	 >>>Wsxx'??@>>>  T^^,k!
~ #s   3X%/XX"c                f   V'       g   V# . pVP                  4       P                  R4       Fo  pVP                  4       pV^ ,          R8X  d   VP                  RV.4       K6  V^ ,          R8X  d   VP                  V4       KW  VP                  RV,           4       Kq  	  V^ ,          '       g   V^  V# )zBFormat the changelog correctly and convert it to a list of stringsr   *r   r   r   )r   r   r   rh   )r=   r%   new_changelogr   s   &&  r>   ri   bdist_rpm._format_changelogD  s    OO%++D1D::<DAw#~$$b$Z0aC$$T*$$TD[1 2 Qa rA   c                x   < V ^8  d   Qh/ S[ S[S[,          ,          ;R&   S[ S[S[S[3,          ,          ;R&   # )rD   boolean_optionsnegative_opt)r   rf   strdict)rG   rH   s   "r>   rI   rJ      s=     h d3i( i x 4S>* y rA   )'r   r   r4   r(   r%   r*   r3   r   r   r$   r   r:   r   r&   r)   r6   r9   r5   r#   r-   r/   r,   r.   r0   r'   r1   r   r;   r    r2   r8   r   r!   r   r   r   r7   r"   r+   )zbdist-base=Nz/base directory for creating built distributions)z	rpm-base=Nzdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2))z	dist-dir=r   zDdirectory to put final RPM files in (and .spec files if --spec-only))zpython=NzMpath to Python interpreter to hard-code in the .spec file [default: "python"])z
fix-pythonNzLhard-code the exact path to the current Python interpreter in the .spec file)z	spec-onlyNzonly regenerate spec file)zsource-onlyNzonly generate source RPM)zbinary-onlyNzonly generate binary RPM)z	use-bzip2Nz7use bzip2 instead of gzip to create source distribution)zdistribution-name=Nzgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!))zgroup=Nz9package classification [default: "Development/Libraries"])zrelease=NzRPM release number)zserial=NzRPM serial number)zvendor=NzaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script])z	packager=NzBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor])z
doc-files=Nz6list of documentation files (space or comma-separated))z
changelog=NzRPM changelog)zicon=Nzname of icon file)z	provides=Nz%capabilities provided by this package)z	requires=Nz%capabilities required by this package)z
conflicts=Nz-capabilities which conflict with this package)zbuild-requires=Nz+capabilities required to build this package)z
obsoletes=Nz*capabilities made obsolete by this package)
no-autoreqNz+do not automatically calculate dependencies)r   kz"don't clean up RPM build directory)r   Nz&clean up RPM build directory [default])r   Nz8compile with RPM_OPT_FLAGS when building from source RPM)r   Nz&do not pass any RPM CFLAGS to compiler)r   Nz"RPM 3 compatibility mode (default))r   NzRPM 2 compatibility mode)zprep-script=Nz3Specify a script for the PREP phase of RPM building)zbuild-script=Nz4Specify a script for the BUILD phase of RPM building)zpre-install=Nz:Specify a script for the pre-INSTALL phase of RPM building)zinstall-script=Nz6Specify a script for the INSTALL phase of RPM building)zpost-install=Nz;Specify a script for the post-INSTALL phase of RPM building)zpre-uninstall=Nz<Specify a script for the pre-UNINSTALL phase of RPM building)zpost-uninstall=Nz=Specify a script for the post-UNINSTALL phase of RPM building)zclean-script=Nz4Specify a script for the CLEAN phase of RPM building)zverify-script=Nz6Specify a script for the VERIFY phase of the RPM build)zforce-arch=Nz0Force an architecture onto the RPM build process)r;   qz3Run the INSTALL phase of RPM building in quiet mode)r   r   r   r   r;   )__name__
__module____qualname____firstlineno__descriptionuser_optionsr   r   r?   rZ   rY   r   r   r   ri   __annotate_func____static_attributes____classdictcell__)rH   s   @r>   r   r      s    .KoPo	
o	
o	
o&	
'o2 	93o4 	:5o6 	:7o8 	W9oD	
EoP 	XQoR 	1SoT 	/UoV	
Wob	
col 	Wmon 	.oop 	-qor 	Esot 	Euov 	Nwox 	Qyoz 	K{o| 	L}o@ 	AAoB 	ICoD	
EoN 	MOoP 	BQoR 	8SoV 	VWoX 	XYoZ	
[od	
eon	
oox	
yoB	
CoL 	XMoN	
OoZ 	R[o\ 	N]oLb,O 	/[.L+Z% %B,) ,)\~ ~@CiVY  rA   r   )__doc__rQ   r   rT   distutils._logr   typingr   corer   debugr   errorsr   r   r   r	   	file_utilr
   	sysconfigr   r   rF   rA   r>   <module>r      sA   
 
  
      # *~ ~rA   