[][src]Struct pyoxidizerlib::py_packaging::distribution::ParsedPythonDistribution

pub struct ParsedPythonDistribution {
    pub base_dir: PathBuf,
    pub flavor: String,
    pub version: String,
    pub os: String,
    pub arch: String,
    pub python_exe: PathBuf,
    pub stdlib_path: PathBuf,
    pub licenses: Option<Vec<String>>,
    pub license_path: Option<PathBuf>,
    pub tcl_library_path: Option<PathBuf>,
    pub objs_core: BTreeMap<PathBuf, PathBuf>,
    pub links_core: Vec<LibraryDepends>,
    pub extension_modules: BTreeMap<String, Vec<ExtensionModule>>,
    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 license_infos: BTreeMap<String, Vec<LicenseInfo>>,
    pub venv_base: PathBuf,
}

Represents a parsed Python distribution.

Distribution info is typically derived from a tarball containing a Python install and its build artifacts.

Fields

base_dir: PathBuf

Directory where distribution lives in the filesystem.

flavor: String

Python distribution flavor.

version: String

Python version string.

os: String

Operating system this Python runs on.

arch: String

Architecture this Python runs on.

python_exe: PathBuf

Path to Python interpreter executable.

stdlib_path: PathBuf

Path to Python standard library.

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.

tcl_library_path: Option<PathBuf>

Path to Tcl library files.

objs_core: BTreeMap<PathBuf, PathBuf>

Object files providing the core Python implementation.

Keys are relative paths. Values are filesystem paths.

links_core: Vec<LibraryDepends>

Linking information for the core Python implementation.

extension_modules: BTreeMap<String, Vec<ExtensionModule>>

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.

license_infos: BTreeMap<String, Vec<LicenseInfo>>

Describes license info for things in this distribution.

venv_base: PathBuf

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

Methods

impl ParsedPythonDistribution[src]

pub fn from_path(
    logger: &Logger,
    path: &Path,
    extract_dir: &Path
) -> Result<ParsedPythonDistribution>
[src]

pub fn as_minimal_info(&self) -> PythonDistributionMinimalInfo[src]

pub fn ensure_pip(&self, logger: &Logger) -> PathBuf[src]

Ensure pip is available to run in the distribution.

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]

Create or re-use an existing venv

pub fn source_modules(&self) -> Result<Vec<SourceModule>>[src]

Obtain SourceModule instances for this distribution.

pub fn resources_data(&self) -> Result<Vec<ResourceData>>[src]

Obtain ResourceData instances for this distribution.

pub fn filter_extension_modules(
    &self,
    logger: &Logger,
    filter: &ExtensionModuleFilter,
    variants: Option<HashMap<String, String>>
) -> Vec<ExtensionModule>
[src]

Trait Implementations

impl Debug for ParsedPythonDistribution[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,