MINI MINI MANI MO

Path : /usr/lib64/python3.6/distutils/command/__pycache__/
File Upload :
Current File : //usr/lib64/python3.6/distutils/command/__pycache__/bdist_rpm.cpython-36.opt-2.pyc

3


 \T@s|ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlTddlm
Z
ddlmZGd	d
d
eZdS)N)Command)DEBUG)get_platform)
write_file)*)get_python_version)logc+@seZdZdZdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddddddddddddddddg)Zd4d9d=d2dUgZd4d9d=dXZdYdZZd[d\Zd]d^Z	d_d`Z
dadbZdcddZdedfZ
dS)	bdist_rpmzcreate an RPM distributionbdist-base=N/base directory for creating built distributions	rpm-base=dbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)	dist-dir=dDdirectory to put final RPM files in (and .spec files if --spec-only)python=Mpath to Python interpreter to hard-code in the .spec file (default: "python")
fix-pythonLhard-code the exact path to the current Python interpreter in the .spec file	spec-onlyonly regenerate spec filesource-onlyonly generate source RPMbinary-onlyonly generate binary RPM	use-bzip27use bzip2 instead of gzip to create source distributiondistribution-name=gname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)group=9package classification [default: "Development/Libraries"]release=RPM release numberserial=RPM serial numbervendor=aRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script]	packager=BRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor]
doc-files=6list of documentation files (space or comma-separated)
changelog=
RPM changelogicon=name of icon file	provides=%capabilities provided by this package	requires=%capabilities required by this package
conflicts=-capabilities which conflict with this packagebuild-requires=+capabilities required to build this package
obsoletes=*capabilities made obsolete by this package
no-autoreq+do not automatically calculate dependencies	keep-tempk"don't clean up RPM build directoryno-keep-temp&clean up RPM build directory [default]use-rpm-opt-flags8compile with RPM_OPT_FLAGS when building from source RPMno-rpm-opt-flags&do not pass any RPM CFLAGS to compiler	rpm3-mode"RPM 3 compatibility mode (default)	rpm2-modeRPM 2 compatibility modeprep-script=3Specify a script for the PREP phase of RPM building
build-script=4Specify a script for the BUILD phase of RPM buildingpre-install=:Specify a script for the pre-INSTALL phase of RPM buildinginstall-script=6Specify a script for the INSTALL phase of RPM building
post-install=;Specify a script for the post-INSTALL phase of RPM buildingpre-uninstall=<Specify a script for the pre-UNINSTALL phase of RPM buildingpost-uninstall==Specify a script for the post-UNINSTALL phase of RPM building
clean-script=4Specify a script for the CLEAN phase of RPM buildingverify-script=6Specify a script for the VERIFY phase of the RPM buildforce-arch=0Force an architecture onto the RPM build processquietq3Run the INSTALL phase of RPM building in quiet mode)zno-keep-tempzno-rpm-opt-flagsz	rpm2-modecCsd|_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_archr\)selfr3/usr/lib64/python3.6/distutils/command/bdist_rpm.pyinitialize_optionssNzbdist_rpm.initialize_optionscCs|jdd|jdkr6|js$tdtjj|jd|_|jdkrX|j	rPt
j|_qfd|_n|j	rftdtjdkr~t
dtj|jr|jrtd	|jjsd
|_|jdd
|jdS)NZbdistr`z)you must specify --rpm-base in RPM 2 moderpmZpython3z8--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'rrb)r`r`)rbrb)Zset_undefined_optionsrarZDistutilsOptionErrorospathjoinr`rcrdsys
executablenameZDistutilsPlatformErrorrfrgdistributionhas_ext_modulesrfinalize_package_data)rrrrfinalize_optionss.





zbdist_rpm.finalize_optionscCsX|jdd|jdd|jj|jjf|jd|jdt|jtr|x.dD]&}tj	j
|rR||jkrR|jj|qRW|jd	d
|jd|jd|jd
|j|j
|_
|jd|jd|jd|jd|jd|jd|jd|jd|jd|jd|jd|jd|jd|jd|jd|jddS)NrjzDevelopment/Librariesrmz%s <%s>rnroREADME
README.txtrk1rlrirprqrrrsrtrurvrwrxryrzr|r}r~rrr)rr)Z
ensure_stringrZget_contactZget_contact_emailZensure_string_list
isinstancerolistrrexistsappend_format_changelogrpZensure_filename)rZreadmerrrrs>





















zbdist_rpm.finalize_package_datac
Cstr<tdtd|jtd|jtd|jtd|j|jrT|j}|j|n<i}x.d(D]&}t	j
j|j|||<|j||q^W|d}t	j
j|d|j
j}|jt||jfd||jrdS|j
jdd}|jd
}|jrdg|_ndg|_|jd
||j
_|jd}|d}|j|||jrht	j
j|jrZ|j|j|ntd|jtjddg}	t	j
jdst	j
jdrdg}	|jr|	jdn|j r|	jdn
|	jd|	j!dd|j"g|j#r|	j!ddt	j
j$|jg|j%s|	jd|j&r(|	jd|	j|d}
|
d }d!|
d"}d#|||f}
t	j'|
}zng}d}xB|j(}|s~P|j)j*}|j|d$|dkrn|d}qnW|j+}|rt,d%t-|
Wd|j+X|j.|	|j/s|j
j0rt1}nd&}|j sRt	j
j|d
|}|j2||jt	j
j|j|}|j
jjd'||f|jsxh|D]`}t	j
j|d	|}t	j
j|r`|j2||jt	j
j|jt	j
j3|}|j
jjd'||fq`WdS))Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =SOURCESSPECSBUILDRPMSSRPMSz%s.speczwriting '%s'sdistZbztarZgztarrzicon file '%s' does not existz
building RPMsrz/usr/bin/rpmbuildz
/bin/rpmbuildZrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '%s %s\n' --specfile '%s'r_zFailed to execute: %sanyr	)rrrrr)4rprintrmrnrorprerbZmkpathrrrrarget_nameZexecuter_make_spec_fileZ
dist_filesZreinitialize_commandrhZformatsZrun_commandZget_archive_filesZ	copy_filerqrZDistutilsFileErrorrinforgrrfextendrcrabspathrr\popenreadlinestripsplitcloseZDistutilsExecErrorreprZspawnZdry_runrrZ	move_filebasename)rZspec_dirZrpm_dirrZ	spec_pathZsaved_dist_filesrsourceZ
source_dirZrpm_cmdZ
nvr_stringZsrc_rpmZnon_src_rpmZq_cmdoutZbinary_rpmsZ
source_rpmlinelZstatusZ	pyversionZsrpmfilenamerrrrruns















z
bdist_rpm.runcCstjj|jtjj|S)N)rrrrbr)rrrrr
_dist_pathszbdist_rpm._dist_pathcCsDd|jjd|jjjddd|jjd|jjdddd|jjg}tjd	}d
jdd|j	D}d
}d}|j||}||kr|j
d|j
d|d
|jdddg|jr|j
dn
|j
d|jd|jj
d|jddg|js|jjs&|j
dn|j
d|jx^dJD]V}t||j}t|trd|j
d"|d#j|fn|dk	r,|j
d"||fq,W|jjd$kr|j
d%|jj|jr|j
d&|j|jr|j
d'd#j|j|jr|j
d(tjj|j|jr|j
d)|jdd*|jjgd+|jtjjtj d,f}d-|}	|j!r\d.|	}	d/|}
dKd3d4|	fd5d6|
fdLdMdNdOdPdQg	}xh|D]`\}}
}t||
}|s|r|jddD|g|r|jt"|dEj#j$d
n
|j
|qW|jddFdGg|j%r|j
dHd#j|j%|j&r@|jddIg|j|j&|S)RNz
%define name z%define version -_z%define unmangled_version z%define release z	Summary: zrpm --eval %{__os_install_post}
cSsg|]}d|jqS)z  %s \)r).0rrrr
<listcomp>sz-bdist_rpm._make_spec_file.<locals>.<listcomp>zbrp-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: %sVendorPackagerProvidesRequires	Conflicts	Obsoletesz%s: %s ZUNKNOWNzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz%s %srz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILESr{rr&%setup -n %{name}-%{unmangled_version}ZbuildrsZinstallrtcleanrurm -rf $RPM_BUILD_ROOTverifyscriptrvprerwpostrxpreunrypostunrz%rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)rrrrrr)r{rrr)rrur)rrvN)rrwN)rrxN)rryN)rrzN)'rrZget_versionreplacerkZget_description
subprocessZ	getoutputr
splitlinesrrrhZget_licenserjrrgetattrlowerrrZget_urlrirrqrrrrZget_long_descriptionrcrargvropenreadrrorp)rZ	spec_fileZvendor_hookZproblemZfixedZ
fixed_hookZfieldvalZdef_setup_callZ	def_buildZinstall_cmdZscript_optionsZrpm_optattrdefaultrrrrs


	



zbdist_rpm._make_spec_filecCs|s|Sg}x`|jjdD]N}|j}|ddkrD|jd|gq|ddkr\|j|q|jd|qW|ds||d=|S)Nrrrrrz  )rrrr)rrpZ
new_changelogrrrrr3szbdist_rpm._format_changelog)r
Nr)rNr
)rrr)rNr)rNr)rNr)rNr)rNr)rNr)rNr)rNr )r!Nr")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+Nr,)r-Nr.)r/Nr0)r1Nr2)r3Nr4)r5Nr6)r7Nr8)r9Nr:)r;r<r=)r>Nr?)r@NrA)rBNrC)rDNrE)rFNrG)rHNrI)rJNrK)rLNrM)rNNrO)rPNrQ)rRNrS)rTNrU)rVNrW)rXNrY)rZNr[)r\r]r^)__name__
__module____qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrrrrrrrrrrrr	s--)r	)rrrZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	rrrr<module>s

OHA YOOOO