python (3.11.7)

(root)/
lib/
python3.11/
distutils/
command/
__pycache__/
bdist_rpm.cpython-311.opt-2.pyc

e!T	ddlZddlZddlZddlmZddlmZddlmZddl	Tddl
mZddlm
Z
Gdd	eZdS)
N)Command)DEBUG)
write_file)*)get_python_version)logcXeZdZdZgdZgdZddddZdZd	Zd
Z	dZ
dZd
ZdZ
dS)	bdist_rpmzcreate an RPM distribution)))zbdist-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=dzDdirectory to put final RPM files in (and .spec files if --spec-only))zpython=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-onlyNzonly regenerate spec file)zsource-onlyNzonly generate source RPM)zbinary-onlyNzonly generate binary RPM)z	use-bzip2Nz7use bzip2 instead of gzip to create source distribution)zdistribution-name=Nzgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!))zgroup=Nz9package classification [default: "Development/Libraries"])zrelease=NzRPM release number)zserial=NzRPM serial number)zvendor=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)zicon=Nzname 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)zbuild-requires=Nz+capabilities required to build this package)z
obsoletes=Nz*capabilities made obsolete by this package)
no-autoreqNz+do not automatically calculate dependencies)	keep-tempkz"don't clean up RPM build directory)no-keep-tempNz&clean up RPM build directory [default])use-rpm-opt-flagsNz8compile with RPM_OPT_FLAGS when building from source RPM)no-rpm-opt-flagsNz&do not pass any RPM CFLAGS to compiler)	rpm3-modeNz"RPM 3 compatibility mode (default))	rpm2-modeNzRPM 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)zinstall-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)zpre-uninstall=Nz<Specify a script for the pre-UNINSTALL phase of RPM building)zpost-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)zverify-script=Nz6Specify a script for the VERIFY phase of the RPM build)zforce-arch=Nz0Force an architecture onto the RPM build process)quietqz3Run the INSTALL phase of RPM building in quiet mode)r
rrrrr
rr)rrrc(d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&dS)Nr)'
bdist_baserpm_basedist_dirpython
fix_python	spec_onlybinary_onlysource_only	use_bzip2distribution_namegroupreleaseserialvendorpackager	doc_files	changelogiconprep_scriptbuild_scriptinstall_scriptclean_script
verify_scriptpre_installpost_install
pre_uninstallpost_uninstallprepprovidesrequires	conflictsbuild_requires	obsoletes	keep_tempuse_rpm_opt_flags	rpm3_mode
no_autoreq
force_archrselfs O/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/distutils/command/bdist_rpm.pyinitialize_optionszbdist_rpm.initialize_optionss%

!%

	 " ! !"	

"!"


cb|dd|j@|jstdtj|jd|_|j!|j	rtj|_nd|_n|j	rtdtjdkrtdtjz|jr|jrtd	|jsd
|_|dd|dS)Nbdist)rrz)you must specify --rpm-base in RPM 2 moderpmpython3z8--python and --fix-python are mutually exclusive optionsposixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r)rr)set_undefined_optionsrr;DistutilsOptionErrorospathjoinrrrsys
executablenameDistutilsPlatformErrorrrdistributionhas_ext_modulesr:finalize_package_datar>s r@finalize_optionszbdist_rpm.finalize_optionssU""7,HIII= >
C*ACCCGLL%@@DM;
(!n'
_	N&LNN
N7g(*246G*<==
=	L 0	L&JLL
L 0022	'%&D"""7,DEEE""$$$$$rBcd|dd|d|jd|jd|d|dt|jtrGdD]D}tj	
|r#||jvr|j|E|d	d
|d|d|d
||j
|_
|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|ddS)Nr"zDevelopment/Librariesr%z <>r&r')READMEz
README.txtr#1r$r!r(r)r*r+r,r-r.r/r0r1r2r4r5r6r7r8r=)
ensure_stringrQget_contactget_contact_emailensure_string_list
isinstancer'listrJrKexistsappend_format_changelogr(ensure_filename)r?readmes  r@rSzbdist_rpm.finalize_package_datas7$;<<<8(,(9(E(E(G(G(G(G(,(9(K(K(M(M(M(MO	P	P	P	
:&&&,,,dnd++	22
2
27>>&))2fDN.J.JN))&1119c***8$$$.///;'''//??V$$$]+++^,,,-...^,,,_---]+++^,,,_----...	

+++
+++,,, 0111,,,<(((((rBctrctdtd|jtd|jtd|jtd|j|jr|j}||nRi}dD]E}tj
|j|||<|||F|d}tj
|d|j
z}|t ||fd	|z|jrdS|j
jdd}|d
}|jr	dg|_ndg|_|d
||j
_|d
}|d}||||jrWtj
|jr||j|nt7d|jzt9jddg}	|jr|	dn2|j r|	dn|	d|	!dd|j"zg|j#r<|	!ddtj
$|jzg|j%s|	d|j&r|	d|	|d}
|
dz}d|
zdz}d|d|d |d!}
tj'|
}	g}d}	|(}|snL|)*}||d#||d
}c|+}|rtYd$t[|
z	|+n#|+wxYw|.|	|j/s|j
0rtc}nd%}|j stj
|d&|}|2||jtj
|j|}|j
jd'||f|js|D]}tj
|d(|}tj
|r|2||jtj
|jtj
3|}|j
jd'||fdSdSdS))Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =)SOURCESSPECSBUILDRPMSSRPMSrfz%s.speczwriting '%s'sdistbztargztarrrezicon file '%s' does not existz
building RPMsrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz
rpm -q --qf ' z\n' --specfile ''TrzFailed to execute: %sanyrir
rh)4rprintr%r&r'r(rrmkpathrJrKrLrrQget_nameexecuter_make_spec_file
dist_filesreinitialize_commandr formatsrun_commandget_archive_files	copy_filer)r_DistutilsFileErrorrinforr`rextendrr;abspathr9rpopenreadlinestripsplitcloseDistutilsExecErrorreprspawndry_runrRr	move_filebasename)r?spec_dirrpm_dirr	spec_pathsaved_dist_filesrjsource
source_dirrpm_cmd
nvr_stringsrc_rpmnon_src_rpmq_cmdoutbinary_rpms
source_rpmlinelstatus	pyversionsrpmfilenamerEs                        r@runz
bdist_rpm.runs	1/000*dk***,
...-000-000>	(}HKK!!!!GC
(
(W\\$-;;
GAJ''''w'HGLL!*T->-G-G-I-I!IKK	Z**,,.#i/	1	1	1
>	F ,7:))'22>	&$IEMM$IEM!!!'7$((**1-Y'
vz***9	Cw~~di((
Cty*5555(5	ACCC	!!!,	"NN5!!!!

	"NN5!!!!NN5!!!
MDK$?@AAA>	MNNJ)BGOODM,J,JJL
M
M
M~	&NN9%%%:	&NN9%%%y!!!
5
z) :->GG[[[)))-huoo	KJ	
&||~~JJLL&&((""1Q4(((%!"1J	
&YY[[F
P()@4;;)NOOO
P
IIKKKKCIIKKKK

7|	@ 0022
".00		!	#
8w||GG$4jAAtT]3337<<
zBB!,33 )X6888#
@&@@C',,wv<<Cw~~c**@sDM:::#%7<<
020@0@0E0E$G$G)4;;()X>@@@+	@	@
@
@@@s
BQQctj|jtj|S)N)rJrKrLrr)r?rKs  r@
_dist_pathzbdist_rpm._dist_paths*w||DM27+;+;D+A+ABBBrBc	
	d|jzd|jddzd|jzd|jddzdd|jzg}t
jd	}d
d|	D}d}d
}|||}||kr0|
d|
d|zd
z|gd|jr|
dn|
d|d|j
zd|jzddg|js/|js|
dn|
d|jzdD]}t#||}t'|t(r.|
|dd|g||
|d||jdkr/|
d|jz|jr|
d|jz|jr0|
dd|jz|jr:|
d t2j|jz|jr|
d!|dd"|jg|jdt2jt>j d#}d$|z}	|j!rd%|	z}	d&|z}
d'd(d)|	fd*d+|
fd,d-d.d/d0d1g	}|D]\}}
}t#||
}|s|r|dd2|zg|rbtE|5}||#$d
dddn#1swxYwY|
||gd3|j%r0|
d4d|j%z|j&r1|dd5g||j&|S)6Nz
%define name z%define version -_z%define unmangled_version z%define release z	Summary: zrpm --eval %{__os_install_post}
c<g|]}d|zS)z  %s \)r).0rs  r@
<listcomp>z-bdist_rpm._make_spec_file.<locals>.<listcomp>s;!G!G!G%)"+TZZ\\!9!G!G!GrBzbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post )z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s)VendorPackagerProvidesRequires	Conflicts	Obsoletesz: rnUNKNOWNzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionrz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES)r3r*z&%setup -n %{name}-%{unmangled_version}buildr+installr,)cleanr-zrm -rf $RPM_BUILD_ROOT)verifyscriptr.N)prer/N)postr0N)preunr1N)postunr2N%)rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)'rQrsget_versionreplacer#get_description
subprocess	getoutputrL
splitlinesr`r~r get_licenser"r=rRgetattrlowerr]r^get_urlr!r7r)rJrKrr<get_long_descriptionrrMargvr:openreadrr'r()r?	spec_filevendor_hookproblemfixed
fixed_hookfieldvaldef_setup_call	def_buildinstall_cmdscript_optionsrpm_optattrdefaultfs                r@ruzbdist_rpm._make_spec_filesJ	

d/88:::!2!>!>!@!@!H!HS!Q!QQ(4+<+H+H+J+JJ!5!5c#!>!>>$+;;===
	!*+LMMii!G!G-8-C-C-E-E!G!G!GHH/9 ((%88
$$QRRR9JFMNNN	$$$	%	%	%>	MLMMMMKLLL$+77999
"L 	$	%	%	%	B$4466
6  !4555o?AAA	:	:E$

..C#t$$
:  UUUCHHSMMM!BCCCC  UUUCC!8999$$&&)33Wt'8'@'@'B'BBCCC!	H-0FFGGG	<. XXd&9::;
<
<
<9	EX(8(8(C(CCDDD?	+\***2244			$%)KKK0@0@!0M0M0MN/	!	C6BI25CD
N
ni0
(+6?3(*,.

)7	.	.$WdG$%%C
.g
.  'M"$%%%.c?a!(()=)=>>>???????????????$$W---				>	AWsxx'?'??@@@>	-
 
 
 
T^,,,s.;R55R9	<R9	cb	|s|Sg}|dD]t}|}|ddkr|d|g:|ddkr||\|d|zu|ds|d=|S)Nrrrrrz  )rrr~r`)r?r(
new_changelogrs    r@razbdist_rpm._format_changelog0s		
OO%%++D11	2	2D::<<DAw#~~$$b$Z0000aC$$T****$$TD[1111Q	!a rBN)__name__
__module____qualname__descriptionuser_optionsboolean_optionsnegative_optrArTrSrrrurarBr@r
r
s.Kk
k
k
LZ...O%0(;!,..L
+++Z%%%>+)+)+)ZB@B@B@HCCCgggRrBr
)rrMrJdistutils.corerdistutils.debugrdistutils.file_utilrdistutils.errorsdistutils.sysconfigr	distutilsrr
rrBr@<module>rs
""""""!!!!!!******222222uuuuuuuuuurB