AlkantarClanX12

Your IP : 18.226.17.251


Current Path : /opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/bdist_rpm.cpython-33.pyo

�
��f�Tc@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlTddl
mZdd	lmZGd
d�de�ZdS(uwdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).iN(uCommand(uDEBUG(uget_platform(u
write_file(u*(uget_python_version(ulogc+Bs|EeZdZdZdfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�g)Zd3d8d<d1dTgZid3d66d8d:6d<d>6ZdWdX�ZdYdZ�Z	d[d\�Z
d]d^�Zd_d`�Zdadb�Z
dcdd�ZdeS(�u	bdist_rpmucreate an RPM distributionubdist-base=u/base directory for creating built distributionsu	rpm-base=udbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)u	dist-dir=uduDdirectory to put final RPM files in (and .spec files if --spec-only)upython=uMpath to Python interpreter to hard-code in the .spec file (default: "python")u
fix-pythonuLhard-code the exact path to the current Python interpreter in the .spec fileu	spec-onlyuonly regenerate spec fileusource-onlyuonly generate source RPMubinary-onlyuonly generate binary RPMu	use-bzip2u7use bzip2 instead of gzip to create source distributionudistribution-name=ugname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)ugroup=u9package classification [default: "Development/Libraries"]urelease=uRPM release numberuserial=uRPM serial numberuvendor=uaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script]u	packager=uARPM packager (eg. "Jane Doe <jane@example.net>")[default: vendor]u
doc-files=u6list of documentation files (space or comma-separated)u
changelog=u
RPM changeloguicon=uname of icon fileu	provides=u%capabilities provided by this packageu	requires=u%capabilities required by this packageu
conflicts=u-capabilities which conflict with this packageubuild-requires=u+capabilities required to build this packageu
obsoletes=u*capabilities made obsolete by this packageu
no-autorequ+do not automatically calculate dependenciesu	keep-tempuku"don't clean up RPM build directoryuno-keep-tempu&clean up RPM build directory [default]uuse-rpm-opt-flagsu8compile with RPM_OPT_FLAGS when building from source RPMuno-rpm-opt-flagsu&do not pass any RPM CFLAGS to compileru	rpm3-modeu"RPM 3 compatibility mode (default)u	rpm2-modeuRPM 2 compatibility modeuprep-script=u3Specify a script for the PREP phase of RPM buildingu
build-script=u4Specify a script for the BUILD phase of RPM buildingupre-install=u:Specify a script for the pre-INSTALL phase of RPM buildinguinstall-script=u6Specify a script for the INSTALL phase of RPM buildingu
post-install=u;Specify a script for the post-INSTALL phase of RPM buildingupre-uninstall=u<Specify a script for the pre-UNINSTALL phase of RPM buildingupost-uninstall=u=Specify a script for the post-UNINSTALL phase of RPM buildingu
clean-script=u4Specify a script for the CLEAN phase of RPM buildinguverify-script=u6Specify a script for the VERIFY phase of the RPM builduforce-arch=u0Force an architecture onto the RPM build processuquietuqu3Run the INSTALL phase of RPM building in quiet modecCscd|_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(Nii((uNoneu
bdist_baseurpm_baseudist_dirupythonu
fix_pythonu	spec_onlyubinary_onlyusource_onlyu	use_bzip2udistribution_nameugroupureleaseuserialuvendorupackageru	doc_filesu	changeloguiconuprep_scriptubuild_scriptuinstall_scriptuclean_scriptu
verify_scriptupre_installupost_installu
pre_uninstallupost_uninstalluprepuprovidesurequiresu	conflictsubuild_requiresu	obsoletesu	keep_tempuuse_rpm_opt_flagsu	rpm3_modeu
no_autorequ
force_archuquiet(uself((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyuinitialize_options�sN																																						ubdist_rpm.initialize_optionscCs|jdd�|jdkrU|js7td��ntjj|jd�|_n|j	dkr�|j
r|tj|_	q�d|_	n|j
r�td��ntj
dkr�tdtj
��n|jr�|jr�td	��n|jj�sd
|_n|jdd
�|j�dS(Nubdistu
bdist_baseu)you must specify --rpm-base in RPM 2 modeurpmupython3u8--python and --fix-python are mutually exclusive optionsuposixu9don't know how to create RPM distributions on platform %su6cannot supply both '--source-only' and '--binary-only'iudist_dir(u
bdist_baseu
bdist_base(udist_dirudist_dir(uset_undefined_optionsurpm_baseuNoneu	rpm3_modeuDistutilsOptionErroruosupathujoinu
bdist_baseupythonu
fix_pythonusysu
executableunameuDistutilsPlatformErrorubinary_onlyusource_onlyudistributionuhas_ext_modulesuuse_rpm_opt_flagsufinalize_package_data(uself((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyufinalize_options�s.			ubdist_rpm.finalize_optionscCs�|jdd�|jdd|jj�|jj�f�|jd�|jd�t|jt�r�xEdD]:}tj	j
|�ro||jkro|jj|�qoqoWn|jd	d
�|jd�|jd�|jd
�|j|j
�|_
|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�dS(NugroupuDevelopment/Librariesuvendoru%s <%s>upackageru	doc_filesuREADMEu
README.txtureleaseu1userialudistribution_nameu	changeloguiconuprep_scriptubuild_scriptuinstall_scriptuclean_scriptu
verify_scriptupre_installupost_installu
pre_uninstallupost_uninstalluprovidesurequiresu	conflictsubuild_requiresu	obsoletesu
force_arch(uREADMEu
README.txt(u
ensure_stringudistributionuget_contactuget_contact_emailuensure_string_listu
isinstanceu	doc_filesulistuosupathuexistsuappendu_format_changelogu	changeloguensure_filename(uselfureadme((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyufinalize_package_data�s>	


!

















ubdist_rpm.finalize_package_datacCs$trStd�td|j�td|j�td|j�td|j�n|jru|j}|j|�nNi}x;d(D]3}t	j
j|j|�||<|j||�q�W|d}t	j
j|d|j
j��}|jt||j�fd|�|jrdS|j
jdd�}|jd
�}|jrRdg|_ndg|_|jd
�||j
_|j�d}|d}|j||�|jr�t	j
j|j�r�|j|j|�q�td|j��ntjd�dg}	t	j
jd�s%t	j
jd�r1dg}	n|jrJ|	jd�n&|j rc|	jd�n
|	jd�|	j!dd|j"g�|j#r�|	j!ddt	j
j$|j�g�n|j%s�|	jd�n|j&r�|	jd�n|	j|�d}
|
d }d!|
d"}d#|||f}
t	j'|
�}z�g}d}xU|j)�}|scPn|j*�j+�}|j|d$�|dkrM|d}qMqM|j,�}|r�t-d%t.|
���nWd|j,�X|j/|	�|j0s |j
j1�r
t2�}nd&}|j st	j
j|d
|�}|j3||j�t	j
j|j|�}|j
jjd'||f�n|js x�|D]�}t	j
j|d	|�}t	j
j|�r�|j3||j�t	j
j|jt	j
j4|��}|j
jjd'||f�q�q�Wq ndS()Nubefore _get_package_data():uvendor =u
packager =udoc_files =uchangelog =uSOURCESuSPECSuBUILDuRPMSuSRPMSu%s.specuwriting '%s'usdistubztarugztariuicon file '%s' does not existu
building RPMsurpmu/usr/bin/rpmbuildu
/bin/rpmbuildurpmbuildu-bsu-bbu-bau--defineu__python %su
_topdir %su--cleanu--quietu%{name}-%{version}-%{release}u.src.rpmu%{arch}/u.%{arch}.rpmu%rpm -q --qf '%s %s\n' --specfile '%s'iuFailed to execute: %suanyu	bdist_rpm(uSOURCESuSPECSuBUILDuRPMSuSRPMS(5uDEBUGuprintuvendorupackageru	doc_filesu	changelogu	spec_onlyudist_dirumkpathuosupathujoinurpm_baseudistributionuget_nameuexecuteu
write_fileu_make_spec_fileu
dist_filesureinitialize_commandu	use_bzip2uformatsurun_commanduget_archive_filesu	copy_fileuiconuexistsuDistutilsFileErroruloguinfousource_onlyuappendubinary_onlyuextendupythonu	rpm3_modeuabspathu	keep_tempuquietupopenuNoneureadlineustripusplitucloseuDistutilsExecErrorurepruspawnudry_runuhas_ext_modulesuget_python_versionu	move_fileubasename(uselfuspec_dirurpm_dirudu	spec_pathusaved_dist_filesusdistusourceu
source_dirurpm_cmdu
nvr_stringusrc_rpmunon_src_rpmuq_cmduoutubinary_rpmsu
source_rpmulineulustatusu	pyversionusrpmufilenameurpm((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyuruns�
		

			

	
			
		 		


			
u
bdist_rpm.runcCs"tjj|jtjj|��S(N(uosupathujoinudist_dirubasename(uselfupath((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyu
_dist_path�subdist_rpm._dist_pathcCsod|jj�d|jj�jdd�d|jj�d|jjdd�dd|jj�g}tjd	�}d
jdd�|j	�D��}d
}d}|j||�}||kr�|j
d�|j
d|d
�n|jdddg�|jr|j
d�n
|j
d�|jd|jj
�d|jddg�|js|jj�s�|j
d�q�n|j
d|j�x{dJD]s}t||j��}t|t�r�|j
d"|d#j|�f�q�|dKk	r�|j
d"||f�q�q�W|jj�d$krC|j
d%|jj��n|jrc|j
d&|j�n|jr�|j
d'd#j|j��n|jr�|j
d(tjj|j��n|jr�|j
d)�n|jdd*|jj�g�d+|jtjjt j!d,�f}d-|}	|j"r6d.|	}	nd/|}
dLd3d4|	fd5d6|
fdMdNdOdPdQdRg	}x�|D]\}}
}t||
�}|s�|rz|jddD|g�|r�|jt#|dE�j$�j%d
��q�|j
|�qzqzW|jddFdGg�|j&r<|j
dHd#j|j&��n|j'rk|jddIg�|j|j'�n|S(SuiGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        u
%define name u%define version u-u_u%define unmangled_version u%define release uu	Summary: urpm --eval %{__os_install_post}u
cSs g|]}d|j��qS(u  %s \(ustrip(u.0uline((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyu
<listcomp>�s	u-bdist_rpm._make_spec_file.<locals>.<listcomp>ubrp-python-bytecompile \
u%brp-python-bytecompile %{__python} \
u2# Workaround for http://bugs.python.org/issue14443u%define __os_install_post u
Name: %{name}uVersion: %{version}uRelease: %{release}u-Source0: %{name}-%{unmangled_version}.tar.bz2u,Source0: %{name}-%{unmangled_version}.tar.gzu	License: uGroup: u>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootuPrefix: %{_prefix}uBuildArch: noarchu
BuildArch: %suVendoruPackageruProvidesuRequiresu	Conflictsu	Obsoletesu%s: %su uUNKNOWNuUrl: uDistribution: uBuildRequires: uIcon: u
AutoReq: 0u%descriptionu%s %siu%s builduenv CFLAGS="$RPM_OPT_FLAGS" u>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILESuprepuprep_scriptu&%setup -n %{name}-%{unmangled_version}ubuildubuild_scriptuinstalluinstall_scriptucleanuclean_scripturm -rf $RPM_BUILD_ROOTuverifyscriptu
verify_scriptupreupre_installupostupost_installupreunu
pre_uninstallupostunupost_uninstallu%uru%files -f INSTALLED_FILESu%defattr(-,root,root)u%doc u
%changelog(uVendoruPackageruProvidesuRequiresu	Conflictsu	ObsoletesN(uprepuprep_scriptu&%setup -n %{name}-%{unmangled_version}(ucleanuclean_scripturm -rf $RPM_BUILD_ROOT(uverifyscriptu
verify_scriptN(upreupre_installN(upostupost_installN(upreunu
pre_uninstallN(upostunupost_uninstallN((udistributionuget_nameuget_versionureplaceureleaseuget_descriptionu
subprocessu	getoutputujoinu
splitlinesuappenduextendu	use_bzip2uget_licenseugroupu
force_archuhas_ext_modulesugetattruloweru
isinstanceulistuNoneuget_urludistribution_nameubuild_requiresuiconuosupathubasenameu
no_autorequget_long_descriptionupythonusysuargvuuse_rpm_opt_flagsuopenureadusplitu	doc_filesu	changelog(uselfu	spec_fileuvendor_hookuproblemufixedu
fixed_hookufielduvaludef_setup_callu	def_builduinstall_cmduscript_optionsurpm_optuattrudefault((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyu_make_spec_file�s�
	
	


	
#				#	&
	
	(
	 	
ubdist_rpm._make_spec_filecCs�|s
|Sg}x�|j�jd�D]i}|j�}|ddkr^|jd|g�q&|ddkr~|j|�q&|jd|�q&W|ds�|d=n|S(uKFormat the changelog correctly and convert it to a list of strings
        u
iu*uu-u  (ustripusplituextenduappend(uselfu	changelogu
new_changeloguline((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyu_format_changelog3s

ubdist_rpm._format_changelogN(ubdist-base=Nu/base directory for creating built distributions(u	rpm-base=Nudbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)(u	dist-dir=uduDdirectory to put final RPM files in (and .spec files if --spec-only)(upython=NuMpath to Python interpreter to hard-code in the .spec file (default: "python")(u
fix-pythonNuLhard-code the exact path to the current Python interpreter in the .spec file(u	spec-onlyNuonly regenerate spec file(usource-onlyNuonly generate source RPM(ubinary-onlyNuonly generate binary RPM(u	use-bzip2Nu7use bzip2 instead of gzip to create source distribution(udistribution-name=Nugname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)(ugroup=Nu9package classification [default: "Development/Libraries"](urelease=NuRPM release number(userial=NuRPM serial number(uvendor=NuaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script](u	packager=NuARPM packager (eg. "Jane Doe <jane@example.net>")[default: vendor](u
doc-files=Nu6list of documentation files (space or comma-separated)(u
changelog=Nu
RPM changelog(uicon=Nuname of icon file(u	provides=Nu%capabilities provided by this package(u	requires=Nu%capabilities required by this package(u
conflicts=Nu-capabilities which conflict with this package(ubuild-requires=Nu+capabilities required to build this package(u
obsoletes=Nu*capabilities made obsolete by this package(u
no-autoreqNu+do not automatically calculate dependencies(u	keep-tempuku"don't clean up RPM build directory(uno-keep-tempNu&clean up RPM build directory [default](uuse-rpm-opt-flagsNu8compile with RPM_OPT_FLAGS when building from source RPM(uno-rpm-opt-flagsNu&do not pass any RPM CFLAGS to compiler(u	rpm3-modeNu"RPM 3 compatibility mode (default)(u	rpm2-modeNuRPM 2 compatibility mode(uprep-script=Nu3Specify a script for the PREP phase of RPM building(u
build-script=Nu4Specify a script for the BUILD phase of RPM building(upre-install=Nu:Specify a script for the pre-INSTALL phase of RPM building(uinstall-script=Nu6Specify a script for the INSTALL phase of RPM building(u
post-install=Nu;Specify a script for the post-INSTALL phase of RPM building(upre-uninstall=Nu<Specify a script for the pre-UNINSTALL phase of RPM building(upost-uninstall=Nu=Specify a script for the post-UNINSTALL phase of RPM building(u
clean-script=Nu4Specify a script for the CLEAN phase of RPM building(uverify-script=Nu6Specify a script for the VERIFY phase of the RPM build(uforce-arch=Nu0Force an architecture onto the RPM build process(uquietuqu3Run the INSTALL phase of RPM building in quiet mode(u__name__u
__module__u__qualname__udescriptionuNoneuuser_optionsuboolean_optionsunegative_optuinitialize_optionsufinalize_optionsufinalize_package_dataurunu
_dist_pathu_make_spec_fileu_format_changelog(u
__locals__((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyu	bdist_rpms�		

--��u	bdist_rpm(u__doc__u
subprocessusysuosudistutils.coreuCommandudistutils.debuguDEBUGudistutils.utiluget_platformudistutils.file_utilu
write_fileudistutils.errorsudistutils.sysconfiguget_python_versionu	distutilsulogu	bdist_rpm(((u@/opt/alt/python33/lib64/python3.3/distutils/command/bdist_rpm.pyu<module>s$