Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
pip._vendor.distlib.manifest.Manifest Class Reference
Inheritance diagram for pip._vendor.distlib.manifest.Manifest:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.distlib.manifest.Manifest:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, base=None)
 
 findall (self)
 
 add (self, item)
 
 add_many (self, items)
 
 sorted (self, wantdirs=False)
 
 clear (self)
 
 process_directive (self, directive)
 

Public Attributes

 base
 
 prefix
 
 allfiles
 
 files
 

Protected Member Functions

 _parse_directive (self, directive)
 
 _include_pattern (self, pattern, anchor=True, prefix=None, is_regex=False)
 
 _exclude_pattern (self, pattern, anchor=True, prefix=None, is_regex=False)
 
 _translate_pattern (self, pattern, anchor=True, prefix=None, is_regex=False)
 
 _glob_to_re (self, pattern)
 

Detailed Description

A list of files built by exploring the filesystem and filtered by applying various
patterns to what we find there.

Constructor & Destructor Documentation

◆ __init__()

pip._vendor.distlib.manifest.Manifest.__init__ (   self,
  base = None 
)
Initialise an instance.

:param base: The base directory to explore under.

Member Function Documentation

◆ _exclude_pattern()

pip._vendor.distlib.manifest.Manifest._exclude_pattern (   self,
  pattern,
  anchor = True,
  prefix = None,
  is_regex = False 
)
protected
Remove strings (presumably filenames) from 'files' that match
'pattern'.

Other parameters are the same as for 'include_pattern()', above.
The list 'self.files' is modified in place. Return True if files are
found.

This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
packaging source distributions

◆ _glob_to_re()

pip._vendor.distlib.manifest.Manifest._glob_to_re (   self,
  pattern 
)
protected
Translate a shell-like glob pattern to a regular expression.

Return a string containing the regex.  Differs from
'fnmatch.translate()' in that '*' does not match "special characters"
(which are platform-specific).

◆ _include_pattern()

pip._vendor.distlib.manifest.Manifest._include_pattern (   self,
  pattern,
  anchor = True,
  prefix = None,
  is_regex = False 
)
protected
Select strings (presumably filenames) from 'self.files' that
match 'pattern', a Unix-style wildcard (glob) pattern.

Patterns are not quite the same as implemented by the 'fnmatch'
module: '*' and '?'  match non-special characters, where "special"
is platform-dependent: slash on Unix; colon, slash, and backslash on
DOS/Windows; and colon on Mac OS.

If 'anchor' is true (the default), then the pattern match is more
stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
'anchor' is false, both of these will match.

If 'prefix' is supplied, then only filenames starting with 'prefix'
(itself a pattern) and ending with 'pattern', with anything in between
them, will match.  'anchor' is ignored in this case.

If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
'pattern' is assumed to be either a string containing a regex or a
regex object -- no translation is done, the regex is just compiled
and used as-is.

Selected strings will be added to self.files.

Return True if files are found.

◆ _parse_directive()

pip._vendor.distlib.manifest.Manifest._parse_directive (   self,
  directive 
)
protected
Validate a directive.
:param directive: The directive to validate.
:return: A tuple of action, patterns, thedir, dir_patterns

◆ _translate_pattern()

pip._vendor.distlib.manifest.Manifest._translate_pattern (   self,
  pattern,
  anchor = True,
  prefix = None,
  is_regex = False 
)
protected
Translate a shell-like wildcard pattern to a compiled regular
expression.

Return the compiled regex.  If 'is_regex' true,
then 'pattern' is directly compiled to a regex (if it's a string)
or just returned as-is (assumes it's a regex object).

◆ add()

pip._vendor.distlib.manifest.Manifest.add (   self,
  item 
)
Add a file to the manifest.

:param item: The pathname to add. This can be relative to the base.

◆ add_many()

pip._vendor.distlib.manifest.Manifest.add_many (   self,
  items 
)
Add a list of files to the manifest.

:param items: The pathnames to add. These can be relative to the base.

◆ clear()

pip._vendor.distlib.manifest.Manifest.clear (   self)
Clear all collected files.

◆ findall()

pip._vendor.distlib.manifest.Manifest.findall (   self)
Find all files under the base and set ``allfiles`` to the absolute
pathnames of files found.

◆ process_directive()

pip._vendor.distlib.manifest.Manifest.process_directive (   self,
  directive 
)
Process a directive which either adds some files from ``allfiles`` to
``files``, or removes some files from ``files``.

:param directive: The directive to process. This should be in a format
             compatible with distutils ``MANIFEST.in`` files:

             http://docs.python.org/distutils/sourcedist.html#commands

◆ sorted()

pip._vendor.distlib.manifest.Manifest.sorted (   self,
  wantdirs = False 
)
Return sorted files in directory order

The documentation for this class was generated from the following file: