Struct pyoxidizerlib::py_packaging::standalone_distribution::StandaloneDistribution [−][src]
pub struct StandaloneDistribution {}Show 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, FileData>, 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>, // some fields omitted
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.
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, FileData>
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
impl StandaloneDistribution
[src]
impl StandaloneDistribution
[src]pub fn from_location(
logger: &Logger,
location: &PythonDistributionLocation,
distributions_dir: &Path
) -> Result<Self>
[src]
logger: &Logger,
location: &PythonDistributionLocation,
distributions_dir: &Path
) -> Result<Self>
pub fn from_tar_zst_file(
logger: &Logger,
path: &Path,
extract_dir: &Path
) -> Result<Self>
[src]
pub fn from_tar_zst_file(
logger: &Logger,
path: &Path,
extract_dir: &Path
) -> Result<Self>
[src]Create an instance from a .tar.zst file.
The distribution will be extracted to extract_dir
if necessary.
pub fn from_tar_zst<R: Read>(source: R, extract_dir: &Path) -> Result<Self>
[src]
pub fn from_tar_zst<R: Read>(source: R, extract_dir: &Path) -> Result<Self>
[src]Extract and analyze a standalone distribution from a zstd compressed tar stream.
pub fn from_tar<R: Read>(source: R, extract_dir: &Path) -> Result<Self>
[src]
pub fn from_tar<R: Read>(source: R, extract_dir: &Path) -> Result<Self>
[src]Extract and analyze a standalone distribution from a tar stream.
pub fn from_directory(dist_dir: &Path) -> Result<Self>
[src]
pub fn from_directory(dist_dir: &Path) -> Result<Self>
[src]Obtain an instance by scanning a directory containing an extracted distribution.
pub fn libpython_link_support(&self) -> (bool, bool)
[src]
pub fn libpython_link_support(&self) -> (bool, bool)
[src]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.
pub fn create_hacked_base(&self, logger: &Logger) -> PythonPaths
[src]
pub fn create_hacked_base(&self, logger: &Logger) -> PythonPaths
[src]Duplicate the python distribution, with distutils hacked
pub fn create_venv(&self, logger: &Logger, path: &Path) -> PythonPaths
[src]
pub fn create_venv(&self, logger: &Logger, path: &Path) -> PythonPaths
[src]Create a venv from the distribution at path.
pub fn prepare_venv(
&self,
logger: &Logger,
venv_dir_path: &Path
) -> Result<(PythonPaths, HashMap<String, String>)>
[src]
pub fn prepare_venv(
&self,
logger: &Logger,
venv_dir_path: &Path
) -> Result<(PythonPaths, HashMap<String, String>)>
[src]Create or re-use an existing venv
pub fn is_extension_module_file_loadable(&self) -> bool
[src]
pub fn is_extension_module_file_loadable(&self) -> bool
[src]Whether the distribution is capable of loading filed-based Python extension modules.
Trait Implementations
impl Clone for StandaloneDistribution
[src]
impl Clone for StandaloneDistribution
[src]fn clone(&self) -> StandaloneDistribution
[src]
fn clone(&self) -> StandaloneDistribution
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for StandaloneDistribution
[src]
impl Debug for StandaloneDistribution
[src]impl PythonDistribution for StandaloneDistribution
[src]
impl PythonDistribution for StandaloneDistribution
[src]fn ensure_pip(&self, logger: &Logger) -> Result<PathBuf>
[src]
fn ensure_pip(&self, logger: &Logger) -> Result<PathBuf>
[src]Ensure pip is available to run in the distribution.
fn supports_in_memory_shared_library_loading(&self) -> bool
[src]
fn supports_in_memory_shared_library_loading(&self) -> bool
[src]Determines whether dynamically linked extension modules can be loaded from memory.
fn clone_trait(&self) -> Arc<dyn PythonDistribution>
[src]
fn clone_trait(&self) -> Arc<dyn PythonDistribution>
[src]Clone self into a Box’ed trait object.
fn target_triple(&self) -> &str
[src]
fn target_triple(&self) -> &str
[src]The Rust machine triple this distribution runs on.
fn compatible_host_triples(&self) -> Vec<String>
[src]
fn compatible_host_triples(&self) -> Vec<String>
[src]Rust target triples on which this distribution’s binaries can run. Read more
fn python_exe_path(&self) -> &Path
[src]
fn python_exe_path(&self) -> &Path
[src]Obtain the filesystem path to a python
executable for this distribution.
fn python_version(&self) -> &str
[src]
fn python_version(&self) -> &str
[src]Obtain the full Python version string.
fn python_major_minor_version(&self) -> String
[src]
fn python_major_minor_version(&self) -> String
[src]Obtain the X.Y Python version component. e.g. 3.7
.
fn python_implementation(&self) -> &str
[src]
fn python_implementation(&self) -> &str
[src]Obtain the full Python implementation name. e.g. cpython
.
fn python_implementation_short(&self) -> &str
[src]
fn python_implementation_short(&self) -> &str
[src]Obtain the short Python implementation name. e.g. cp
fn python_tag(&self) -> &str
[src]
fn python_tag(&self) -> &str
[src]Obtain the PEP 425 Python tag. e.g. cp38
.
fn python_abi_tag(&self) -> Option<&str>
[src]
fn python_abi_tag(&self) -> Option<&str>
[src]Obtain the PEP 425 Python ABI tag. e.g. cp38d
.
fn python_platform_tag(&self) -> &str
[src]
fn python_platform_tag(&self) -> &str
[src]Obtain the Python platform tag.
fn python_platform_compatibility_tag(&self) -> &str
[src]
fn python_platform_compatibility_tag(&self) -> &str
[src]Obtain the Python platform tag used to indicate compatibility. Read more
fn python_module_suffixes(&self) -> Result<PythonModuleSuffixes>
[src]
fn python_module_suffixes(&self) -> Result<PythonModuleSuffixes>
[src]Obtain file suffixes for various Python module flavors.
fn stdlib_test_packages(&self) -> Vec<String>
[src]
fn stdlib_test_packages(&self) -> Vec<String>
[src]Obtain Python packages in the standard library that provide tests.
fn apple_sdk_info(&self) -> Option<&AppleSdkInfo>
[src]
fn apple_sdk_info(&self) -> Option<&AppleSdkInfo>
[src]Obtain Apple SDK settings for this distribution.
fn create_bytecode_compiler(&self) -> Result<Box<dyn PythonBytecodeCompiler>>
[src]
fn create_bytecode_compiler(&self) -> Result<Box<dyn PythonBytecodeCompiler>>
[src]Create a PythonBytecodeCompiler
from this instance.
fn create_packaging_policy(&self) -> Result<PythonPackagingPolicy>
[src]
fn create_packaging_policy(&self) -> Result<PythonPackagingPolicy>
[src]Construct a PythonPackagingPolicy
derived from this instance.
fn create_python_interpreter_config(
&self
) -> Result<PyembedPythonInterpreterConfig>
[src]
fn create_python_interpreter_config(
&self
) -> Result<PyembedPythonInterpreterConfig>
[src]Construct an EmbeddedPythonConfig
derived from this instance.
fn as_python_executable_builder(
&self,
_logger: &Logger,
host_triple: &str,
target_triple: &str,
name: &str,
libpython_link_mode: BinaryLibpythonLinkMode,
policy: &PythonPackagingPolicy,
config: &PyembedPythonInterpreterConfig,
host_distribution: Option<Arc<dyn PythonDistribution>>
) -> Result<Box<dyn PythonBinaryBuilder>>
[src]
fn as_python_executable_builder(
&self,
_logger: &Logger,
host_triple: &str,
target_triple: &str,
name: &str,
libpython_link_mode: BinaryLibpythonLinkMode,
policy: &PythonPackagingPolicy,
config: &PyembedPythonInterpreterConfig,
host_distribution: Option<Arc<dyn PythonDistribution>>
) -> Result<Box<dyn PythonBinaryBuilder>>
[src]Obtain a PythonBinaryBuilder
for constructing an executable embedding Python. Read more
fn python_resources<'a>(&self) -> Vec<PythonResource<'a>>
[src]
fn python_resources<'a>(&self) -> Vec<PythonResource<'a>>
[src]Obtain PythonResource
instances for every resource in this distribution.
fn resolve_distutils(
&self,
logger: &Logger,
libpython_link_mode: LibpythonLinkMode,
dest_dir: &Path,
extra_python_paths: &[&Path]
) -> Result<HashMap<String, String>>
[src]
fn resolve_distutils(
&self,
logger: &Logger,
libpython_link_mode: LibpythonLinkMode,
dest_dir: &Path,
extra_python_paths: &[&Path]
) -> Result<HashMap<String, String>>
[src]Resolve a distutils
installation used for building Python packages. Read more
fn tcl_files(&self) -> Result<Vec<(PathBuf, FileData)>>
[src]
fn tcl_files(&self) -> Result<Vec<(PathBuf, FileData)>>
[src]Obtain support files for tcl/tk. Read more
fn tcl_library_path_directory(&self) -> Option<String>
[src]
fn tcl_library_path_directory(&self) -> Option<String>
[src]The name of the directory to use for TCL_LIBRARY
fn is_stdlib_test_package(&self, name: &str) -> bool
[src]
fn is_stdlib_test_package(&self, name: &str) -> bool
[src]Determine whether a named module is in a known standard library test package.
Auto Trait Implementations
impl RefUnwindSafe for StandaloneDistribution
impl Send for StandaloneDistribution
impl Sync for StandaloneDistribution
impl Unpin for StandaloneDistribution
impl UnwindSafe for StandaloneDistribution
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,