Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/javapackages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/javapackages/depmap.pyc
�
#
yRc@s~ddlZddlZddlmZddlmZdefd��YZdefd��YZ	de
fd	��YZdS(
i����N(t
fromstring(tArtifacttDepmapLoadingExceptioncBseZRS((t__name__t
__module__(((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pyR'stDepmapInvalidExceptioncBseZRS((RR(((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pyR*stDepmapcBs_eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
s�
    Class for working with depmap files (dependency maps). These are files used
    by XMvn to provide mapping between Maven artifacts and file on the
    filesystem.

    Example usage:
    >>> d = Depmap('maven-idea-plugin.xml')
    >>> print d.get_java_requires()
    1.5
    >>> print d.get_provided_artifacts()[0]
    org.apache.maven.plugins:maven-idea-plugin:None:None:2.2
    cCsk||_|j|�|jdkr@tdjd|���n|j�sgtdjd|���ndS(Ns1Failed to load fragment {path} You have a problemtpaths6Depmap {path} does not contain any provided artifacts (t
_Depmap__patht_Depmap__load_depmapt_Depmap__doctNoneRtformattget_provided_mappings(tselfR((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pyt__init__;s	
c	Cs�t|��w}y4tjtjj|�dd|�}|j�}Wn*tk
ro|jd�|j�}nXt	|�|_
WdQXdS(Ntrbtfileobji(topentgziptGzipFiletosRtbasenametreadtIOErrortseekRR
(Rt
fragment_pathtftgzftdata((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pyt
__load_depmapCs	

cCsF|j�}x!|D]\}}|jrtSqW|jjd�dk	S(snReturn true if depmap is for compatibility package

         This means package should have versioned providess.//skipProvidesN(R
tversiontTrueR
tfindR(Rt
provided_mapstmtl((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pyt	is_compatRs
	cCs�g}x�|jjd�D]}}|jd�}t|�dkrOtd��ntj|d�}|js�tdjd|j���n|j	|�qW|S(s2Returns list of Artifact provided by given depmap.s
.//dependencys./mavenis"Multiple maven nodes in dependencyis5Depmap {path} does not have version in maven providesR(
R
tfindalltlenRRtfrom_xml_elementRRRtappend(Rt	artifactstdeptartifact((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pytget_provided_artifacts]s	cCs�g}x�|jjd�D]�}|jd�}t|�dkrOtd��ntj|d�}|js�tdjd|j���n|jd�}t|�dkr�td	��ntj|d�}|j	||f�qW|S(
s�Return list of (Artifact, Artifact) tuples.

        First part of returned tuple is Maven artifact identification
        Second part of returned tuple is local artifact identification
        s
.//dependencys./mavenis"Multiple maven nodes in dependencyis5Depmap {path} does not have version in maven providesRs./jpps Multiple jpp nodes in dependency(
R
R&R'RRR(RRRR)(RtmappingsR+t
m_artifactt
l_artifact((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pyR
js	cCsCg}x6|jjd�D]"}tj|�}|j|�qW|S(s2Returns list of Artifact required by given depmap.s.//autoRequires(R
R&RR(R)(RR*R+R,((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pytget_required_artifactss
cCsCg}x6|jjd�D]"}tj|�}|j|�qW|S(s:Returns list of Artifact that were build but not installeds.//skippedArtifact(R
R&RR(R)(RR*R+R,((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pytget_skipped_artifacts�s
cCs.|jjd�}|dk	r*|j}n|S(s.Returns JVM version required by depmap or Nones.//requiresJavaN(R
R!Rttext(Rtjreq((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pytget_java_requires�scCs.|jjd�}|dk	r*|j}n|S(s:Returns JVM development version required by depmap or Nones.//requiresJavaDevelN(R
R!RR3(RR4((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pytget_java_devel_requires�s(RRt__doc__RR	R%R-R
R1R2R5R6(((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pyR-s				
				(Rtos.pathRt
lxml.etreeRtjavapackages.artifactRt	ExceptionRRtobjectR(((s7/usr/lib/python2.7/site-packages/javapackages/depmap.pyt<module> s

ZeroDay Forums Mini