Your IP : 18.222.180.149
�
o�Rac@sgdZddlZddljZdefd��YZdefd��YZdefd��YZdS( s$Visual Studio project reader/writer.i����NtToolcBs#eZdZdd�Zd�ZRS(sVisual Studio tool.cCs |p i|_||jd<dS(soInitializes the tool.
Args:
name: Tool name.
attrs: Dict of tool attributes; may be None.
tNameN(t_attrs(tselftnametattrs((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyt__init__scCs
d|jgS(s]Creates an element for the tool.
Returns:
A new xml.dom.Element for the tool.
R(R(R((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyt_GetSpecificationsN(t__name__t
__module__t__doc__tNoneRR(((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyR
s
tFiltercBseZdZdd�ZRS(s1Visual Studio filter - that is, a virtual folder.cCs"||_t|pg�|_dS(s�Initializes the folder.
Args:
name: Filter (folder) name.
contents: List of filenames and/or Filter objects contained.
N(Rtlisttcontents(RRR((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyR%s N(RR R
RR(((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyR"stWritercBsheZdZd d d�Zd�Zd�Zd d d�Zd�Zd�Z d d d�Z
d�ZRS(
s!Visual Studio XML project writer.cCs�||_||_||_||_|s6dg}ndg|_x+|D]#}|jjdi|d6g�qIWdg|_dg|_dg|_t �|_
dS( sInitializes the project.
Args:
project_path: Path to the project file.
version: Format version to emit.
name: Name of the project.
guid: GUID to use for project, if not None.
platforms: Array of string, the supported platforms. If null, ['Win32']
tWin32t PlatformstPlatformRt ToolFilestConfigurationstFilesN(tproject_pathtversionRtguidtplatform_sectiontappendttool_files_sectiontconfigurations_sectiont
files_sectiontdictt
files_dict(RRRRRt platformstplatform((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyR6s
!cCs!|jjdi|d6g�dS(seAdds a tool file to the project.
Args:
path: Relative path from project to tool file.
tToolFiletRelativePathN(RR(Rtpath((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pytAddToolFileTscCs�|si}n|sg}n|j�}||d<||g}|r�xO|D]D}t|t�rx|j|j��qM|jt|�j��qMWn|S(s Returns the specification for a configuration.
Args:
config_type: Type of configuration node.
config_name: Configuration name.
attrs: Dict of configuration attributes; may be None.
tools: List of tools (strings or Tool objects); may be None.
Returns:
R(tcopyt
isinstanceRRR(Rtconfig_typetconfig_nameRttoolst
node_attrst
specificationtt((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyt_GetSpecForConfiguration\s
cCs,|jd|||�}|jj|�dS(s�Adds a configuration to the project.
Args:
name: Configuration name.
attrs: Dict of configuration attributes; may be None.
tools: List of tools (strings or Tool objects); may be None.
t
ConfigurationN(R.RR(RRRR*tspec((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyt AddConfig{scCs}xv|D]n}t|t�rHdi|jd6g}|j||j�n di|d6g}||j|<|j|�qWdS(s�Adds files and/or filters to the parent node.
Args:
parent: Destination node
files: A list of Filter objects and/or relative paths to files.
Will call itself recursively, if the files list contains Filter objects.
RRtFileR#N(R'RRt_AddFilesToNodeRRR(Rtparenttfilestftnode((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyR3�s
cCs|j|j|�dS(sKAdds files to the project.
Args:
files: A list of Filter objects and/or relative paths to files.
This makes a copy of the file/filter tree at the time of this call. If you
later add files to a Filter object which was passed into a previous call
to AddFiles(), it will not be reflected in this project.
N(R3R(RR5((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pytAddFiles�s
cCsT|jj|�}|s+td|��n|jd|||�}|j|�dS(s\Adds a configuration to a file.
Args:
path: Relative path to the file.
config: Name of configuration to add.
attrs: Dict of configuration attributes; may be None.
tools: List of tools (strings or Tool objects); may be None.
Raises:
ValueError: Relative path does not match any file added via AddFiles().
s(AddFileConfig: file "%s" not in project.tFileConfigurationN(Rtgett
ValueErrorR.R(RR$tconfigRR*R4R0((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyt
AddFileConfig�s
cCs�didd6|jj�d6|jd6|jd6|jd6dd 6|j|j|jd
g|jdgg}tj ||j
dd
�dS(sWrites the project file.tVisualStudioProjects
Visual C++tProjectTypetVersionRtProjectGUIDt
RootNamespacet Win32ProjtKeywordt
ReferencestGlobalstencodingsWindows-1252N(RtProjectVersionRRRRRRteasy_xmltWriteXmlIfChangedR(Rtcontent((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pytWriteIfChanged�s
N(RR R
RRR%R.R1R3R8R=RL(((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyR3s ( R
t
gyp.commontgyptgyp.easy_xmlRItobjectRRR(((sm/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSProject.pyt<module>s
?>