vsgen.project module¶
This module provides the neccessary defintions to support a base project file defintion.
-
class
vsgen.project.VSGProject(**kwargs)[source]¶ Bases:
objectVSGProject encapsulates the data and logic needed to act as a base project.
Variables: - GUID (uuid) – The GUID of the project; if not provided one is generated automatically.
- FileName (str) – The absolute filename of the project file; if not provided the value is “”
- Name (str) – The display name of the project; if not provide the value is “”.
- WorkingDirectory (str) – The absolute directory that will be the working directory of the project; if not provide the value is “”
- OutputPath (str) – The absolute directory that will be the output directory of the project; if not provide the value is “”.
- RootNamespace (str) – The name of the root namespace of the project; if not provide the value is “”. Ignored.
- ProjectHome (str) – The absolute directory of the project’s source root folder; if not provide the value is “”
- StartupFile (str) – The absolute path to the Startup file; if not provide the value is “”
- CompileFiles (list) – The list of absolute files that will comprise the projects compile group; if not provide the value is [].
- ContentFiles (list) – The list of absolute files that will comprise the projects content group; if not provide the value is [].
- Directories (list) – The list of absolute directories that will comprise the projects directory group; if not provide the value is [].
- DirectoryInFilter (list) – A list of fnmatch expressions to match directories to be included during the item generation step; if not provided the value is [].
- DirectoryExFilter (list) – A list of fnmatch expressions to match directories to be excludes during the item generation step; if not provided the value is [].
- CompileInFilter (list) – A list of fnmatch expressions to match compile files to be included during the item generation step; if not provide the value is [].
- CompileExFilter (list) – A list of fnmatch expressions to match compile files to be excluded during the item generation step; if not provide the value is [].
- ContentInFilter (list) – A list of fnmatch expressions to match content files to be included during the item generation step; if not provide the value is [].
- ContentExFilter (list) – A list of fnmatch expressions to match content files to be excluded during the item generation step; if not provide the value is [].
- VSVersion (float) – The Visual Studio version; if not provide the value is
None.
-
CompileFilesRelative¶ Returns a generator iterating over the each file in
ContentFilesrelative toProjectHomedirectory.
-
ContentFilesRelative¶ Returns a generator iterating over the each file in
ContentFilesrelative toProjectHomedirectory.
-
DirectoriesRelative¶ Returns a generator iterating over the each directory referenced by the project, relative to
ProjectHomedirectory.
-
OutputPathRelative¶ Returns the
OutputPathrelative toProjectHomedirectory.
-
ProjectHomeRelative¶ Returns the
ProjectHomerelative toFileNamedirectory.
-
StartupFileRelative¶ Returns the
StartupFilerelative toProjectHomedirectory.
-
WorkingDirectoryRelative¶ Returns the
WorkingDirectoryrelative toProjectHomedirectory.
-
classmethod
from_section(config, section, **kwargs)[source]¶ Creates a
VSGProjectfrom aConfigParsersection.Parameters: - config (ConfigParser) – A
ConfigParserinstance. - section (str) – A
ConfigParsersection key. - kwargs – List of additional keyworded arguments to be passed into the
VSGProject.
Returns: A valid
VSGProjectinstance if succesful; None otherwise.- config (ConfigParser) – A
-
insert_files(rootpath, directoryInFilter=None, directoryExFilter=None, compileInFilter=None, compileExFilter=None, contentInFilter=None, contentExFilter=None)[source]¶ Inserts files by recursive traversing the rootpath and inserting files according the addition filter parameters.
Parameters: - rootpath (str) – The absolute path to the root directory.
- directoryInFilter (list) – A list of fnmatch expressions to match directories to be included. A None value will default to
DirectoryInFilter. - directoryExFilter (list) – A list of fnmatch expressions to match directories to be excluded. A None value will default to
DirectoryExFilter. - compileInFilter (list) – A list of fnmatch expressions to match compile files to be included. A None value will default to
CompileInFilter. - compileExFilter (list) – A list of fnmatch expressions to match compile files to be excludes. A None value will default to
CompileExFilter. - contentInFilter (list) – A list of fnmatch expressions to match content files to be includes. A None value will default to
ContentInFilter. - contentExFilter (list) – A list of fnmatch expressions to match content files to be excludes. A None value will default to
ContentExFilter.