friendly_dist_manager.package_formats.wheel.wheel_file module¶
Primitives for manipulating Python wheel files
-
class
friendly_dist_manager.package_formats.wheel.wheel_file.
WheelFile
(dist_name, version)[source]¶ Bases:
object
Abstraction around a Python wheel file
References
(Latest Spec) https://packaging.python.org/specifications/binary-distribution-format/
(Accepted PEP) https://www.python.org/dev/peps/pep-0427/
(Proposed PEP) https://www.python.org/dev/peps/pep-0491/
- Parameters
-
add_file
(src_file, target_path)[source]¶ Adds a new file to the package
- Parameters
src_file (pathlib.Path) – reference to the source file to be packaged
target_path (pathlib.Path) – location, relative to the root of the wheel file, where this new file should be deployed
-
build
(output_path)[source]¶ Constructs a wheel file from the metadata stored in this class
- Parameters
output_path (pathlib.Path) – folder where the wheel file should be generated
- Returns
Reference to the newly generated wheel file
- Return type
-
classmethod
from_pyproject
(pyproject_config)[source]¶ Factory method that instantiates an instance of this class from data stored in a pyproject.toml configuration file
- Parameters
pyproject_config (PyProjectParser) – config file for a PEP518 compliant Python package
- Returns
Instance of the class pre-initialized from data provided by the given config file
- Return type
-
property
metadata
¶ properties describing this distribution package
- Type