pub struct PythonExecutableValue {
pub exe: Arc<Mutex<Box<dyn PythonBinaryBuilder>>>,
/* private fields */
}Expand description
Represents a builder for a Python executable.
Fields§
§exe: Arc<Mutex<Box<dyn PythonBinaryBuilder>>>Implementations§
Source§impl PythonExecutableValue
impl PythonExecutableValue
pub fn new( exe: Box<dyn PythonBinaryBuilder>, policy: PythonPackagingPolicyValue, ) -> Self
pub fn inner( &self, label: &str, ) -> Result<MutexGuard<'_, Box<dyn PythonBinaryBuilder>>, ValueError>
Sourcepub fn python_packaging_policy(&self) -> PythonPackagingPolicyValue
pub fn python_packaging_policy(&self) -> PythonPackagingPolicyValue
Obtains a copy of the PythonPackagingPolicyValue stored internally.
Source§impl PythonExecutableValue
impl PythonExecutableValue
Sourcepub fn make_python_module_source(
&self,
type_values: &TypeValues,
call_stack: &mut CallStack,
name: String,
source: String,
is_package: bool,
) -> ValueResult
pub fn make_python_module_source( &self, type_values: &TypeValues, call_stack: &mut CallStack, name: String, source: String, is_package: bool, ) -> ValueResult
PythonExecutable.make_python_module_source(name, source, is_package=false)
Sourcepub fn pip_download(
&mut self,
type_values: &TypeValues,
call_stack: &mut CallStack,
args: &Value,
) -> ValueResult
pub fn pip_download( &mut self, type_values: &TypeValues, call_stack: &mut CallStack, args: &Value, ) -> ValueResult
PythonExecutable.pip_download(args)
Sourcepub fn pip_install(
&mut self,
type_values: &TypeValues,
call_stack: &mut CallStack,
args: &Value,
extra_envs: &Value,
) -> ValueResult
pub fn pip_install( &mut self, type_values: &TypeValues, call_stack: &mut CallStack, args: &Value, extra_envs: &Value, ) -> ValueResult
PythonExecutable.pip_install(args, extra_envs=None)
Sourcepub fn read_package_root(
&mut self,
type_values: &TypeValues,
call_stack: &mut CallStack,
path: String,
packages: &Value,
) -> ValueResult
pub fn read_package_root( &mut self, type_values: &TypeValues, call_stack: &mut CallStack, path: String, packages: &Value, ) -> ValueResult
PythonExecutable.read_package_root(path, packages)
Sourcepub fn read_virtualenv(
&mut self,
type_values: &TypeValues,
call_stack: &mut CallStack,
path: String,
) -> ValueResult
pub fn read_virtualenv( &mut self, type_values: &TypeValues, call_stack: &mut CallStack, path: String, ) -> ValueResult
PythonExecutable.read_virtualenv(path)
Sourcepub fn setup_py_install(
&mut self,
type_values: &TypeValues,
call_stack: &mut CallStack,
package_path: String,
extra_envs: &Value,
extra_global_arguments: &Value,
) -> ValueResult
pub fn setup_py_install( &mut self, type_values: &TypeValues, call_stack: &mut CallStack, package_path: String, extra_envs: &Value, extra_global_arguments: &Value, ) -> ValueResult
PythonExecutable.setup_py_install(package_path, extra_envs=None, extra_global_arguments=None)
pub fn add_python_module_source( &mut self, label: &str, module: &PythonModuleSourceValue, ) -> ValueResult
pub fn add_python_package_resource( &mut self, label: &str, resource: &PythonPackageResourceValue, ) -> ValueResult
pub fn add_python_package_distribution_resource( &mut self, label: &str, resource: &PythonPackageDistributionResourceValue, ) -> ValueResult
pub fn add_python_extension_module( &mut self, label: &str, module: &PythonExtensionModuleValue, ) -> ValueResult
pub fn add_file_data(&mut self, label: &str, file: &FileValue) -> ValueResult
Sourcepub fn add_python_resource(
&mut self,
resource: &Value,
label: &str,
) -> ValueResult
pub fn add_python_resource( &mut self, resource: &Value, label: &str, ) -> ValueResult
PythonExecutable.add_python_resource(resource)
Sourcepub fn add_python_resources(&mut self, resources: &Value) -> ValueResult
pub fn add_python_resources(&mut self, resources: &Value) -> ValueResult
PythonExecutable.add_python_resources(resources)
Sourcepub fn add_cargo_manifest_licensing(
&mut self,
type_values: &TypeValues,
manifest_path: &str,
all_features: bool,
features: &Value,
) -> ValueResult
pub fn add_cargo_manifest_licensing( &mut self, type_values: &TypeValues, manifest_path: &str, all_features: bool, features: &Value, ) -> ValueResult
Add licensing information from a Cargo.toml manifest.
Sourcepub fn to_embedded_resources(&self) -> ValueResult
pub fn to_embedded_resources(&self) -> ValueResult
PythonExecutable.to_embedded_resources()
Sourcepub fn to_file_manifest(
&self,
type_values: &TypeValues,
prefix: String,
) -> ValueResult
pub fn to_file_manifest( &self, type_values: &TypeValues, prefix: String, ) -> ValueResult
PythonExecutable.to_file_manifest(prefix)
Sourcepub fn to_wix_bundle_builder(
&self,
type_values: &TypeValues,
call_stack: &mut CallStack,
id_prefix: String,
product_name: String,
product_version: String,
product_manufacturer: String,
msi_builder_callback: Value,
) -> ValueResult
pub fn to_wix_bundle_builder( &self, type_values: &TypeValues, call_stack: &mut CallStack, id_prefix: String, product_name: String, product_version: String, product_manufacturer: String, msi_builder_callback: Value, ) -> ValueResult
PythonExecutable.to_wix_bundle_builder(id_prefix, name, version, manufacturer, msi_builder_callback)
Sourcepub fn to_wix_msi_builder(
&self,
type_values: &TypeValues,
call_stack: &mut CallStack,
id_prefix: String,
product_name: String,
product_version: String,
product_manufacturer: String,
) -> ValueResult
pub fn to_wix_msi_builder( &self, type_values: &TypeValues, call_stack: &mut CallStack, id_prefix: String, product_name: String, product_version: String, product_manufacturer: String, ) -> ValueResult
PythonExecutable.to_wix_msi_builder(id_prefix, product_name, product_version, product_manufacturer)
Sourcepub fn filter_resources_from_files(
&mut self,
files: &Value,
glob_files: &Value,
) -> ValueResult
pub fn filter_resources_from_files( &mut self, files: &Value, glob_files: &Value, ) -> ValueResult
PythonExecutable.filter_resources_from_files(files=None, glob_files=None)
Trait Implementations§
Source§impl TypedValue for PythonExecutableValue
impl TypedValue for PythonExecutableValue
Source§const TYPE: &'static str = "PythonExecutable"
const TYPE: &'static str = "PythonExecutable"
Source§type Holder = Mutable<PythonExecutableValue>
type Holder = Mutable<PythonExecutableValue>
MutableHolder<Self> or ImmutableHolder<Self>Source§fn values_for_descendant_check_and_freeze<'a>(
&'a self,
) -> Box<dyn Iterator<Item = Value> + 'a>
fn values_for_descendant_check_and_freeze<'a>( &'a self, ) -> Box<dyn Iterator<Item = Value> + 'a>
Source§fn get_attr(&self, attribute: &str) -> ValueResult
fn get_attr(&self, attribute: &str) -> ValueResult
a.attribute). Read moreSource§fn has_attr(&self, attribute: &str) -> Result<bool, ValueError>
fn has_attr(&self, attribute: &str) -> Result<bool, ValueError>
attribute exists for the current value. Read moreSource§fn set_attr(&mut self, attribute: &str, value: Value) -> Result<(), ValueError>
fn set_attr(&mut self, attribute: &str, value: Value) -> Result<(), ValueError>
attribute of the current value to new_value (e.g.
a.attribute = new_value). Read moreSource§fn function_id(&self) -> Option<FunctionId>
fn function_id(&self) -> Option<FunctionId>
Source§fn to_str(&self) -> String
fn to_str(&self) -> String
Source§fn to_str_impl(&self, buf: &mut String) -> Result<(), Error>
fn to_str_impl(&self, buf: &mut String) -> Result<(), Error>
to_str, more efficient for nested objectsSource§fn to_repr(&self) -> String
fn to_repr(&self) -> String
Source§fn to_repr_impl(&self, buf: &mut String) -> Result<(), Error>
fn to_repr_impl(&self, buf: &mut String) -> Result<(), Error>
to_repr, more efficient for nested objectsSource§fn to_bool(&self) -> bool
fn to_bool(&self) -> bool
Source§fn to_int(&self) -> Result<i64, ValueError>
fn to_int(&self) -> Result<i64, ValueError>
Source§fn get_hash(&self) -> Result<u64, ValueError>
fn get_hash(&self) -> Result<u64, ValueError>
Source§fn call(
&self,
_call_stack: &mut CallStack,
_type_values: &TypeValues,
_positional: Vec<Value>,
_named: LinkedHashMap<RcString, Value>,
_args: Option<Value>,
_kwargs: Option<Value>,
) -> Result<Value, ValueError>
fn call( &self, _call_stack: &mut CallStack, _type_values: &TypeValues, _positional: Vec<Value>, _named: LinkedHashMap<RcString, Value>, _args: Option<Value>, _kwargs: Option<Value>, ) -> Result<Value, ValueError>
Source§fn at(&self, index: Value) -> Result<Value, ValueError>
fn at(&self, index: Value) -> Result<Value, ValueError>
Source§fn slice(
&self,
_start: Option<Value>,
_stop: Option<Value>,
_stride: Option<Value>,
) -> Result<Value, ValueError>
fn slice( &self, _start: Option<Value>, _stop: Option<Value>, _stride: Option<Value>, ) -> Result<Value, ValueError>
start and stop (both of them are added length() if negative and then
clamped between 0 and length()). stride indicates the direction. Read moreSource§fn iter(&self) -> Result<&(dyn TypedIterable + 'static), ValueError>
fn iter(&self) -> Result<&(dyn TypedIterable + 'static), ValueError>
Source§fn length(&self) -> Result<i64, ValueError>
fn length(&self) -> Result<i64, ValueError>
Source§fn dir_attr(&self) -> Result<Vec<RcString>, ValueError>
fn dir_attr(&self) -> Result<Vec<RcString>, ValueError>
Source§fn contains(&self, other: &Value) -> Result<bool, ValueError>
fn contains(&self, other: &Value) -> Result<bool, ValueError>
other is in the current value, if it is a container. Read moreSource§fn plus(&self) -> Result<Self, ValueError>
fn plus(&self) -> Result<Self, ValueError>
+ unary operator to the current value. Read moreSource§fn minus(&self) -> Result<Self, ValueError>
fn minus(&self) -> Result<Self, ValueError>
- unary operator to the current value. Read moreSource§fn add(&self, _other: &Self) -> Result<Self, ValueError>
fn add(&self, _other: &Self) -> Result<Self, ValueError>
other to the current value. Read moreSource§fn sub(&self, _other: &Self) -> Result<Self, ValueError>
fn sub(&self, _other: &Self) -> Result<Self, ValueError>
other from the current value. Read moreSource§fn mul(&self, other: Value) -> Result<Value, ValueError>
fn mul(&self, other: Value) -> Result<Value, ValueError>
other. Read moreSource§fn percent(&self, other: Value) -> Result<Value, ValueError>
fn percent(&self, other: Value) -> Result<Value, ValueError>
other. Read moreSource§fn div(&self, other: Value) -> Result<Value, ValueError>
fn div(&self, other: Value) -> Result<Value, ValueError>
other. division. Read moreAuto Trait Implementations§
impl Freeze for PythonExecutableValue
impl !RefUnwindSafe for PythonExecutableValue
impl !Send for PythonExecutableValue
impl !Sync for PythonExecutableValue
impl Unpin for PythonExecutableValue
impl !UnwindSafe for PythonExecutableValue
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.