Wheel (conda_press.wheel)¶
Tools for representing wheels in-memory
-
class
conda_press.wheel.Wheel(distribution, version, build_tag=None, python_tag='py2.py3', abi_tag='none', platform_tag='any')¶ A wheel representation that knows how to write itself out.
- Parameters
- distributionstr
The ‘distribution name’, or the package name, e.g. “numpy”
- versionstr
The version string for the package
- build_tagstr or int, optional
The build number, must start with a digit, See PEP #427
- python_tagstr, optional
The Python version tag, see PEP #425
- abi_tagstr, optional
The Python ABI tag, see PEP #425
- platform_tagstr, optional
The platform tag, see PEP #425
- Attributes
- noarch_pythonbool
Whether the package is a ‘noarch: python’ conda package.
- basedirstr or None,
Location on filesystem where real files exist.
- derived_fromstr
This is a flag representing where this wheel came from. Valid values are:
“none”: wheel object created from nothing
“artifact”: wheel object created from conda artifact
“wheel”: wheel object created from a wheel file.
- component_wheelsdict or None
Mapping of component wheels when merging many wheels into one. This is only non-None valued during the actual merge operation.
- skipped_depsset
A set of dependency names we know that are excluded from the requirements.
- scriptssequence of (filesystem-str, archive-str) tuples or None
This maps filesystem paths to the scripts/filename.ext in the archive. If an entry is a filesystem path, it will be converted to the correct tuple. The filesystem path will be relative to the basedir.
- includessequence of (filesystem-str, archive-str) tuples or None
This maps filesystem paths to the includes/filename.ext in the archive. If an entry is a filesystem path, it will be converted to the correct tuple. The filesystem path will be relative to the basedir.
- filessequence of (filesystem-str, archive-str) tuples or None
This maps filesystem paths to the path/to/filename.ext in the archive. If an entry is a filesystem path, it will be converted to the correct tuple. The filesystem path will be relative to the basedir.
-
clean(self)¶
-
classmethod
from_file(filename)¶ Creates a wheel object from an existing wheel.
-
rewrite_python_shebang(self)¶
-
rewrite_rpaths(self)¶ Rewrite shared library relative (run) paths, as needed
-
rewrite_scripts_linking(self)¶ Write wrapper scripts so that dynamic linkings in the site-packages/lib/ directory will be picked up. These are platform specific.
-
rewrite_scripts_linking_unix(self)¶
-
rewrite_scripts_linking_win(self)¶
-
write(self, include_requirements=True, skip_python=False)¶ Writes out the wheel file to disk.
- Parameters
- include_requirementsbool, optional
Whether or not to include the requirements as part of the wheel metadata. Normally, this should be True.
-
write_entry_points(self)¶
-
write_from_filesystem(self, name)¶
-
write_license_file(self, **kwargs)¶ Writes out license
-
write_license_file_from_artifact(self)¶
-
write_license_file_from_wheel(self, include_requirements=True)¶ Writes license from a wheel
-
write_metadata(self, **kwargs)¶ Writes out metadata
-
write_metadata_from_artifact(self, include_requirements=True, skip_python=False, **kwargs)¶ Writes metadata from a conda artifact
-
write_metadata_from_wheel(self, **kwargs)¶ Writes metadata from a wheel
-
write_record(self)¶
-
write_top_level(self)¶
-
write_unix_script_proxy(self, absname)¶
-
write_wheel_metadata(self)¶
-
write_win_script_proxy(self, proxyname, basename, path_to_exe='Scripts')¶
-
property
compatibility_tag¶
-
property
filename¶
-
property
files¶
-
property
includes¶
-
property
scripts¶
-
conda_press.wheel.dist_escape(distribution)¶ Safely escapes a distribution string
-
conda_press.wheel.distinfo_from_filename(filename)¶ returns a dict of wheel information from a filename
-
conda_press.wheel.fatten_from_seen(seen, output=None, skipped_deps=None)¶ Merges wheels from a dict of seen wheels. Returns a dict mapping the name of the created file to the Wheel.
-
conda_press.wheel.merge(files, output=None, skipped_deps=None)¶ merges wheels together
-
conda_press.wheel.normalize_version(version)¶ Normalizes a version string from conda to PEP-440 style
-
conda_press.wheel.parse_entry_points(wheel_or_file)¶ Returns a list of entry points from a Wheel or an entry_points.txt filename
-
conda_press.wheel.parse_files(wheel_or_file)¶ Returns a list of files from a Wheel or a RECORD filename
-
conda_press.wheel.parse_records(wheel_or_file)¶ Returns a list of record tuples from a Wheel or a RECORD filename
-
conda_press.wheel.record_hash(data)¶
-
conda_press.wheel.urlsafe_b64decode_nopad(data)¶
-
conda_press.wheel.urlsafe_b64encode_nopad(data)¶