pub struct StandaloneDistribution {
Show 27 fields pub base_dir: PathBuf, pub target_triple: String, pub python_implementation: String, pub python_tag: String, pub python_abi_tag: Option<String>, pub python_platform_tag: String, pub version: String, pub python_exe: PathBuf, pub stdlib_path: PathBuf, pub python_symbol_visibility: String, pub core_license: Option<LicensedComponent>, pub licenses: Option<Vec<String>>, pub license_path: Option<PathBuf>, pub objs_core: BTreeMap<PathBuf, PathBuf>, pub links_core: Vec<LibraryDependency>, pub libpython_shared_library: Option<PathBuf>, pub extension_modules: BTreeMap<String, PythonExtensionModuleVariants>, pub frozen_c: Vec<u8>, pub includes: BTreeMap<String, PathBuf>, pub libraries: BTreeMap<String, PathBuf>, pub py_modules: BTreeMap<String, PathBuf>, pub resources: BTreeMap<String, BTreeMap<String, PathBuf>>, pub venv_base: PathBuf, pub inittab_object: PathBuf, pub inittab_cflags: Vec<String>, pub cache_tag: String, pub crt_features: Vec<String>, /* private fields */
}
Expand description

Represents a standalone Python distribution.

This is a Python distributed produced by the python-build-standalone project. It is derived from a tarball containing a PYTHON.json file describing the distribution.

Fields§

§base_dir: PathBuf

Directory where distribution lives in the filesystem.

§target_triple: String

Rust target triple that this distribution runs on.

§python_implementation: String

Python implementation name.

§python_tag: String

PEP 425 Python tag value.

§python_abi_tag: Option<String>

PEP 425 Python ABI tag.

§python_platform_tag: String

PEP 425 Python platform tag.

§version: String

Python version string.

§python_exe: PathBuf

Path to Python interpreter executable.

§stdlib_path: PathBuf

Path to Python standard library.

§python_symbol_visibility: String

Symbol visibility for Python symbols.

§core_license: Option<LicensedComponent>

Holds license information for the core distribution.

§licenses: Option<Vec<String>>

SPDX license shortnames that apply to this distribution.

Licenses only cover the core distribution. Licenses for libraries required by extensions are stored next to the extension’s linking info.

§license_path: Option<PathBuf>

Path to file holding license text for this distribution.

§objs_core: BTreeMap<PathBuf, PathBuf>

Object files providing the core Python implementation.

Keys are relative paths. Values are filesystem paths.

§links_core: Vec<LibraryDependency>

Linking information for the core Python implementation.

§libpython_shared_library: Option<PathBuf>

Filesystem location of pythonXY shared library for this distribution.

Only set if link_mode is StandaloneDistributionLinkMode::Dynamic.

§extension_modules: BTreeMap<String, PythonExtensionModuleVariants>

Extension modules available to this distribution.

§frozen_c: Vec<u8>§includes: BTreeMap<String, PathBuf>

Include files for Python.

Keys are relative paths. Values are filesystem paths.

§libraries: BTreeMap<String, PathBuf>

Static libraries available for linking.

Keys are library names, without the “lib” prefix or file extension. Values are filesystem paths where library is located.

§py_modules: BTreeMap<String, PathBuf>§resources: BTreeMap<String, BTreeMap<String, PathBuf>>

Non-module Python resource files.

Keys are package names. Values are maps of resource name to data for the resource within that package.

§venv_base: PathBuf

Path to copy of hacked dist to use for packaging rules venvs

§inittab_object: PathBuf

Path to object file defining _PyImport_Inittab.

§inittab_cflags: Vec<String>

Compiler flags to use to build object containing _PyImport_Inittab.

§cache_tag: String

Tag to apply to bytecode files.

e.g. cpython-39.

§crt_features: Vec<String>

List of strings denoting C Runtime requirements.

Implementations§

Create an instance from a .tar.zst file.

The distribution will be extracted to extract_dir if necessary.

Extract and analyze a standalone distribution from a zstd compressed tar stream.

Extract and analyze a standalone distribution from a tar stream.

Obtain an instance by scanning a directory containing an extracted distribution.

Determines support for building a libpython from this distribution.

Returns a tuple of bools indicating whether this distribution can build a static libpython and a dynamically linked libpython.

Whether the distribution is capable of loading filed-based Python extension modules.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Ensure pip is available to run in the distribution.

Determines whether dynamically linked extension modules can be loaded from memory.

Clone self into a Box’ed trait object.
The Rust machine triple this distribution runs on.
Rust target triples on which this distribution’s binaries can run. Read more
Obtain the filesystem path to a python executable for this distribution.
Obtain the full Python version string.
Obtain the X.Y Python version component. e.g. 3.7.
Obtain the full Python implementation name. e.g. cpython.
Obtain the short Python implementation name. e.g. cp
Obtain the PEP 425 Python tag. e.g. cp38.
Obtain the PEP 425 Python ABI tag. e.g. cp38d.
Obtain the Python platform tag.
Obtain the Python platform tag used to indicate compatibility. Read more
Obtain the cache tag to apply to Python bytecode modules.
Obtain file suffixes for various Python module flavors.
Python configuration variables.
Obtain Python packages in the standard library that provide tests.
Obtain Apple SDK settings for this distribution.
Create a PythonBytecodeCompiler from this instance.
Construct a PythonPackagingPolicy derived from this instance.
Construct an EmbeddedPythonConfig derived from this instance.
Obtain a PythonBinaryBuilder for constructing an executable embedding Python. Read more
Obtain PythonResource instances for every resource in this distribution.
Resolve a distutils installation used for building Python packages. Read more
Obtain support files for tcl/tk. Read more
The name of the directory to use for TCL_LIBRARY
Determine whether a named module is in a known standard library test package.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted.
Causes self to use its LowerExp implementation when Debug-formatted.
Causes self to use its LowerHex implementation when Debug-formatted.
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted.
Causes self to use its UpperExp implementation when Debug-formatted.
Causes self to use its UpperHex implementation when Debug-formatted.
Formats each item in a sequence. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more