whey.additional_files
¶
Parser for the additional-files
option.
Classes:
An abstract command in |
|
|
Exclude a single file, or multiple files with a pattern. |
|
Include a single file, or multiple files with a pattern. |
|
Recursively exclude files in a directory based on patterns. |
|
Recursively include files in a directory based on patterns. |
Functions:
|
Parse a MANIFEST.in-style entry. |
-
class
AdditionalFilesEntry
[source]¶ Bases:
ABC
An abstract command in
additional-files
.Methods:
iter_files
(directory)Returns an iterator over files to be included or excluded by this command.
parse
(parameters)Parse the command’s parameters.
to_dict
()Returns a dictionary representation of the command entry.
-
abstract
iter_files
(directory)[source]¶ Returns an iterator over files to be included or excluded by this command.
-
abstract
-
class
Exclude
(patterns)[source]¶ Bases:
whey.additional_files.AdditionalFilesEntry
Exclude a single file, or multiple files with a pattern.
Methods:
iter_files
(directory)Returns an iterator over files to be excluded by this command.
parse
(parameters)Parse the command’s parameters.
to_dict
()Returns a dictionary representation of the command entry.
Attributes:
Glob patterns (with complete paths from the project root)
-
class
Include
(patterns)[source]¶ Bases:
whey.additional_files.AdditionalFilesEntry
Include a single file, or multiple files with a pattern.
Methods:
iter_files
(directory)Returns an iterator over files to be included by this command.
parse
(parameters)Parse the command’s parameters.
to_dict
()Returns a dictionary representation of the command entry.
Attributes:
Glob patterns (with complete paths from the project root)
-
class
RecursiveExclude
(path, patterns)[source]¶ Bases:
whey.additional_files.AdditionalFilesEntry
Recursively exclude files in a directory based on patterns.
Methods:
iter_files
(directory)Returns an iterator over files to be excluded by this command.
parse
(parameters)Parse the command’s parameters.
to_dict
()Returns a dictionary representation of the command entry.
Attributes:
-
class
RecursiveInclude
(path, patterns)[source]¶ Bases:
whey.additional_files.AdditionalFilesEntry
Recursively include files in a directory based on patterns.
Methods:
iter_files
(directory)Returns an iterator over files to be included by this command.
parse
(parameters)Parse the command’s parameters.
to_dict
()Returns a dictionary representation of the command entry.
Attributes:
-
from_entry
(line)[source]¶ Parse a MANIFEST.in-style entry.
- Parameters
line (
str
)- Return type
- Returns
An
AdditionalFilesEntry
for known commands, orNone
if an unknown command is found in the entry.