Struct pyoxidizerlib::py_packaging::standalone_distribution::StandaloneDistribution [−][src]
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]
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]
logger: &Logger,
path: &Path,
extract_dir: &Path
) -> Result<Self>
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]
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]
Extract and analyze a standalone distribution from a tar stream.
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]
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]
Duplicate the python distribution, with distutils hacked
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]
&self,
logger: &Logger,
venv_dir_path: &Path
) -> Result<(PythonPaths, HashMap<String, String>)>
Create or re-use an existing venv
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]
fn clone(&self) -> StandaloneDistribution
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StandaloneDistribution
[src]
impl PythonDistribution for StandaloneDistribution
[src]
fn clone_trait(&self) -> Arc<dyn PythonDistribution>
[src]
fn target_triple(&self) -> &str
[src]
fn compatible_host_triples(&self) -> Vec<String>
[src]
fn python_exe_path(&self) -> &Path
[src]
fn python_version(&self) -> &str
[src]
fn python_major_minor_version(&self) -> String
[src]
fn python_implementation(&self) -> &str
[src]
fn python_implementation_short(&self) -> &str
[src]
fn python_tag(&self) -> &str
[src]
fn python_abi_tag(&self) -> Option<&str>
[src]
fn python_platform_tag(&self) -> &str
[src]
fn python_platform_compatibility_tag(&self) -> &str
[src]
fn cache_tag(&self) -> &str
[src]
fn python_module_suffixes(&self) -> Result<PythonModuleSuffixes>
[src]
fn stdlib_test_packages(&self) -> Vec<String>
[src]
fn apple_sdk_info(&self) -> Option<&AppleSdkInfo>
[src]
fn create_bytecode_compiler(&self) -> Result<Box<dyn PythonBytecodeCompiler>>
[src]
fn create_packaging_policy(&self) -> Result<PythonPackagingPolicy>
[src]
fn create_python_interpreter_config(
&self
) -> Result<PyembedPythonInterpreterConfig>
[src]
&self
) -> Result<PyembedPythonInterpreterConfig>
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]
&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>>
fn python_resources<'a>(&self) -> Vec<PythonResource<'a>>
[src]
fn ensure_pip(&self, logger: &Logger) -> Result<PathBuf>
[src]
Ensure pip is available to run in the distribution.
fn resolve_distutils(
&self,
logger: &Logger,
libpython_link_mode: LibpythonLinkMode,
dest_dir: &Path,
extra_python_paths: &[&Path]
) -> Result<HashMap<String, String>>
[src]
&self,
logger: &Logger,
libpython_link_mode: LibpythonLinkMode,
dest_dir: &Path,
extra_python_paths: &[&Path]
) -> Result<HashMap<String, String>>
fn supports_in_memory_shared_library_loading(&self) -> bool
[src]
Determines whether dynamically linked extension modules can be loaded from memory.
fn tcl_files(&self) -> Result<Vec<(PathBuf, FileData)>>
[src]
fn tcl_library_path_directory(&self) -> Option<String>
[src]
fn is_stdlib_test_package(&self, name: &str) -> bool
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,